# locthinhnguyen/vone architecture

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

- Interactive diagram: https://gitdiagram.com/locthinhnguyen/vone
- Repository: https://github.com/locthinhnguyen/vone

## Overview

VOne is a responsive digital-office application. Employees sign in, use role-specific dashboards and functional workspaces, then create or process work, documents, and administrative requests; managers review approvals, while other features support communication, internal news, personal records, and reference material. The React app calls an authenticated API client; Express routes apply business rules and persist domain records in MongoDB. README-described capabilities are included even where their source was not sampled; those links reflect documented API usage, not inspected implementations.

Main entry points: [`frontend/src/lib/api/client.js`](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/lib/api/client.js) (API client), [`backend/server.js`](https://github.com/locthinhnguyen/vone/blob/main/backend/server.js) (Express API server), [`backend/routes/tasks.js`](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/tasks.js) (Task routes), [`backend/routes/services.js`](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/services.js) (Service routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Routes and access<br/>[App.jsx]"]
  node_authui["Sign-in state<br/>[AuthContext.jsx]"]
  node_dashboard["Home dashboards<br/>[Home.jsx]"]
  node_clientapi["API client<br/>[client.js]"]
end

subgraph group_work["Work management"]
  node_tasksui["Task workspace<br/>[CongViecCuaToi.jsx]"]
  node_taskapiui["Task API wrapper<br/>[tasksApi.js]"]
  node_documentsui["Document workflow<br/>[TaoVanBan.jsx]"]
end

subgraph group_office["Office services"]
  node_connectui["Chat and meetings<br/>[ConnectPage.jsx]"]
  node_profileui["Profile and payslips<br/>[MePage.jsx]"]
  node_mediaui["Internal news<br/>[MediaPage.jsx]"]
  node_referenceui["Wiki and legal<br/>[WikiPage.jsx]"]
  node_serviceui["Admin requests<br/>[ServicePage.jsx]"]
  node_notificationsui["Notifications"]
end

subgraph group_server["API and domain"]
  node_server["Express API server<br/>[server.js]"]
  node_authroute["Authentication routes<br/>[auth.js]"]
  node_taskroute["Task routes<br/>[tasks.js]"]
  node_docroute["Document routes<br/>[documents.js]"]
  node_serviceroute["Service routes<br/>[services.js]"]
  node_otherdomains["Other domain routes"]
  node_notify["Notification helper<br/>[notify.js]"]
end

subgraph group_state["Persistence"]
  node_taskmodel[("Task records<br/>[Task.js]")]
  node_documentmodel[("Document records<br/>[Document.js]")]
  node_servicemodel[("Service request records<br/>[ServiceRequest.js]")]
end

node_employee(("Employee or manager"))
node_mongodb[("MongoDB")]

node_employee -->|"uses"| node_app
node_app -->|"checks session"| node_authui
node_authui -->|"requests identity"| node_clientapi
node_employee -->|"views"| node_dashboard
node_dashboard -->|"loads stats"| node_clientapi
node_employee -->|"creates and tracks"| node_tasksui
node_tasksui -->|"requests tasks"| node_taskapiui
node_taskapiui -->|"calls"| node_clientapi
node_employee -->|"drafts and routes"| node_documentsui
node_documentsui -->|"requests documents"| node_clientapi
node_employee -->|"communicates"| node_connectui
node_connectui -->|"requests chat and events"| node_clientapi
node_employee -->|"manages profile"| node_profileui
node_profileui -->|"requests user and payslips"| node_clientapi
node_employee -->|"reads and posts"| node_mediaui
node_mediaui -->|"requests articles"| node_clientapi
node_employee -->|"consults"| node_referenceui
node_referenceui -->|"requests reference material"| node_clientapi
node_employee -->|"submits or reviews"| node_serviceui
node_serviceui -->|"calls"| node_clientapi
node_employee -->|"checks alerts"| node_notificationsui
node_notificationsui -->|"requests notifications"| node_clientapi
node_clientapi -->|"sends authenticated API requests"| node_server
node_server -->|"dispatches"| node_authroute
node_server -->|"dispatches"| node_taskroute
node_server -->|"dispatches"| node_docroute
node_server -->|"dispatches"| node_serviceroute
node_server -->|"dispatches"| node_otherdomains
node_taskroute -->|"reads and writes"| node_taskmodel
node_docroute -->|"reads and writes"| node_documentmodel
node_serviceroute -->|"reads and writes"| node_servicemodel
node_serviceroute -->|"notifies users"| node_notify
node_taskroute -->|"notifies users"| node_notify
node_taskmodel -->|"persists"| node_mongodb
node_documentmodel -->|"persists"| node_mongodb
node_servicemodel -->|"persists"| node_mongodb

click node_app "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/app/App.jsx"
click node_authui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/auth/AuthContext.jsx"
click node_dashboard "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/dashboard/pages/Home.jsx"
click node_clientapi "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/lib/api/client.js"
click node_tasksui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/tasks/pages/CongViecCuaToi.jsx"
click node_taskapiui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/tasks/data/tasksApi.js"
click node_documentsui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/documents/pages/TaoVanBan.jsx"
click node_connectui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/connect/pages/ConnectPage.jsx"
click node_profileui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/profile/pages/MePage.jsx"
click node_mediaui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/media/pages/MediaPage.jsx"
click node_referenceui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/wiki/pages/WikiPage.jsx"
click node_serviceui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/service/pages/ServicePage.jsx"
click node_notificationsui "https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/notifications/pages/NotificationsPage.jsx"
click node_server "https://github.com/locthinhnguyen/vone/blob/main/backend/server.js"
click node_authroute "https://github.com/locthinhnguyen/vone/blob/main/backend/routes/auth.js"
click node_taskroute "https://github.com/locthinhnguyen/vone/blob/main/backend/routes/tasks.js"
click node_docroute "https://github.com/locthinhnguyen/vone/blob/main/backend/routes/documents.js"
click node_serviceroute "https://github.com/locthinhnguyen/vone/blob/main/backend/routes/services.js"
click node_otherdomains "https://github.com/locthinhnguyen/vone/tree/main/backend/routes"
click node_notify "https://github.com/locthinhnguyen/vone/blob/main/backend/utils/notify.js"
click node_taskmodel "https://github.com/locthinhnguyen/vone/blob/main/backend/models/Task.js"
click node_documentmodel "https://github.com/locthinhnguyen/vone/blob/main/backend/models/Document.js"
click node_servicemodel "https://github.com/locthinhnguyen/vone/blob/main/backend/models/ServiceRequest.js"

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_authui,node_dashboard,node_clientapi toneBlue
class node_tasksui,node_taskapiui,node_documentsui,node_mongodb toneAmber
class node_connectui,node_profileui,node_mediaui,node_referenceui,node_serviceui,node_notificationsui toneMint
class node_server,node_authroute,node_taskroute,node_docroute,node_serviceroute,node_otherdomains,node_notify toneRose
class node_taskmodel,node_documentmodel,node_servicemodel,node_employee toneIndigo
```

## Components

### Web application

- [Routes and access](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Sign-in state](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/auth/AuthContext.jsx): `frontend/src/features/auth/AuthContext.jsx`
- [Home dashboards](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/dashboard/pages/Home.jsx): `frontend/src/features/dashboard/pages/Home.jsx`
- [API client](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/lib/api/client.js): `frontend/src/lib/api/client.js`

### Work management

- [Task workspace](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/tasks/pages/CongViecCuaToi.jsx): `frontend/src/features/tasks/pages/CongViecCuaToi.jsx`
- [Task API wrapper](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/tasks/data/tasksApi.js): `frontend/src/features/tasks/data/tasksApi.js`
- [Document workflow](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/documents/pages/TaoVanBan.jsx): `frontend/src/features/documents/pages/TaoVanBan.jsx`

### Office services

- [Chat and meetings](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/connect/pages/ConnectPage.jsx): `frontend/src/features/connect/pages/ConnectPage.jsx`
- [Profile and payslips](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/profile/pages/MePage.jsx): `frontend/src/features/profile/pages/MePage.jsx`
- [Internal news](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/media/pages/MediaPage.jsx): `frontend/src/features/media/pages/MediaPage.jsx`
- [Wiki and legal](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/wiki/pages/WikiPage.jsx): `frontend/src/features/wiki/pages/WikiPage.jsx`
- [Admin requests](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/service/pages/ServicePage.jsx): `frontend/src/features/service/pages/ServicePage.jsx`
- [Notifications](https://github.com/locthinhnguyen/vone/blob/main/frontend/src/features/notifications/pages/NotificationsPage.jsx): `frontend/src/features/notifications/pages/NotificationsPage.jsx`

### API and domain

- [Express API server](https://github.com/locthinhnguyen/vone/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Task routes](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/tasks.js): `backend/routes/tasks.js`
- [Document routes](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/documents.js): `backend/routes/documents.js`
- [Service routes](https://github.com/locthinhnguyen/vone/blob/main/backend/routes/services.js): `backend/routes/services.js`
- [Other domain routes](https://github.com/locthinhnguyen/vone/tree/main/backend/routes): `backend/routes`
- [Notification helper](https://github.com/locthinhnguyen/vone/blob/main/backend/utils/notify.js): `backend/utils/notify.js`

### Persistence

- [Task records](https://github.com/locthinhnguyen/vone/blob/main/backend/models/Task.js): `backend/models/Task.js`
- [Document records](https://github.com/locthinhnguyen/vone/blob/main/backend/models/Document.js): `backend/models/Document.js`
- [Service request records](https://github.com/locthinhnguyen/vone/blob/main/backend/models/ServiceRequest.js): `backend/models/ServiceRequest.js`

### Other components

- **Employee or manager**
- **MongoDB**

## Connections

- Employee or manager → Routes and access: uses
- Routes and access → Sign-in state: checks session
- Sign-in state → API client: requests identity
- Employee or manager → Home dashboards: views
- Home dashboards → API client: loads stats
- Employee or manager → Task workspace: creates and tracks
- Task workspace → Task API wrapper: requests tasks
- Task API wrapper → API client: calls
- Employee or manager → Document workflow: drafts and routes
- Document workflow → API client: requests documents
- Employee or manager → Chat and meetings: communicates
- Chat and meetings → API client: requests chat and events
- Employee or manager → Profile and payslips: manages profile
- Profile and payslips → API client: requests user and payslips
- Employee or manager → Internal news: reads and posts
- Internal news → API client: requests articles
- Employee or manager → Wiki and legal: consults
- Wiki and legal → API client: requests reference material
- Employee or manager → Admin requests: submits or reviews
- Admin requests → API client: calls
- Employee or manager → Notifications: checks alerts
- Notifications → API client: requests notifications
- API client → Express API server: sends authenticated API requests
- Express API server → Authentication routes: dispatches
- Express API server → Task routes: dispatches
- Express API server → Document routes: dispatches
- Express API server → Service routes: dispatches
- Express API server → Other domain routes: dispatches
- Task routes → Task records: reads and writes
- Document routes → Document records: reads and writes
- Service routes → Service request records: reads and writes
- Service routes → Notification helper: notifies users
- Task routes → Notification helper: notifies users
- Task records → MongoDB: persists
- Document records → MongoDB: persists
- Service request records → MongoDB: persists
