# srishanthrasa/projectforge-ai architecture

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

- Interactive diagram: https://gitdiagram.com/srishanthrasa/projectforge-ai
- Repository: https://github.com/srishanthrasa/projectforge-ai

## Overview

ProjectForge is a student-facing capstone project planning workspace. Students sign in or use the demo, provide profile and project context, generate and compare ideas, then develop a selected idea into a blueprint, architecture, roadmap, and trackable tasks; evaluation, idea improvement, and a context-grounded AI mentor provide additional support. The route map and server handlers are sampled; most view internals and AI-service wiring are not, so feature-to-backend links are shown only where the server excerpt establishes them.

Main entry points: [`src/App.tsx`](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/App.tsx) (Route App), [`server.ts`](https://github.com/srishanthrasa/projectforge-ai/blob/main/server.ts) (API Server), [`src/lib/ai/services/index.ts`](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/services/index.ts) (AI Service Registry), [`src/context/AppContext.tsx`](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/context/AppContext.tsx) (App Context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Workspace Experience"]
  node_app["Route App<br/>[App.tsx]"]
  node_auth["Sign In<br/>[AuthView.tsx]"]
  node_onboard["Onboarding"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_profile["Profile<br/>[ProfileView.tsx]"]
  node_mentor["AI Mentor<br/>[MentorChatView.tsx]"]
  node_contextdrawer["Mentor Context"]
end

subgraph group_planning["Project Planning"]
  node_generate["Generate Ideas"]
  node_ideas["Ideas List<br/>[IdeasListView.tsx]"]
  node_saved["Saved Ideas<br/>[SavedIdeasView.tsx]"]
  node_compare["Compare Ideas<br/>[CompareView.tsx]"]
  node_detail["Project Detail"]
  node_blueprint["Blueprint<br/>[BlueprintView.tsx]"]
  node_architecture["Architecture"]
  node_roadmap["Roadmap<br/>[RoadmapView.tsx]"]
  node_tasks["Task Tracker<br/>[TasksView.tsx]"]
  node_evaluate["Project Evaluator"]
  node_improve["Idea Improver"]
end

subgraph group_ai["AI Services"]
  node_server["API Server<br/>[server.ts]"]
  node_services["AI Service Registry<br/>[index.ts]"]
  node_chatservice["ChatAnywhere Service<br/>[chatanywhere.ts]"]
  node_prompts["Prompt Definitions<br/>[index.ts]"]
  node_schemas["AI Schemas<br/>[index.ts]"]
end

subgraph group_state["Identity and State"]
  node_appstate["App Context<br/>[AppContext.tsx]"]
  node_firebase["Firebase Client<br/>[firebaseClient.ts]"]
  node_firestore[("Firebase Auth and Firestore")]
  node_supabase["Supabase Client<br/>[supabaseClient.ts]"]
  node_supabasestore[("Supabase Store")]
end

node_student(("Student"))

node_student -->|"uses workspace"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_onboard
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_generate
node_app -->|"routes to"| node_ideas
node_app -->|"routes to"| node_saved
node_app -->|"routes to"| node_compare
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_blueprint
node_app -->|"routes to"| node_architecture
node_app -->|"routes to"| node_roadmap
node_app -->|"routes to"| node_tasks
node_app -->|"routes to"| node_evaluate
node_app -->|"routes to"| node_improve
node_app -->|"routes to"| node_mentor
node_app -->|"routes to"| node_profile
node_auth -->|"calls login"| node_appstate
node_app -->|"reads state"| node_appstate
node_appstate -->|"calls auth and data"| node_firebase
node_firebase -->|"reads and writes"| node_firestore
node_supabase -.->|"creates client for"| node_supabasestore
node_server -->|"dispatches AI calls"| node_services
node_services -->|"exports service"| node_chatservice
node_server -->|"serves AI responses"| node_student
node_generate -->|"requests ideas"| node_server
node_blueprint -->|"requests blueprint"| node_server
node_architecture -->|"requests architecture"| node_server
node_roadmap -->|"requests roadmap"| node_server
node_evaluate -->|"requests evaluation"| node_server
node_improve -->|"requests improvement"| node_server
node_mentor -->|"requests mentor chat"| node_server
node_contextdrawer -->|"reads project context"| node_appstate
node_services -.->|"prompt wiring uncertain"| node_prompts
node_services -.->|"schema wiring uncertain"| node_schemas

click node_app "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/App.tsx"
click node_auth "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/auth/AuthView.tsx"
click node_onboard "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/onboarding/OnboardingWizard.tsx"
click node_dashboard "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/dashboard/DashboardView.tsx"
click node_profile "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/profile/ProfileView.tsx"
click node_generate "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/GenerateIdeasView.tsx"
click node_ideas "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/IdeasListView.tsx"
click node_saved "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/SavedIdeasView.tsx"
click node_compare "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/CompareView.tsx"
click node_detail "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/ProjectDetailView.tsx"
click node_blueprint "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/BlueprintView.tsx"
click node_architecture "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/ArchitectureView.tsx"
click node_roadmap "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/RoadmapView.tsx"
click node_tasks "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/TasksView.tsx"
click node_evaluate "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/tools/ProjectEvaluatorView.tsx"
click node_improve "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/tools/ImproveIdeaView.tsx"
click node_mentor "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/mentor/MentorChatView.tsx"
click node_contextdrawer "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/mentor/MentorContextDrawer.tsx"
click node_server "https://github.com/srishanthrasa/projectforge-ai/blob/main/server.ts"
click node_services "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/services/index.ts"
click node_chatservice "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/services/chatanywhere.ts"
click node_prompts "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/prompts/index.ts"
click node_schemas "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/schemas/index.ts"
click node_appstate "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/context/AppContext.tsx"
click node_firebase "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/firebaseClient.ts"
click node_supabase "https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/supabaseClient.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_app,node_auth,node_onboard,node_dashboard,node_profile,node_mentor,node_contextdrawer toneBlue
class node_generate,node_ideas,node_saved,node_compare,node_detail,node_blueprint,node_architecture,node_roadmap,node_tasks,node_evaluate,node_improve toneAmber
class node_server,node_services,node_chatservice,node_prompts,node_schemas toneMint
class node_appstate,node_firebase,node_firestore,node_supabase,node_supabasestore toneRose
class node_student toneIndigo
```

## Components

### Workspace Experience

- [Route App](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/App.tsx): `src/App.tsx`
- [Sign In](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/auth/AuthView.tsx): `src/components/auth/AuthView.tsx`
- [Onboarding](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/onboarding/OnboardingWizard.tsx): `src/components/onboarding/OnboardingWizard.tsx`
- [Dashboard](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/dashboard/DashboardView.tsx): `src/components/dashboard/DashboardView.tsx`
- [Profile](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/profile/ProfileView.tsx): `src/components/profile/ProfileView.tsx`
- [AI Mentor](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/mentor/MentorChatView.tsx): `src/components/mentor/MentorChatView.tsx`
- [Mentor Context](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/mentor/MentorContextDrawer.tsx): `src/components/mentor/MentorContextDrawer.tsx`

### Project Planning

- [Generate Ideas](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/GenerateIdeasView.tsx): `src/components/projects/GenerateIdeasView.tsx`
- [Ideas List](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/IdeasListView.tsx): `src/components/projects/IdeasListView.tsx`
- [Saved Ideas](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/SavedIdeasView.tsx): `src/components/projects/SavedIdeasView.tsx`
- [Compare Ideas](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/CompareView.tsx): `src/components/projects/CompareView.tsx`
- [Project Detail](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/ProjectDetailView.tsx): `src/components/projects/ProjectDetailView.tsx`
- [Blueprint](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/BlueprintView.tsx): `src/components/projects/BlueprintView.tsx`
- [Architecture](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/ArchitectureView.tsx): `src/components/projects/ArchitectureView.tsx`
- [Roadmap](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/RoadmapView.tsx): `src/components/projects/RoadmapView.tsx`
- [Task Tracker](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/projects/TasksView.tsx): `src/components/projects/TasksView.tsx`
- [Project Evaluator](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/tools/ProjectEvaluatorView.tsx): `src/components/tools/ProjectEvaluatorView.tsx`
- [Idea Improver](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/components/tools/ImproveIdeaView.tsx): `src/components/tools/ImproveIdeaView.tsx`

### AI Services

- [API Server](https://github.com/srishanthrasa/projectforge-ai/blob/main/server.ts): `server.ts`
- [AI Service Registry](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/services/index.ts): `src/lib/ai/services/index.ts`
- [ChatAnywhere Service](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/services/chatanywhere.ts): `src/lib/ai/services/chatanywhere.ts`
- [Prompt Definitions](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/prompts/index.ts): `src/lib/ai/prompts/index.ts`
- [AI Schemas](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/ai/schemas/index.ts): `src/lib/ai/schemas/index.ts`

### Identity and State

- [App Context](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`
- [Firebase Client](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/firebaseClient.ts): `src/lib/firebaseClient.ts`
- **Firebase Auth and Firestore**
- [Supabase Client](https://github.com/srishanthrasa/projectforge-ai/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`
- **Supabase Store**

### Other components

- **Student**

## Connections

- Student → Route App: uses workspace
- Route App → Sign In: routes to
- Route App → Onboarding: routes to
- Route App → Dashboard: routes to
- Route App → Generate Ideas: routes to
- Route App → Ideas List: routes to
- Route App → Saved Ideas: routes to
- Route App → Compare Ideas: routes to
- Route App → Project Detail: routes to
- Route App → Blueprint: routes to
- Route App → Architecture: routes to
- Route App → Roadmap: routes to
- Route App → Task Tracker: routes to
- Route App → Project Evaluator: routes to
- Route App → Idea Improver: routes to
- Route App → AI Mentor: routes to
- Route App → Profile: routes to
- Sign In → App Context: calls login
- Route App → App Context: reads state
- App Context → Firebase Client: calls auth and data
- Firebase Client → Firebase Auth and Firestore: reads and writes
- Supabase Client → Supabase Store: creates client for
- API Server → AI Service Registry: dispatches AI calls
- AI Service Registry → ChatAnywhere Service: exports service
- API Server → Student: serves AI responses
- Generate Ideas → API Server: requests ideas
- Blueprint → API Server: requests blueprint
- Architecture → API Server: requests architecture
- Roadmap → API Server: requests roadmap
- Project Evaluator → API Server: requests evaluation
- Idea Improver → API Server: requests improvement
- AI Mentor → API Server: requests mentor chat
- Mentor Context → App Context: reads project context
- AI Service Registry → Prompt Definitions: prompt wiring uncertain
- AI Service Registry → AI Schemas: schema wiring uncertain
