# namiujrm/vielop architecture

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

- Interactive diagram: https://gitdiagram.com/namiujrm/vielop
- Repository: https://github.com/namiujrm/vielop

## Overview

Vielop is a student-management and tutoring-center operations platform with solo-tutor and centralized-center modes. The main user journey is browser entry, sign-in/session setup, then protected dashboard access to education and finance operations; the backend exposes module APIs through FastAPI. The README also identifies AI, Zalo, open-banking, and franchise capabilities, retained as distinct product branches. Connections are limited to explicit excerpts, index references, or README statements; unsampled module internals and persistence links are not inferred.

Main entry points: [`backend/src/main.py`](https://github.com/namiujrm/vielop/blob/main/backend/src/main.py) (API gateway), [`backend/src/modules/auth/infrastructure/api/auth_router.py`](https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/infrastructure/api/auth_router.py) (Authentication API), [`frontend/src/main.tsx`](https://github.com/namiujrm/vielop/blob/main/frontend/src/main.tsx) (React entry), [`frontend/src/App.tsx`](https://github.com/namiujrm/vielop/blob/main/frontend/src/App.tsx) (Routes and shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_entry["React entry<br/>[main.tsx]"]
  node_web_routes["Routes and shell<br/>[App.tsx]"]
  node_web_auth["Session context<br/>[AuthContext.tsx]"]
  node_web_storage["Token storage<br/>[storage.ts]"]
  node_web_dashboard["Operations dashboard"]
end

subgraph group_platform["Backend platform"]
  node_api_gateway["API gateway<br/>[main.py]"]
  node_api_contracts["API schemas<br/>[schemas.py]"]
  node_error_handling["Error handling"]
  node_database[("PostgreSQL data")]
end

subgraph group_education["Education operations"]
  node_classroom["Classroom management"]
  node_attendance["Attendance and diaries"]
end

subgraph group_business["Business services"]
  node_ledger["Tuition and ledger"]
  node_openbanking["Open banking"]
  node_zalo["Zalo notifications"]
  node_ai_agent["AI agent"]
  node_franchise["Franchise operations"]
end

subgraph group_identity["Identity and tenancy"]
  node_auth_api["Authentication API<br/>[auth_router.py]"]
  node_auth_service["Auth use cases<br/>[auth_service.py]"]
  node_auth_domain["Identity and RBAC rules<br/>[services.py]"]
end

node_user(("Tutor or operator"))

node_user -->|"uses"| node_web_entry
node_web_entry -->|"renders"| node_web_routes
node_web_routes -->|"provides session"| node_web_auth
node_web_routes -->|"routes to"| node_web_dashboard
node_web_auth -->|"stores tokens"| node_web_storage
node_web_auth -.->|"calls auth endpoints"| node_auth_api
node_web_entry -.->|"uses API"| node_api_gateway
node_api_gateway -->|"mounts"| node_auth_api
node_api_gateway -->|"mounts"| node_classroom
node_api_gateway -->|"mounts"| node_attendance
node_api_gateway -->|"mounts"| node_ledger
node_api_gateway -->|"mounts"| node_openbanking
node_api_gateway -->|"mounts"| node_zalo
node_api_gateway -->|"mounts"| node_ai_agent
node_auth_api -->|"invokes"| node_auth_service
node_auth_service -->|"uses rules"| node_auth_domain
node_auth_api -->|"uses schemas"| node_api_contracts
node_api_gateway -->|"registers handler"| node_error_handling
node_user -.->|"manages learning"| node_classroom
node_user -.->|"records attendance"| node_attendance
node_user -.->|"manages tuition"| node_ledger
node_openbanking -.->|"supports payments"| node_ledger
node_zalo -.->|"sends notifications"| node_user
node_ai_agent -.->|"assists operations"| node_user
node_user -.->|"oversees branches"| node_franchise

click node_web_entry "https://github.com/namiujrm/vielop/blob/main/frontend/src/main.tsx"
click node_web_routes "https://github.com/namiujrm/vielop/blob/main/frontend/src/App.tsx"
click node_web_auth "https://github.com/namiujrm/vielop/blob/main/frontend/src/features/auth/context/AuthContext.tsx"
click node_web_storage "https://github.com/namiujrm/vielop/blob/main/frontend/src/shared/utils/storage.ts"
click node_web_dashboard "https://github.com/namiujrm/vielop/blob/main/frontend/src/features/dashboard/pages/DashboardOverviewPage.tsx"
click node_api_gateway "https://github.com/namiujrm/vielop/blob/main/backend/src/main.py"
click node_api_contracts "https://github.com/namiujrm/vielop/blob/main/backend/src/core/kernel/schemas.py"
click node_error_handling "https://github.com/namiujrm/vielop/blob/main/backend/src/core/middleware/exception_handler.py"
click node_database "https://github.com/namiujrm/vielop/tree/main/backend/src/core/db"
click node_auth_api "https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/infrastructure/api/auth_router.py"
click node_auth_service "https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/application/auth_service.py"
click node_auth_domain "https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/domain/services.py"
click node_classroom "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/classroom"
click node_attendance "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/attendance"
click node_ledger "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/ledger"
click node_openbanking "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/openbanking"
click node_zalo "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/zalo"
click node_ai_agent "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/ai_agent"
click node_franchise "https://github.com/namiujrm/vielop/tree/main/backend/src/modules/franchise"

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_web_entry,node_web_routes,node_web_auth,node_web_storage,node_web_dashboard toneBlue
class node_api_gateway,node_api_contracts,node_error_handling,node_database toneAmber
class node_classroom,node_attendance toneMint
class node_ledger,node_openbanking,node_zalo,node_ai_agent,node_franchise toneRose
class node_auth_api,node_auth_service,node_auth_domain,node_user toneIndigo
```

## Components

### Web application

- [React entry](https://github.com/namiujrm/vielop/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Routes and shell](https://github.com/namiujrm/vielop/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/namiujrm/vielop/blob/main/frontend/src/features/auth/context/AuthContext.tsx): `frontend/src/features/auth/context/AuthContext.tsx`
- [Token storage](https://github.com/namiujrm/vielop/blob/main/frontend/src/shared/utils/storage.ts): `frontend/src/shared/utils/storage.ts`
- [Operations dashboard](https://github.com/namiujrm/vielop/blob/main/frontend/src/features/dashboard/pages/DashboardOverviewPage.tsx): `frontend/src/features/dashboard/pages/DashboardOverviewPage.tsx`

### Backend platform

- [API gateway](https://github.com/namiujrm/vielop/blob/main/backend/src/main.py): `backend/src/main.py`
- [API schemas](https://github.com/namiujrm/vielop/blob/main/backend/src/core/kernel/schemas.py): `backend/src/core/kernel/schemas.py`
- [Error handling](https://github.com/namiujrm/vielop/blob/main/backend/src/core/middleware/exception_handler.py): `backend/src/core/middleware/exception_handler.py`
- [PostgreSQL data](https://github.com/namiujrm/vielop/tree/main/backend/src/core/db): `backend/src/core/db`

### Education operations

- [Classroom management](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/classroom): `backend/src/modules/classroom`
- [Attendance and diaries](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/attendance): `backend/src/modules/attendance`

### Business services

- [Tuition and ledger](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/ledger): `backend/src/modules/ledger`
- [Open banking](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/openbanking): `backend/src/modules/openbanking`
- [Zalo notifications](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/zalo): `backend/src/modules/zalo`
- [AI agent](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/ai_agent): `backend/src/modules/ai_agent`
- [Franchise operations](https://github.com/namiujrm/vielop/tree/main/backend/src/modules/franchise): `backend/src/modules/franchise`

### Identity and tenancy

- [Authentication API](https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/infrastructure/api/auth_router.py): `backend/src/modules/auth/infrastructure/api/auth_router.py`
- [Auth use cases](https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/application/auth_service.py): `backend/src/modules/auth/application/auth_service.py`
- [Identity and RBAC rules](https://github.com/namiujrm/vielop/blob/main/backend/src/modules/auth/domain/services.py): `backend/src/modules/auth/domain/services.py`

### Other components

- **Tutor or operator**

## Connections

- Tutor or operator → React entry: uses (evidence: `frontend/src/main.tsx`)
- React entry → Routes and shell: renders (evidence: `frontend/src/main.tsx`)
- Routes and shell → Session context: provides session (evidence: `frontend/src/App.tsx`)
- Routes and shell → Operations dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Session context → Token storage: stores tokens (evidence: `frontend/src/features/auth/context/AuthContext.tsx`)
- Session context → Authentication API: calls auth endpoints
- React entry → API gateway: uses API
- API gateway → Authentication API: mounts (evidence: `backend/src/main.py`)
- API gateway → Classroom management: mounts (evidence: `backend/src/main.py`)
- API gateway → Attendance and diaries: mounts (evidence: `backend/src/main.py`)
- API gateway → Tuition and ledger: mounts (evidence: `backend/src/main.py`)
- API gateway → Open banking: mounts (evidence: `backend/src/main.py`)
- API gateway → Zalo notifications: mounts (evidence: `backend/src/main.py`)
- API gateway → AI agent: mounts (evidence: `backend/src/main.py`)
- Authentication API → Auth use cases: invokes (evidence: `backend/src/modules/auth/infrastructure/api/auth_router.py`)
- Auth use cases → Identity and RBAC rules: uses rules (evidence: `backend/src/modules/auth/application/auth_service.py`)
- Authentication API → API schemas: uses schemas (evidence: `backend/src/modules/auth/infrastructure/api/auth_router.py`)
- API gateway → Error handling: registers handler (evidence: `backend/src/main.py`)
- Tutor or operator → Classroom management: manages learning
- Tutor or operator → Attendance and diaries: records attendance
- Tutor or operator → Tuition and ledger: manages tuition
- Open banking → Tuition and ledger: supports payments
- Zalo notifications → Tutor or operator: sends notifications
- AI agent → Tutor or operator: assists operations
- Tutor or operator → Franchise operations: oversees branches
