Skip to content

mpc-for-ppml/client

Repository files navigation

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

System Diagram

graph TD
    subgraph "User Interaction"
        U[("πŸ‘€<br>User")]
    end

    subgraph "Web Application"
        direction LR
        subgraph "Frontend Layer"
            R[("βš›οΈ<br>React App")]
            UI_Stack[("🎨<br>UI & Styling<br>(Tailwind, shadcn/ui, Framer Motion)")]
            V[("πŸ’»<br>Vite")]
            TS[("πŸ“œ<br>TypeScript")]
        end

        subgraph "Backend Layer (Python)"
            FB[("⚑🐍<br>FastAPI Backend")]
            WS[("πŸ”Œ<br>Websocket")]
            SessMgr[("πŸ”‘<br>Session Manager")]
        end
    end

    subgraph "Multi-Party Computation (MPyC) Environment"
        subgraph "MPyC Party Containers"
            P1[("🐳<br>Party 1 (Leader)")]
            P2[("🐳<br>Party 2")]
            P3[("🐳<br>Party 3")]
        end
        MPyC_Workflow[("πŸ“Š<br>MPyC Workflow<br>(Data Prep, PSI, Training, Eval, Results)")]
    end


    %% Connections
    U -- Accesses & Interacts with --> R

    V -- Bundles & Serves --> R
    TS -- Provides Static Typing for --> R
    R -- Integrates --> UI_Stack

    R -- Communicates via API to --> FB
    R -- Establishes persistent connection to --> WS

    FB -- Manages Sessions via --> SessMgr
    FB -- Orchestrates & Triggers --> MPyC_Workflow
    WS -- Relays Status & Data from --> FB
    WS -- Relays Status & Data to --> R

    SessMgr -- Coordinates --> P1
    FB -- Triggers specific endpoints on --> P1
    FB -- Triggers specific endpoints on --> P2
    FB -- Triggers specific endpoints on --> P3

    P1 & P2 & P3 -- Participate in --> MPyC_Workflow
    MPyC_Workflow -- Utilizes MPyC Libraries for --> P1
    MPyC_Workflow -- Utilizes MPyC Libraries for --> P2
    MPyC_Workflow -- Utilizes MPyC Libraries for --> P3
    MPyC_Workflow -- Delivers Final Model/Results to --> R
    MPyC_Workflow -- Delivers Final Model/Results to Each --> P1
    MPyC_Workflow -- Delivers Final Model/Results to Each --> P2
    MPyC_Workflow -- Delivers Final Model/Results to Each --> P3


    classDef default fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4;
    classDef special fill:#313244,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4;
    classDef user fill:#a6e3a1,stroke:#a6e3a1,stroke-width:2px,color:#1e1e2e;
    classDef backend fill:#f9e2af,stroke:#fab387,stroke-width:2px,color:#1e1e2e;
    classDef mpyc fill:#b4befe,stroke:#89b4fa,stroke-width:2px,color:#1e1e2e;

    class V,TS special;
    class R,UI_Stack default;
    class U user;
    class FB,WS,SessMgr backend;
    class P1,P2,P3,MPyC_Workflow mpyc;
Loading

About

πŸ’» | Client side implementation of end-to-end MPC protocol for PPML.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •