# jaivacreativelabs/overseas-crm architecture

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

- Interactive diagram: https://gitdiagram.com/jaivacreativelabs/overseas-crm
- Repository: https://github.com/jaivacreativelabs/overseas-crm

## Overview

Overseas-CRM supports staff and students through the overseas-education journey, from lead counselling and profile evaluation through applications, offers, payments, visa processing, and arrival preparation. Staff use role-protected CRM pages; students have a dedicated portal. The backend exposes domain APIs with persistence and operational records. The README establishes the product stages, while sampled source confirms application handling and frontend routing; several other domain implementations are represented by their exact module directories because their source was not sampled.

Main entry points: [`backend/src/app.ts`](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/app.ts) (API application), [`frontend/src/routes/AppRoutes.tsx`](https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/routes/AppRoutes.tsx) (Role-based routes), [`backend/src/modules/applications/application.service.ts`](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/modules/applications/application.service.ts) (Applications), [`frontend/src/features`](https://github.com/jaivacreativelabs/overseas-crm/tree/main/frontend/src/features) (Journey pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_routes["Role-based routes<br/>[AppRoutes.tsx]"]
  node_student_portal["Student portal"]
  node_journey_pages["Journey pages"]
  node_ops_pages["Operations pages"]
  node_api_client["API client<br/>[api-client.ts]"]
end

subgraph group_journey["Student journey"]
  node_leads["Leads and counselling"]
  node_profile["Profile evaluation"]
  node_universities["University selection"]
  node_documents["Documents"]
  node_applications["Applications"]
  node_offers["Offers"]
  node_payments["Payments"]
  node_visa["Visa processing"]
  node_travel["Travel and arrival"]
end

subgraph group_operations["CRM operations"]
  node_tasks["Tasks and reminders"]
  node_messages["Messages and notifications"]
  node_reports["Reports"]
  node_audit["Audit logging<br/>[audit.service.ts]"]
end

subgraph group_platform["API and persistence"]
  node_api["API application<br/>[app.ts]"]
  node_mongo[("MongoDB connection<br/>[database.ts]")]
end

node_staff(("Staff user"))
node_student(("Student"))

node_staff -->|"uses CRM"| node_routes
node_student -->|"opens portal"| node_routes
node_routes -->|"routes to"| node_student_portal
node_routes -->|"routes to"| node_journey_pages
node_routes -->|"routes to"| node_ops_pages
node_journey_pages -->|"requests data"| node_api_client
node_ops_pages -->|"requests data"| node_api_client
node_api -->|"mounts module"| node_leads
node_api -->|"mounts module"| node_profile
node_api -->|"mounts module"| node_universities
node_api -->|"mounts module"| node_documents
node_api -->|"mounts module"| node_applications
node_api -->|"mounts module"| node_offers
node_api -->|"mounts module"| node_payments
node_api -->|"mounts module"| node_visa
node_api -->|"mounts module"| node_travel
node_api -->|"mounts module"| node_tasks
node_applications -->|"reads and updates"| node_leads
node_applications -->|"records changes"| node_audit
node_applications -.->|"persists records"| node_mongo

click node_routes "https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/routes/AppRoutes.tsx"
click node_student_portal "https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/features/student-portal/StudentPortalPage.tsx"
click node_journey_pages "https://github.com/jaivacreativelabs/overseas-crm/tree/main/frontend/src/features"
click node_ops_pages "https://github.com/jaivacreativelabs/overseas-crm/tree/main/frontend/src/features"
click node_api_client "https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/services/api-client.ts"
click node_leads "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/leads"
click node_profile "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/profile-evaluation"
click node_universities "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/universities"
click node_documents "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/documents"
click node_applications "https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/modules/applications/application.service.ts"
click node_offers "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/offers"
click node_payments "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/payments"
click node_visa "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/visa"
click node_travel "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/travel"
click node_tasks "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/tasks"
click node_messages "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/messages"
click node_reports "https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/reports"
click node_audit "https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/modules/audit-logs/audit.service.ts"
click node_api "https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/app.ts"
click node_mongo "https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/config/database.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_routes,node_student_portal,node_journey_pages,node_ops_pages,node_api_client,node_staff toneBlue
class node_leads,node_profile,node_universities,node_documents,node_applications,node_offers,node_payments,node_visa,node_travel toneAmber
class node_tasks,node_messages,node_reports,node_audit toneMint
class node_api,node_mongo toneRose
class node_student toneIndigo
```

## Components

### Web application

- [Role-based routes](https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/routes/AppRoutes.tsx): `frontend/src/routes/AppRoutes.tsx`
- [Student portal](https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/features/student-portal/StudentPortalPage.tsx): `frontend/src/features/student-portal/StudentPortalPage.tsx`
- [Journey pages](https://github.com/jaivacreativelabs/overseas-crm/tree/main/frontend/src/features): `frontend/src/features`
- [Operations pages](https://github.com/jaivacreativelabs/overseas-crm/tree/main/frontend/src/features): `frontend/src/features`
- [API client](https://github.com/jaivacreativelabs/overseas-crm/blob/main/frontend/src/services/api-client.ts): `frontend/src/services/api-client.ts`

### Student journey

- [Leads and counselling](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/leads): `backend/src/modules/leads`
- [Profile evaluation](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/profile-evaluation): `backend/src/modules/profile-evaluation`
- [University selection](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/universities): `backend/src/modules/universities`
- [Documents](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/documents): `backend/src/modules/documents`
- [Applications](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/modules/applications/application.service.ts): `backend/src/modules/applications/application.service.ts`
- [Offers](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/offers): `backend/src/modules/offers`
- [Payments](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/payments): `backend/src/modules/payments`
- [Visa processing](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/visa): `backend/src/modules/visa`
- [Travel and arrival](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/travel): `backend/src/modules/travel`

### CRM operations

- [Tasks and reminders](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/tasks): `backend/src/modules/tasks`
- [Messages and notifications](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/messages): `backend/src/modules/messages`
- [Reports](https://github.com/jaivacreativelabs/overseas-crm/tree/main/backend/src/modules/reports): `backend/src/modules/reports`
- [Audit logging](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/modules/audit-logs/audit.service.ts): `backend/src/modules/audit-logs/audit.service.ts`

### API and persistence

- [API application](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [MongoDB connection](https://github.com/jaivacreativelabs/overseas-crm/blob/main/backend/src/config/database.ts): `backend/src/config/database.ts`

### Other components

- **Staff user**
- **Student**

## Connections

- Staff user → Role-based routes: uses CRM (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Student → Role-based routes: opens portal (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Role-based routes → Student portal: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Role-based routes → Journey pages: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Role-based routes → Operations pages: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Journey pages → API client: requests data (evidence: `frontend/src/features/leads/LeadDetailPage.tsx`)
- Operations pages → API client: requests data (evidence: `frontend/src/features/tasks/TasksPage.tsx`)
- API application → Leads and counselling: mounts module (evidence: `backend/src/app.ts`)
- API application → Profile evaluation: mounts module (evidence: `backend/src/app.ts`)
- API application → University selection: mounts module (evidence: `backend/src/app.ts`)
- API application → Documents: mounts module (evidence: `backend/src/app.ts`)
- API application → Applications: mounts module (evidence: `backend/src/app.ts`)
- API application → Offers: mounts module (evidence: `backend/src/app.ts`)
- API application → Payments: mounts module (evidence: `backend/src/app.ts`)
- API application → Visa processing: mounts module (evidence: `backend/src/app.ts`)
- API application → Travel and arrival: mounts module (evidence: `backend/src/app.ts`)
- API application → Tasks and reminders: mounts module (evidence: `backend/src/app.ts`)
- Applications → Leads and counselling: reads and updates (evidence: `backend/src/modules/applications/application.service.ts`)
- Applications → Audit logging: records changes (evidence: `backend/src/modules/applications/application.service.ts`)
- Applications → MongoDB connection: persists records
