# swanith1234/dreamplanner architecture

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

- Interactive diagram: https://gitdiagram.com/swanith1234/dreamplanner
- Repository: https://github.com/swanith1234/dreamplanner

## Overview

DreamPlanner (IgniteMate) turns a person’s ambitions into executable dreams, roadmaps, and tasks, with an AI agent supporting planning and progress conversations. Users enter through the web or mobile client, call the API for product features, and can use chat to invoke the agent. The README documents tiered state and memory, validation before tool execution, and retention of outcomes. Paths for unsampled feature modules are limited to the exact directories in the tree; their internal call relationships are not inferred.

Main entry points: [`src/app.ts`](https://github.com/swanith1234/dreamplanner/blob/main/src/app.ts) (Express API), [`src/config/database.ts`](https://github.com/swanith1234/dreamplanner/blob/main/src/config/database.ts) (PostgreSQL state), [`src/ai/orchestrator.ts`](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/orchestrator.ts) (AI orchestrator), [`src/ai/contextCompiler.ts`](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/contextCompiler.ts) (Context compiler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_web["Web and mobile app<br/>[App.tsx]"]
  node_clientapi["API client<br/>[client.ts]"]
end

subgraph group_api["API and product domains"]
  node_apiapp["Express API<br/>[app.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_dreams["Dream planning"]
  node_tasks["Task execution"]
  node_roadmaps["Roadmaps"]
  node_assessment["Assessments"]
  node_chat["Chat controller<br/>[chat.controller.ts]"]
end

subgraph group_cognition["Agent cognition"]
  node_agent["AI orchestrator<br/>[orchestrator.ts]"]
  node_context["Context compiler<br/>[contextCompiler.ts]"]
  node_tools["Tool execution<br/>[toolExecutor.ts]"]
  node_llm["LLM provider<br/>[llmClient.ts]"]
end

subgraph group_state["State and integrations"]
  node_database[("PostgreSQL state<br/>[database.ts]")]
  node_memory["Hindsight memory"]
  node_redis[("Session cache")]
end

subgraph group_engagement["Insights and engagement"]
  node_analytics["Analytics and forecasts"]
  node_notifications["Notifications and realtime"]
  node_feedback["Feedback and admin"]
end

node_user(("User"))

node_user -->|"uses"| node_web
node_web -->|"calls"| node_clientapi
node_clientapi -->|"REST requests"| node_apiapp
node_apiapp -->|"routes auth"| node_auth
node_apiapp -->|"routes dreams"| node_dreams
node_apiapp -->|"routes tasks"| node_tasks
node_apiapp -->|"routes roadmaps"| node_roadmaps
node_apiapp -->|"routes assessments"| node_assessment
node_apiapp -->|"routes chat"| node_chat
node_chat -->|"invokes"| node_agent
node_agent -->|"compiles context"| node_context
node_context -->|"reads ground truth"| node_database
node_context -->|"recalls memories"| node_memory
node_context -->|"uses session cache"| node_redis
node_agent -->|"requests completion"| node_llm
node_agent -->|"dispatches actions"| node_tools
node_tools -->|"mutates state"| node_database
node_agent -->|"retains outcomes"| node_memory
node_apiapp -->|"routes analytics"| node_analytics
node_apiapp -->|"routes notifications"| node_notifications
node_apiapp -->|"routes feedback"| node_feedback
node_dreams -.->|"persists state"| node_database
node_tasks -.->|"persists state"| node_database
node_roadmaps -.->|"persists state"| node_database
node_assessment -.->|"persists results"| node_database

click node_web "https://github.com/swanith1234/dreamplanner/blob/main/frontend/src/App.tsx"
click node_clientapi "https://github.com/swanith1234/dreamplanner/blob/main/frontend/src/api/client.ts"
click node_apiapp "https://github.com/swanith1234/dreamplanner/blob/main/src/app.ts"
click node_auth "https://github.com/swanith1234/dreamplanner/blob/main/src/modules/auth/auth.service.ts"
click node_dreams "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/dream"
click node_tasks "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/task"
click node_roadmaps "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/roadmap"
click node_assessment "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/assessment"
click node_chat "https://github.com/swanith1234/dreamplanner/blob/main/src/modules/chat/chat.controller.ts"
click node_agent "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/orchestrator.ts"
click node_context "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/contextCompiler.ts"
click node_tools "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/toolExecutor.ts"
click node_llm "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/llmClient.ts"
click node_database "https://github.com/swanith1234/dreamplanner/blob/main/src/config/database.ts"
click node_memory "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/hindsightService.ts"
click node_redis "https://github.com/swanith1234/dreamplanner/blob/main/src/ai/redisDraftManager.ts"
click node_analytics "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/analytics"
click node_notifications "https://github.com/swanith1234/dreamplanner/blob/main/src/modules/notification/websocket.server.ts"
click node_feedback "https://github.com/swanith1234/dreamplanner/tree/main/src/modules/feedback"

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_clientapi,node_user toneBlue
class node_apiapp,node_auth,node_dreams,node_tasks,node_roadmaps,node_assessment,node_chat toneAmber
class node_agent,node_context,node_tools,node_llm toneMint
class node_database,node_memory,node_redis toneRose
class node_analytics,node_notifications,node_feedback toneIndigo
```

## Components

### User experience

- [Web and mobile app](https://github.com/swanith1234/dreamplanner/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/swanith1234/dreamplanner/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API and product domains

- [Express API](https://github.com/swanith1234/dreamplanner/blob/main/src/app.ts): `src/app.ts`
- [Authentication](https://github.com/swanith1234/dreamplanner/blob/main/src/modules/auth/auth.service.ts): `src/modules/auth/auth.service.ts`
- [Dream planning](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/dream): `src/modules/dream`
- [Task execution](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/task): `src/modules/task`
- [Roadmaps](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/roadmap): `src/modules/roadmap`
- [Assessments](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/assessment): `src/modules/assessment`
- [Chat controller](https://github.com/swanith1234/dreamplanner/blob/main/src/modules/chat/chat.controller.ts): `src/modules/chat/chat.controller.ts`

### Agent cognition

- [AI orchestrator](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/orchestrator.ts): `src/ai/orchestrator.ts`
- [Context compiler](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/contextCompiler.ts): `src/ai/contextCompiler.ts`
- [Tool execution](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/toolExecutor.ts): `src/ai/toolExecutor.ts`
- [LLM provider](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/llmClient.ts): `src/ai/llmClient.ts`

### State and integrations

- [PostgreSQL state](https://github.com/swanith1234/dreamplanner/blob/main/src/config/database.ts): `src/config/database.ts`
- [Hindsight memory](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/hindsightService.ts): `src/ai/hindsightService.ts`
- [Session cache](https://github.com/swanith1234/dreamplanner/blob/main/src/ai/redisDraftManager.ts): `src/ai/redisDraftManager.ts`

### Insights and engagement

- [Analytics and forecasts](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/analytics): `src/modules/analytics`
- [Notifications and realtime](https://github.com/swanith1234/dreamplanner/blob/main/src/modules/notification/websocket.server.ts): `src/modules/notification/websocket.server.ts`
- [Feedback and admin](https://github.com/swanith1234/dreamplanner/tree/main/src/modules/feedback): `src/modules/feedback`

### Other components

- **User**

## Connections

- User → Web and mobile app: uses
- Web and mobile app → API client: calls
- API client → Express API: REST requests
- Express API → Authentication: routes auth (evidence: `src/app.ts`)
- Express API → Dream planning: routes dreams (evidence: `src/app.ts`)
- Express API → Task execution: routes tasks (evidence: `src/app.ts`)
- Express API → Roadmaps: routes roadmaps (evidence: `src/app.ts`)
- Express API → Assessments: routes assessments (evidence: `src/app.ts`)
- Express API → Chat controller: routes chat (evidence: `src/app.ts`)
- Chat controller → AI orchestrator: invokes (evidence: `src/modules/chat/chat.controller.ts`)
- AI orchestrator → Context compiler: compiles context
- Context compiler → PostgreSQL state: reads ground truth
- Context compiler → Hindsight memory: recalls memories
- Context compiler → Session cache: uses session cache
- AI orchestrator → LLM provider: requests completion (evidence: `src/ai/orchestrator.ts`)
- AI orchestrator → Tool execution: dispatches actions (evidence: `src/ai/orchestrator.ts`)
- Tool execution → PostgreSQL state: mutates state
- AI orchestrator → Hindsight memory: retains outcomes (evidence: `src/ai/orchestrator.ts`)
- Express API → Analytics and forecasts: routes analytics (evidence: `src/app.ts`)
- Express API → Notifications and realtime: routes notifications (evidence: `src/app.ts`)
- Express API → Feedback and admin: routes feedback (evidence: `src/app.ts`)
- Dream planning → PostgreSQL state: persists state
- Task execution → PostgreSQL state: persists state
- Roadmaps → PostgreSQL state: persists state
- Assessments → PostgreSQL state: persists results
