# usama-kanjo/full-stacke-project architecture

> Architecture diagram of the GitHub repository usama-kanjo/full-stacke-project, 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/usama-kanjo/full-stacke-project
- Repository: https://github.com/usama-kanjo/full-stacke-project

## Overview

KanjoLab is a web platform for dental practices and laboratory technicians. Its visible workflow runs from account registration or login through email verification and role/profile setup, then into role-specific dashboards; the documented product also includes prosthesis-order creation and tracking. The Next.js client calls an Express API, whose services manage authentication and profile data, PostgreSQL persistence, and email notifications. Order management is documented in the README but has no dedicated implementation path in the supplied tree, so its wiring cannot be shown. Server routing and profile-service internals were not sampled; those connections are limited to documented endpoints and visible controller calls.

Main entry points: [`client/src/app`](https://github.com/usama-kanjo/full-stacke-project/tree/main/client/src/app) (KanjoLab web app), [`server/src/config/database.ts`](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/config/database.ts) (PostgreSQL database), [`server/src/index.ts`](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/index.ts) (Express API server), [`server/src/routes/v1/userRoute.ts`](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/userRoute.ts) (User routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["KanjoLab web app"]
  node_login["Login and registration<br/>[LoginForm.tsx]"]
  node_register["Registration UI<br/>[rigister.tsx]"]
  node_dashboard["Role dashboards"]
  node_authclient["Auth API service<br/>[authService.ts]"]
  node_apiclient["HTTP API client<br/>[apiClient.ts]"]
end

subgraph group_api["API layer"]
  node_express["Express API server<br/>[index.ts]"]
  node_useroutes["User routes<br/>[userRoute.ts]"]
  node_dentistroutes["Dentist routes<br/>[dentistRoute.ts]"]
  node_technicianroutes["Technician routes<br/>[technicianRoute.ts]"]
  node_authcontroller["Auth controller<br/>[authController.ts]"]
  node_usercontroller["User controller<br/>[userController.ts]"]
  node_dentistcontroller["Dentist controller"]
  node_techniciancontroller["Technician controller"]
end

subgraph group_domain["Account and profiles"]
  node_authservice["Authentication service<br/>[authService.ts]"]
  node_userservice["User profile service<br/>[userService.ts]"]
  node_dentistservice["Dentist profile service<br/>[dentistService.ts]"]
  node_technicianservice["Technician profile service"]
  node_orders["Order management"]
end

subgraph group_integrations["Persistence and messaging"]
  node_database[("PostgreSQL database<br/>[database.ts]")]
  node_emailservice["Email delivery<br/>[emailService.ts]"]
end

node_dentists(("Dentists"))
node_technicians(("Lab technicians"))
node_postgres[("PostgreSQL")]
node_mailprovider["Gmail SMTP"]

node_dentists -->|"use"| node_web
node_technicians -->|"use"| node_web
node_web -->|"renders"| node_login
node_web -->|"renders"| node_register
node_web -->|"renders"| node_dashboard
node_login -->|"requests auth"| node_authclient
node_register -->|"requests registration"| node_authclient
node_authclient -->|"sends requests"| node_apiclient
node_apiclient -->|"calls API"| node_express
node_express -->|"mounts"| node_useroutes
node_express -->|"mounts"| node_dentistroutes
node_express -->|"mounts"| node_technicianroutes
node_useroutes -->|"dispatches"| node_authcontroller
node_useroutes -->|"dispatches"| node_usercontroller
node_dentistroutes -->|"dispatches"| node_dentistcontroller
node_technicianroutes -->|"dispatches"| node_techniciancontroller
node_authcontroller -->|"calls"| node_authservice
node_usercontroller -->|"calls"| node_userservice
node_dentistcontroller -->|"calls"| node_dentistservice
node_techniciancontroller -->|"calls"| node_technicianservice
node_authservice -->|"reads and writes"| node_database
node_userservice -->|"reads and writes"| node_database
node_dentistservice -->|"reads and writes"| node_database
node_technicianservice -->|"reads and writes"| node_database
node_database -->|"connects"| node_postgres
node_authservice -->|"sends codes"| node_emailservice
node_emailservice -.->|"delivers email"| node_mailprovider

click node_web "https://github.com/usama-kanjo/full-stacke-project/tree/main/client/src/app"
click node_login "https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/LoginPage/LoginForm.tsx"
click node_register "https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/rigisterPage/rigister.tsx"
click node_dashboard "https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/dashboard/DashboardClient.tsx"
click node_authclient "https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/services/authService.ts"
click node_apiclient "https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/services/apiClient.ts"
click node_express "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/index.ts"
click node_useroutes "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/userRoute.ts"
click node_dentistroutes "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/dentistRoute.ts"
click node_technicianroutes "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/technicianRoute.ts"
click node_authcontroller "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/authController.ts"
click node_usercontroller "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/userController.ts"
click node_dentistcontroller "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/dentistController.ts"
click node_techniciancontroller "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/technicianController.ts"
click node_authservice "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/authService.ts"
click node_userservice "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/userService.ts"
click node_dentistservice "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/dentistService.ts"
click node_technicianservice "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/technicianService.ts"
click node_orders "https://github.com/usama-kanjo/full-stacke-project/tree/main/server/src/services"
click node_database "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/config/database.ts"
click node_emailservice "https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/emailService.ts"

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,node_login,node_register,node_dashboard,node_authclient,node_apiclient toneBlue
class node_express,node_useroutes,node_dentistroutes,node_technicianroutes,node_authcontroller,node_usercontroller,node_dentistcontroller,node_techniciancontroller,node_postgres toneAmber
class node_authservice,node_userservice,node_dentistservice,node_technicianservice,node_orders toneMint
class node_database,node_emailservice toneRose
class node_dentists,node_technicians,node_mailprovider toneIndigo
```

## Components

### Web client

- [KanjoLab web app](https://github.com/usama-kanjo/full-stacke-project/tree/main/client/src/app): `client/src/app`
- [Login and registration](https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/LoginPage/LoginForm.tsx): `client/src/components/LoginPage/LoginForm.tsx`
- [Registration UI](https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/rigisterPage/rigister.tsx): `client/src/components/rigisterPage/rigister.tsx`
- [Role dashboards](https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/components/dashboard/DashboardClient.tsx): `client/src/components/dashboard/DashboardClient.tsx`
- [Auth API service](https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/services/authService.ts): `client/src/services/authService.ts`
- [HTTP API client](https://github.com/usama-kanjo/full-stacke-project/blob/main/client/src/services/apiClient.ts): `client/src/services/apiClient.ts`

### API layer

- [Express API server](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/index.ts): `server/src/index.ts`
- [User routes](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/userRoute.ts): `server/src/routes/v1/userRoute.ts`
- [Dentist routes](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/dentistRoute.ts): `server/src/routes/v1/dentistRoute.ts`
- [Technician routes](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/routes/v1/technicianRoute.ts): `server/src/routes/v1/technicianRoute.ts`
- [Auth controller](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/authController.ts): `server/src/controllers/authController.ts`
- [User controller](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/userController.ts): `server/src/controllers/userController.ts`
- [Dentist controller](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/dentistController.ts): `server/src/controllers/dentistController.ts`
- [Technician controller](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/controllers/technicianController.ts): `server/src/controllers/technicianController.ts`

### Account and profiles

- [Authentication service](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/authService.ts): `server/src/services/authService.ts`
- [User profile service](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/userService.ts): `server/src/services/userService.ts`
- [Dentist profile service](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/dentistService.ts): `server/src/services/dentistService.ts`
- [Technician profile service](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/technicianService.ts): `server/src/services/technicianService.ts`
- [Order management](https://github.com/usama-kanjo/full-stacke-project/tree/main/server/src/services): `server/src/services`

### Persistence and messaging

- [PostgreSQL database](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/config/database.ts): `server/src/config/database.ts`
- [Email delivery](https://github.com/usama-kanjo/full-stacke-project/blob/main/server/src/services/emailService.ts): `server/src/services/emailService.ts`

### Other components

- **Dentists**
- **Lab technicians**
- **PostgreSQL**
- **Gmail SMTP**

## Connections

- Dentists → KanjoLab web app: use
- Lab technicians → KanjoLab web app: use
- KanjoLab web app → Login and registration: renders
- KanjoLab web app → Registration UI: renders
- KanjoLab web app → Role dashboards: renders
- Login and registration → Auth API service: requests auth
- Registration UI → Auth API service: requests registration
- Auth API service → HTTP API client: sends requests
- HTTP API client → Express API server: calls API
- Express API server → User routes: mounts
- Express API server → Dentist routes: mounts
- Express API server → Technician routes: mounts
- User routes → Auth controller: dispatches
- User routes → User controller: dispatches
- Dentist routes → Dentist controller: dispatches
- Technician routes → Technician controller: dispatches
- Auth controller → Authentication service: calls
- User controller → User profile service: calls
- Dentist controller → Dentist profile service: calls
- Technician controller → Technician profile service: calls
- Authentication service → PostgreSQL database: reads and writes
- User profile service → PostgreSQL database: reads and writes
- Dentist profile service → PostgreSQL database: reads and writes
- Technician profile service → PostgreSQL database: reads and writes
- PostgreSQL database → PostgreSQL: connects
- Authentication service → Email delivery: sends codes
- Email delivery → Gmail SMTP: delivers email
