This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})- Replace
tseslint.configs.recommendedtotseslint.configs.recommendedTypeCheckedortseslint.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,
},
})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;