# udaykrishnakasula/easyx-ready- architecture

> Architecture diagram of the GitHub repository udaykrishnakasula/easyx-ready-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/udaykrishnakasula/easyx-ready-
- Repository: https://github.com/udaykrishnakasula/easyx-ready-

## Overview

EasyX is a web-based investment and account-management application with user and administrator portals. The main user journey runs from authentication into the dashboard, where users can manage investments, deposits, withdrawals, wallet activity, referrals, KYC, and support; the server exposes the application API and uses Supabase-backed services. Administrators have a separate portal for financial operations, user oversight, support, notifications, and analytics. The excerpts show the app shell, route definitions, readiness checks, and selected server services; details of most page-to-endpoint wiring are not sampled, so those links are kept at the portal/API boundary.

Main entry points: [`server.ts`](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/server.ts) (HTTP API), [`src/App.jsx`](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/App.jsx) (Application shell), [`src/shared/lib/api.js`](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/lib/api.js) (API client), [`src/user/pages`](https://github.com/udaykrishnakasula/easyx-ready-/tree/main/src/user/pages) (Account workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user["User portal"]
  node_app["Application shell<br/>[App.jsx]"]
  node_auth["Authentication<br/>[AuthContext.jsx]"]
  node_user_routes["User routes<br/>[UserRoutes.jsx]"]
  node_user_pages["Account workflows"]
  node_kyc_capture["KYC capture"]
  node_camera["Camera manager<br/>[cameraManager.ts]"]
  node_health_context["Health guard"]
end

subgraph group_admin["Admin portal"]
  node_admin_routes["Admin routes<br/>[AdminRoutes.jsx]"]
  node_admin_pages["Admin operations"]
  node_admin_support["Support management"]
end

subgraph group_backend["API and services"]
  node_client_api["API client<br/>[api.js]"]
  node_server["HTTP API<br/>[server.ts]"]
  node_health["Database readiness"]
  node_reminders["Reminder engine<br/>[reminderEngine.ts]"]
  node_notifications["Notification manager"]
  node_support_service["Support services<br/>[supportService.ts]"]
  node_monitoring["Monitoring service"]
end

subgraph group_state["Data and integrations"]
  node_db_adapter["Supabase data access<br/>[supabaseDb.ts]"]
  node_supabase[("Supabase<br/>[supabaseClient.ts]")]
end

node_customer(("User"))
node_administrator(("Administrator"))

node_customer -->|"uses"| node_app
node_administrator -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"checks readiness"| node_health_context
node_health_context -->|"requests readiness"| node_client_api
node_app -->|"routes users"| node_user_routes
node_app -->|"routes admins"| node_admin_routes
node_user_routes -->|"renders pages"| node_user_pages
node_admin_routes -->|"renders pages"| node_admin_pages
node_admin_pages -->|"manages FAQs"| node_admin_support
node_user_pages -->|"requests data"| node_client_api
node_admin_pages -->|"requests data"| node_client_api
node_client_api -->|"HTTP requests"| node_server
node_server -->|"checks readiness"| node_health
node_server -->|"manages reminders"| node_reminders
node_server -->|"manages notifications"| node_notifications
node_server -->|"handles support"| node_support_service
node_server -->|"serves analytics"| node_monitoring
node_server -->|"reads and writes"| node_db_adapter
node_db_adapter -->|"accesses data"| node_supabase
node_reminders -->|"persists settings"| node_supabase
node_notifications -->|"loads campaigns"| node_supabase
node_user_pages -->|"captures identity"| node_kyc_capture
node_kyc_capture -->|"requests camera"| node_camera

click node_app "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/App.jsx"
click node_auth "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/context/AuthContext.jsx"
click node_user_routes "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/user/routes/UserRoutes.jsx"
click node_user_pages "https://github.com/udaykrishnakasula/easyx-ready-/tree/main/src/user/pages"
click node_kyc_capture "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/user/components/KycSelfieLiveness.tsx"
click node_camera "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/services/camera/cameraManager.ts"
click node_admin_routes "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/admin/routes/AdminRoutes.jsx"
click node_admin_pages "https://github.com/udaykrishnakasula/easyx-ready-/tree/main/src/admin/pages"
click node_admin_support "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/admin/components/AdminFaqManager.jsx"
click node_client_api "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/lib/api.js"
click node_server "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/server.ts"
click node_health "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/databaseHealthService.ts"
click node_reminders "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/reminderEngine.ts"
click node_notifications "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/notificationManager.ts"
click node_support_service "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/supportService.ts"
click node_monitoring "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/monitoringService.ts"
click node_db_adapter "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/supabaseDb.ts"
click node_supabase "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/lib/supabaseClient.ts"
click node_health_context "https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/context/DatabaseHealthContext.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth,node_user_routes,node_user_pages,node_kyc_capture,node_camera,node_health_context,node_customer toneBlue
class node_admin_routes,node_admin_pages,node_admin_support toneAmber
class node_client_api,node_server,node_health,node_reminders,node_notifications,node_support_service,node_monitoring toneMint
class node_db_adapter,node_supabase toneRose
class node_administrator toneIndigo
```

## Components

### User portal

- [Application shell](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/App.jsx): `src/App.jsx`
- [Authentication](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/context/AuthContext.jsx): `src/shared/context/AuthContext.jsx`
- [User routes](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/user/routes/UserRoutes.jsx): `src/user/routes/UserRoutes.jsx`
- [Account workflows](https://github.com/udaykrishnakasula/easyx-ready-/tree/main/src/user/pages): `src/user/pages`
- [KYC capture](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/user/components/KycSelfieLiveness.tsx): `src/user/components/KycSelfieLiveness.tsx`
- [Camera manager](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/services/camera/cameraManager.ts): `src/services/camera/cameraManager.ts`
- [Health guard](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/context/DatabaseHealthContext.jsx): `src/shared/context/DatabaseHealthContext.jsx`

### Admin portal

- [Admin routes](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/admin/routes/AdminRoutes.jsx): `src/admin/routes/AdminRoutes.jsx`
- [Admin operations](https://github.com/udaykrishnakasula/easyx-ready-/tree/main/src/admin/pages): `src/admin/pages`
- [Support management](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/admin/components/AdminFaqManager.jsx): `src/admin/components/AdminFaqManager.jsx`

### API and services

- [API client](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/shared/lib/api.js): `src/shared/lib/api.js`
- [HTTP API](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/server.ts): `server.ts`
- [Database readiness](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/databaseHealthService.ts): `src/server/databaseHealthService.ts`
- [Reminder engine](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/reminderEngine.ts): `src/server/reminderEngine.ts`
- [Notification manager](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/notificationManager.ts): `src/server/notificationManager.ts`
- [Support services](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/supportService.ts): `src/server/supportService.ts`
- [Monitoring service](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/monitoringService.ts): `src/server/monitoringService.ts`

### Data and integrations

- [Supabase data access](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/server/supabaseDb.ts): `src/server/supabaseDb.ts`
- [Supabase](https://github.com/udaykrishnakasula/easyx-ready-/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`

### Other components

- **User**
- **Administrator**

## Connections

- User → Application shell: uses
- Administrator → Application shell: uses
- Application shell → Authentication: provides auth
- Application shell → Health guard: checks readiness
- Health guard → API client: requests readiness
- Application shell → User routes: routes users
- Application shell → Admin routes: routes admins
- User routes → Account workflows: renders pages
- Admin routes → Admin operations: renders pages
- Admin operations → Support management: manages FAQs
- Account workflows → API client: requests data
- Admin operations → API client: requests data
- API client → HTTP API: HTTP requests
- HTTP API → Database readiness: checks readiness
- HTTP API → Reminder engine: manages reminders
- HTTP API → Notification manager: manages notifications
- HTTP API → Support services: handles support
- HTTP API → Monitoring service: serves analytics
- HTTP API → Supabase data access: reads and writes
- Supabase data access → Supabase: accesses data
- Reminder engine → Supabase: persists settings
- Notification manager → Supabase: loads campaigns
- Account workflows → KYC capture: captures identity
- KYC capture → Camera manager: requests camera
