# talipottech/examforgeapp architecture

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

- Interactive diagram: https://gitdiagram.com/talipottech/examforgeapp
- Repository: https://github.com/talipottech/examforgeapp

## Overview

ExamForge is an AI-powered preparation platform for Indian competitive examinations. The learner workflow spans exam and topic discovery, learning and practice, and reviewing results; the repository also includes content ingestion and generation, creator/marketplace features, and live classrooms. The graph preserves those product branches while showing only relationships supported by the README or supplied source references. Several feature modules were not sampled, so their internal calls and some frontend-to-backend links are intentionally omitted or marked unverified.

Main entry points: [`apps/web/src/app/(dashboard)`](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)) (Learner web app), [`apps/api/src/workers/portal-ingestion-worker.ts`](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/portal-ingestion-worker.ts) (Portal crawler worker), [`apps/api/src/workers/content-embedding-worker.ts`](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/content-embedding-worker.ts) (Embedding worker), [`apps/api/src/index.ts`](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/index.ts) (API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learner["Learner experience"]
  node_learner_web["Learner web app"]
  node_exam_ui["Exam practice"]
  node_learn_ui["Learning paths"]
  node_search_ui["Topic search"]
end

subgraph group_content["Exam content"]
  node_search_service["Content search"]
  node_portal_router["Portal ingestion"]
  node_ingestion_queue["Ingestion queue"]
  node_ingestion_worker["Portal crawler worker"]
  node_crawler["Portal crawler<br/>[portal-crawler.ts]"]
  node_generation_ui["Question generation<br/>[page.tsx]"]
  node_embedding_queue["Embedding queue"]
  node_embedding_worker["Embedding worker"]
  node_embedding_service["Content embeddings"]
end

subgraph group_ai["AI services"]
  node_generation_api["Generation endpoint<br/>[route.ts]"]
  node_ai_router["AI routing<br/>[ai-router.ts]"]
  node_ai_providers["AI providers<br/>[providers.ts]"]
end

subgraph group_creator["Creator ecosystem"]
  node_creator_ui["Creator workspace"]
  node_creator_upload["Content upload<br/>[route.ts]"]
  node_marketplace_router["Marketplace APIs<br/>[marketplace.ts]"]
  node_live_router["Live sessions<br/>[live-session.ts]"]
end

subgraph group_platform["API and data"]
  node_exam_router["Exam APIs<br/>[exam-session.ts]"]
  node_learn_router["Learning APIs<br/>[learning-path.ts]"]
  node_api_entry["API server<br/>[index.ts]"]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis<br/>[redis.ts]")]
end

node_learner(("Learner"))
node_creator(("Creator"))

node_learner -.->|"uses"| node_learner_web
node_learner_web -.->|"opens"| node_exam_ui
node_learner_web -.->|"opens"| node_learn_ui
node_learner_web -.->|"opens"| node_search_ui
node_learner_web -.->|"requests"| node_exam_router
node_learner_web -.->|"requests"| node_learn_router
node_search_ui -.->|"searches"| node_search_service
node_search_service -->|"parses queries"| node_ai_router
node_portal_router -->|"enqueues jobs"| node_ingestion_queue
node_ingestion_worker -->|"consumes jobs"| node_ingestion_queue
node_ingestion_worker -->|"crawls pages"| node_crawler
node_generation_ui -.->|"submits generation"| node_generation_api
node_generation_api -->|"selects provider"| node_ai_providers
node_embedding_worker -->|"consumes jobs"| node_embedding_queue
node_embedding_worker -->|"creates embeddings"| node_embedding_service
node_creator -.->|"uses"| node_creator_ui
node_creator_ui -.->|"uploads content"| node_creator_upload
node_creator_upload -.->|"queues OCR"| node_redis
node_api_entry -.->|"accesses data"| node_postgres
node_api_entry -.->|"uses"| node_redis

click node_learner_web "https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)"
click node_exam_ui "https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(exam)"
click node_learn_ui "https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)/learn"
click node_search_ui "https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)/dashboard/search"
click node_exam_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/exam-session.ts"
click node_learn_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/learning-path.ts"
click node_search_service "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/content-search-engine.ts"
click node_portal_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/portal-ingestion.ts"
click node_ingestion_queue "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/queues/portal-ingestion-queue.ts"
click node_ingestion_worker "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/portal-ingestion-worker.ts"
click node_crawler "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/portal-crawler.ts"
click node_generation_ui "https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/(dashboard)/generate/page.tsx"
click node_generation_api "https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/api/ai/generate/route.ts"
click node_ai_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/ai/ai-router.ts"
click node_ai_providers "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/ai/providers.ts"
click node_embedding_queue "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/queues/content-embedding-queue.ts"
click node_embedding_worker "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/content-embedding-worker.ts"
click node_embedding_service "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/content-embedding.ts"
click node_creator_ui "https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/creator"
click node_creator_upload "https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/api/creator-content/upload/route.ts"
click node_marketplace_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/marketplace.ts"
click node_live_router "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/live-session.ts"
click node_api_entry "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/index.ts"
click node_redis "https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/lib/redis.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_learner_web,node_exam_ui,node_learn_ui,node_search_ui toneBlue
class node_search_service,node_portal_router,node_ingestion_queue,node_ingestion_worker,node_crawler,node_generation_ui,node_embedding_queue,node_embedding_worker,node_embedding_service toneAmber
class node_generation_api,node_ai_router,node_ai_providers toneMint
class node_creator_ui,node_creator_upload,node_marketplace_router,node_live_router toneRose
class node_exam_router,node_learn_router,node_api_entry,node_postgres,node_redis,node_learner,node_creator toneIndigo
```

## Components

### Learner experience

- [Learner web app](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)): `apps/web/src/app/(dashboard)`
- [Exam practice](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(exam)): `apps/web/src/app/(exam)`
- [Learning paths](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)/learn): `apps/web/src/app/(dashboard)/learn`
- [Topic search](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/(dashboard)/dashboard/search): `apps/web/src/app/(dashboard)/dashboard/search`

### Exam content

- [Content search](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/content-search-engine.ts): `apps/api/src/services/content-search-engine.ts`
- [Portal ingestion](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/portal-ingestion.ts): `apps/api/src/trpc/routers/portal-ingestion.ts`
- [Ingestion queue](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/queues/portal-ingestion-queue.ts): `apps/api/src/queues/portal-ingestion-queue.ts`
- [Portal crawler worker](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/portal-ingestion-worker.ts): `apps/api/src/workers/portal-ingestion-worker.ts`
- [Portal crawler](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/portal-crawler.ts): `apps/api/src/services/portal-crawler.ts`
- [Question generation](https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/(dashboard)/generate/page.tsx): `apps/web/src/app/(dashboard)/generate/page.tsx`
- [Embedding queue](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/queues/content-embedding-queue.ts): `apps/api/src/queues/content-embedding-queue.ts`
- [Embedding worker](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/workers/content-embedding-worker.ts): `apps/api/src/workers/content-embedding-worker.ts`
- [Content embeddings](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/services/content-embedding.ts): `apps/api/src/services/content-embedding.ts`

### AI services

- [Generation endpoint](https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/api/ai/generate/route.ts): `apps/web/src/app/api/ai/generate/route.ts`
- [AI routing](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/ai/ai-router.ts): `apps/api/src/ai/ai-router.ts`
- [AI providers](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/ai/providers.ts): `apps/api/src/ai/providers.ts`

### Creator ecosystem

- [Creator workspace](https://github.com/talipottech/examforgeapp/tree/main/apps/web/src/app/creator): `apps/web/src/app/creator`
- [Content upload](https://github.com/talipottech/examforgeapp/blob/main/apps/web/src/app/api/creator-content/upload/route.ts): `apps/web/src/app/api/creator-content/upload/route.ts`
- [Marketplace APIs](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/marketplace.ts): `apps/api/src/trpc/routers/marketplace.ts`
- [Live sessions](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/live-session.ts): `apps/api/src/trpc/routers/live-session.ts`

### API and data

- [Exam APIs](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/exam-session.ts): `apps/api/src/trpc/routers/exam-session.ts`
- [Learning APIs](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/trpc/routers/learning-path.ts): `apps/api/src/trpc/routers/learning-path.ts`
- [API server](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- **PostgreSQL**
- [Redis](https://github.com/talipottech/examforgeapp/blob/main/apps/api/src/lib/redis.ts): `apps/api/src/lib/redis.ts`

### Other components

- **Learner**
- **Creator**

## Connections

- Learner → Learner web app: uses
- Learner web app → Exam practice: opens
- Learner web app → Learning paths: opens
- Learner web app → Topic search: opens
- Learner web app → Exam APIs: requests
- Learner web app → Learning APIs: requests
- Topic search → Content search: searches
- Content search → AI routing: parses queries (evidence: `apps/api/src/services/content-search-engine.ts`)
- Portal ingestion → Ingestion queue: enqueues jobs (evidence: `apps/api/src/trpc/routers/portal-ingestion.ts`)
- Portal crawler worker → Ingestion queue: consumes jobs (evidence: `apps/api/src/workers/portal-ingestion-worker.ts`)
- Portal crawler worker → Portal crawler: crawls pages (evidence: `apps/api/src/workers/portal-ingestion-worker.ts`)
- Question generation → Generation endpoint: submits generation
- Generation endpoint → AI providers: selects provider (evidence: `apps/web/src/app/api/ai/generate/route.ts`)
- Embedding worker → Embedding queue: consumes jobs (evidence: `apps/api/src/workers/content-embedding-worker.ts`)
- Embedding worker → Content embeddings: creates embeddings (evidence: `apps/api/src/workers/content-embedding-worker.ts`)
- Creator → Creator workspace: uses
- Creator workspace → Content upload: uploads content
- Content upload → Redis: queues OCR
- API server → PostgreSQL: accesses data
- API server → Redis: uses
