# raahuldaksh/ordo architecture

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

- Interactive diagram: https://gitdiagram.com/raahuldaksh/ordo
- Repository: https://github.com/raahuldaksh/ordo

## Overview

ORDO is a personal productivity platform whose core loop is planning a realistic day, recording task outcomes, reviewing analytics, and adjusting routines. The Next.js client presents the workflow and communicates with an Express REST API backed by MongoDB. The graph includes documented calendar, AI coaching, and notification capabilities, but their detailed call paths are not shown in the sampled source; those links are therefore omitted. The API-to-frontend relationship and domain capabilities are based on the README, with implementation paths taken from the repository tree and SOURCE INDEX.

Main entry points: [`backend/src/models/index.ts`](https://github.com/raahuldaksh/ordo/blob/master/backend/src/models/index.ts) (MongoDB models), [`backend/src/routes/index.ts`](https://github.com/raahuldaksh/ordo/blob/master/backend/src/routes/index.ts) (API route registry), [`backend/src/controllers/routineController.ts`](https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/routineController.ts) (Routine endpoints), [`backend/src/controllers/weeklyReviewController.ts`](https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/weeklyReviewController.ts) (Weekly review records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Product interface"]
  node_web["ORDO web app<br/>[page.tsx]"]
  node_day["Daily planner<br/>[page.tsx]"]
  node_tasksui["Task workspace<br/>[page.tsx]"]
  node_routinesui["Routine templates<br/>[page.tsx]"]
  node_calendarui["Calendar view<br/>[page.tsx]"]
  node_analyticsui["Analytics view<br/>[page.tsx]"]
  node_reviewui["Weekly review<br/>[page.tsx]"]
  node_coachingui["AI assistant<br/>[page.tsx]"]
end

subgraph group_api["API and access"]
  node_rest["REST API v1<br/>[app.ts]"]
  node_routes["API route registry<br/>[index.ts]"]
  node_authcontroller["Auth endpoints<br/>[authController.ts]"]
  node_routinecontroller["Routine endpoints"]
end

subgraph group_planning["Planning and execution"]
  node_routine["Routine management<br/>[routineService.ts]"]
  node_task["Task outcomes<br/>[taskService.ts]"]
  node_calendar["Calendar integration<br/>[calendarService.ts]"]
end

subgraph group_insight["Review and coaching"]
  node_analytics["Productivity analytics"]
  node_weekly["Weekly review records"]
  node_ai["AI coaching<br/>[aiService.ts]"]
end

subgraph group_platform["Identity and persistence"]
  node_auth["Authentication<br/>[authService.ts]"]
  node_store[("MongoDB models<br/>[index.ts]")]
  node_identity["Auth middleware<br/>[auth.ts]"]
end

node_person(("User"))

node_person -->|"uses"| node_web
node_web -->|"calls REST API"| node_rest
node_rest -->|"mounts v1 routes"| node_routes
node_routes -->|"registers auth routes"| node_authcontroller
node_routes -->|"registers routine routes"| node_routinecontroller
node_routinecontroller -->|"calls"| node_routine
node_routinecontroller -->|"requires authentication"| node_identity
node_authcontroller -->|"calls"| node_auth
node_auth -->|"reads and writes"| node_store
node_identity -->|"checks user"| node_store
node_routine -->|"reads and writes"| node_store
node_weekly -->|"snapshots metrics"| node_analytics
node_weekly -->|"reads and writes reviews"| node_store
node_analytics -->|"reads productivity data"| node_store

click node_web "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/dashboard/page.tsx"
click node_day "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/my-day/page.tsx"
click node_tasksui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/tasks/page.tsx"
click node_routinesui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/routines/page.tsx"
click node_calendarui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/calendar/page.tsx"
click node_analyticsui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/analytics/page.tsx"
click node_reviewui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/weekly-review/page.tsx"
click node_coachingui "https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/ai-assistant/page.tsx"
click node_rest "https://github.com/raahuldaksh/ordo/blob/master/backend/src/app.ts"
click node_routes "https://github.com/raahuldaksh/ordo/blob/master/backend/src/routes/index.ts"
click node_auth "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/authService.ts"
click node_authcontroller "https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/authController.ts"
click node_routine "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/routineService.ts"
click node_routinecontroller "https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/routineController.ts"
click node_task "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/taskService.ts"
click node_calendar "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/calendarService.ts"
click node_analytics "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/analyticsService.ts"
click node_weekly "https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/weeklyReviewController.ts"
click node_ai "https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/aiService.ts"
click node_store "https://github.com/raahuldaksh/ordo/blob/master/backend/src/models/index.ts"
click node_identity "https://github.com/raahuldaksh/ordo/blob/master/backend/src/middlewares/auth.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_day,node_tasksui,node_routinesui,node_calendarui,node_analyticsui,node_reviewui,node_coachingui,node_person toneBlue
class node_rest,node_routes,node_authcontroller,node_routinecontroller toneAmber
class node_routine,node_task,node_calendar toneMint
class node_analytics,node_weekly,node_ai toneRose
class node_auth,node_store,node_identity toneIndigo
```

## Components

### Product interface

- [ORDO web app](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/dashboard/page.tsx): `frontend/src/app/(dashboard)/dashboard/page.tsx`
- [Daily planner](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/my-day/page.tsx): `frontend/src/app/(dashboard)/my-day/page.tsx`
- [Task workspace](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/tasks/page.tsx): `frontend/src/app/(dashboard)/tasks/page.tsx`
- [Routine templates](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/routines/page.tsx): `frontend/src/app/(dashboard)/routines/page.tsx`
- [Calendar view](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/calendar/page.tsx): `frontend/src/app/(dashboard)/calendar/page.tsx`
- [Analytics view](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/analytics/page.tsx): `frontend/src/app/(dashboard)/analytics/page.tsx`
- [Weekly review](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/weekly-review/page.tsx): `frontend/src/app/(dashboard)/weekly-review/page.tsx`
- [AI assistant](https://github.com/raahuldaksh/ordo/blob/master/frontend/src/app/(dashboard)/ai-assistant/page.tsx): `frontend/src/app/(dashboard)/ai-assistant/page.tsx`

### API and access

- [REST API v1](https://github.com/raahuldaksh/ordo/blob/master/backend/src/app.ts): `backend/src/app.ts`
- [API route registry](https://github.com/raahuldaksh/ordo/blob/master/backend/src/routes/index.ts): `backend/src/routes/index.ts`
- [Auth endpoints](https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/authController.ts): `backend/src/controllers/authController.ts`
- [Routine endpoints](https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/routineController.ts): `backend/src/controllers/routineController.ts`

### Planning and execution

- [Routine management](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/routineService.ts): `backend/src/services/routineService.ts`
- [Task outcomes](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/taskService.ts): `backend/src/services/taskService.ts`
- [Calendar integration](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/calendarService.ts): `backend/src/services/calendarService.ts`

### Review and coaching

- [Productivity analytics](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/analyticsService.ts): `backend/src/services/analyticsService.ts`
- [Weekly review records](https://github.com/raahuldaksh/ordo/blob/master/backend/src/controllers/weeklyReviewController.ts): `backend/src/controllers/weeklyReviewController.ts`
- [AI coaching](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/aiService.ts): `backend/src/services/aiService.ts`

### Identity and persistence

- [Authentication](https://github.com/raahuldaksh/ordo/blob/master/backend/src/services/authService.ts): `backend/src/services/authService.ts`
- [MongoDB models](https://github.com/raahuldaksh/ordo/blob/master/backend/src/models/index.ts): `backend/src/models/index.ts`
- [Auth middleware](https://github.com/raahuldaksh/ordo/blob/master/backend/src/middlewares/auth.ts): `backend/src/middlewares/auth.ts`

### Other components

- **User**

## Connections

- User → ORDO web app: uses (evidence: `README.md`)
- ORDO web app → REST API v1: calls REST API (evidence: `README.md`)
- REST API v1 → API route registry: mounts v1 routes (evidence: `backend/src/app.ts`)
- API route registry → Auth endpoints: registers auth routes (evidence: `backend/src/routes/index.ts`)
- API route registry → Routine endpoints: registers routine routes (evidence: `backend/src/routes/index.ts`)
- Routine endpoints → Routine management: calls (evidence: `backend/src/controllers/routineController.ts`)
- Routine endpoints → Auth middleware: requires authentication (evidence: `backend/src/routes/routineRoutes.ts`)
- Auth endpoints → Authentication: calls (evidence: `backend/src/controllers/authController.ts`)
- Authentication → MongoDB models: reads and writes (evidence: `backend/src/services/authService.ts`)
- Auth middleware → MongoDB models: checks user (evidence: `backend/src/middlewares/auth.ts`)
- Routine management → MongoDB models: reads and writes (evidence: `backend/src/services/routineService.ts`)
- Weekly review records → Productivity analytics: snapshots metrics (evidence: `backend/src/controllers/weeklyReviewController.ts`)
- Weekly review records → MongoDB models: reads and writes reviews (evidence: `backend/src/controllers/weeklyReviewController.ts`)
- Productivity analytics → MongoDB models: reads productivity data (evidence: `backend/src/services/analyticsService.ts`)
