# dileepbommali16-ops/pathfinder architecture

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

- Interactive diagram: https://gitdiagram.com/dileepbommali16-ops/pathfinder
- Repository: https://github.com/dileepbommali16-ops/pathfinder

## Overview

Pathfinder combines placement-readiness guidance, cohort analytics, career-coaching tools, and web interfaces. The README also describes an Android app with local assessment history and CSV sharing, but no Android source is present in the supplied tree, so those implementation details are not mapped as code components. The graph captures relationships visible in excerpts, the source index, or README; the separate Streamlit, Python backend, and TypeScript server are not assumed to call one another without evidence.

Main entry points: [`backend/api.py`](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/api.py) (Placement API), [`server/routers.ts`](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/routers.ts) (Web API routes), [`backend/ml_engine.py`](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/ml_engine.py) (Readiness prediction), [`backend/gemini_engine.py`](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/gemini_engine.py) (AI coach engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_streamlit["Streamlit agent<br/>[app.py]"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_home["Career dashboard<br/>[Home.tsx]"]
end

subgraph group_placement["Placement services"]
  node_pythonapi["Placement API<br/>[api.py]"]
  node_prediction["Readiness prediction<br/>[ml_engine.py]"]
  node_analytics["Cohort analytics"]
  node_data_service["Placement data service<br/>[data_service.py]"]
  node_coach["AI coach engine<br/>[gemini_engine.py]"]
  node_pdf["PDF reports<br/>[pdf_engine.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_backend_oauth["Backend OAuth<br/>[oauth.py]"]
end

subgraph group_webservices["Web services"]
  node_server["Express API host<br/>[index.ts]"]
  node_routers["Web API routes<br/>[routers.ts]"]
  node_news["Industry news<br/>[newsService.ts]"]
  node_llm["LLM client<br/>[llm.ts]"]
  node_oauth["OAuth routes<br/>[oauth.ts]"]
end

subgraph group_persistence["Data and persistence"]
  node_dbaccess["Database access<br/>[db.ts]"]
  node_schema[("Web data schema<br/>[schema.ts]")]
  node_sqlite[("Android local history")]
end

subgraph group_integrations["External integrations"]
  node_gemini["Gemini provider"]
  node_openrouter["OpenRouter fallback"]
end

node_student(("Student"))

node_student -->|"starts chat"| node_streamlit
node_student -->|"opens dashboard"| node_webapp
node_webapp -->|"routes to"| node_home
node_pythonapi -->|"uses prediction"| node_prediction
node_pythonapi -->|"uses analytics"| node_analytics
node_pythonapi -->|"uses data service"| node_data_service
node_pythonapi -->|"uses coach"| node_coach
node_pythonapi -->|"uses reports"| node_pdf
node_pythonapi -->|"uses models"| node_models
node_pythonapi -->|"uses OAuth"| node_backend_oauth
node_prediction -->|"loads placement data"| node_data_service
node_prediction -->|"uses profile models"| node_models
node_coach -->|"queries cohort data"| node_data_service
node_coach -->|"uses chat models"| node_models
node_server -->|"mounts routes"| node_routers
node_server -->|"registers OAuth"| node_oauth
node_routers -->|"invokes LLM"| node_llm
node_routers -->|"fetches news"| node_news
node_routers -->|"reads and writes"| node_dbaccess
node_news -->|"summarizes trends"| node_llm
node_dbaccess -->|"uses schema"| node_schema
node_gemini -.->|"model provider"| node_streamlit
node_openrouter -.->|"fallback provider"| node_streamlit
node_sqlite -.->|"stores assessment history"| node_student

click node_streamlit "https://github.com/dileepbommali16-ops/pathfinder/blob/main/app.py"
click node_webapp "https://github.com/dileepbommali16-ops/pathfinder/blob/main/client/src/App.tsx"
click node_home "https://github.com/dileepbommali16-ops/pathfinder/blob/main/client/src/pages/Home.tsx"
click node_pythonapi "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/api.py"
click node_prediction "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/ml_engine.py"
click node_analytics "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/analytics_engine.py"
click node_data_service "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/data_service.py"
click node_coach "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/gemini_engine.py"
click node_pdf "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/pdf_engine.py"
click node_models "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/models.py"
click node_server "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/index.ts"
click node_routers "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/routers.ts"
click node_news "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/newsService.ts"
click node_llm "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/llm.ts"
click node_dbaccess "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/db.ts"
click node_schema "https://github.com/dileepbommali16-ops/pathfinder/blob/main/drizzle/schema.ts"
click node_oauth "https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/oauth.ts"
click node_backend_oauth "https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/oauth.py"

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_streamlit,node_webapp,node_home toneBlue
class node_pythonapi,node_prediction,node_analytics,node_data_service,node_coach,node_pdf,node_models,node_backend_oauth toneAmber
class node_server,node_routers,node_news,node_llm,node_oauth toneMint
class node_dbaccess,node_schema,node_sqlite toneRose
class node_gemini,node_openrouter,node_student toneIndigo
```

## Components

### User interfaces

- [Streamlit agent](https://github.com/dileepbommali16-ops/pathfinder/blob/main/app.py): `app.py`
- [Web application](https://github.com/dileepbommali16-ops/pathfinder/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Career dashboard](https://github.com/dileepbommali16-ops/pathfinder/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`

### Placement services

- [Placement API](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/api.py): `backend/api.py`
- [Readiness prediction](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/ml_engine.py): `backend/ml_engine.py`
- [Cohort analytics](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/analytics_engine.py): `backend/analytics_engine.py`
- [Placement data service](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/data_service.py): `backend/data_service.py`
- [AI coach engine](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/gemini_engine.py): `backend/gemini_engine.py`
- [PDF reports](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/pdf_engine.py): `backend/pdf_engine.py`
- [Domain models](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/models.py): `backend/models.py`
- [Backend OAuth](https://github.com/dileepbommali16-ops/pathfinder/blob/main/backend/oauth.py): `backend/oauth.py`

### Web services

- [Express API host](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/index.ts): `server/_core/index.ts`
- [Web API routes](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/routers.ts): `server/routers.ts`
- [Industry news](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/newsService.ts): `server/newsService.ts`
- [LLM client](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/llm.ts): `server/_core/llm.ts`
- [OAuth routes](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/_core/oauth.ts): `server/_core/oauth.ts`

### Data and persistence

- [Database access](https://github.com/dileepbommali16-ops/pathfinder/blob/main/server/db.ts): `server/db.ts`
- [Web data schema](https://github.com/dileepbommali16-ops/pathfinder/blob/main/drizzle/schema.ts): `drizzle/schema.ts`
- **Android local history**

### External integrations

- **Gemini provider**
- **OpenRouter fallback**

### Other components

- **Student**

## Connections

- Student → Streamlit agent: starts chat
- Student → Web application: opens dashboard (evidence: `client/src/App.tsx`)
- Web application → Career dashboard: routes to (evidence: `client/src/App.tsx`)
- Placement API → Readiness prediction: uses prediction (evidence: `backend/api.py`)
- Placement API → Cohort analytics: uses analytics (evidence: `backend/api.py`)
- Placement API → Placement data service: uses data service (evidence: `backend/api.py`)
- Placement API → AI coach engine: uses coach (evidence: `backend/api.py`)
- Placement API → PDF reports: uses reports (evidence: `backend/api.py`)
- Placement API → Domain models: uses models (evidence: `backend/api.py`)
- Placement API → Backend OAuth: uses OAuth (evidence: `backend/api.py`)
- Readiness prediction → Placement data service: loads placement data (evidence: `backend/ml_engine.py`)
- Readiness prediction → Domain models: uses profile models (evidence: `backend/ml_engine.py`)
- AI coach engine → Placement data service: queries cohort data (evidence: `backend/gemini_engine.py`)
- AI coach engine → Domain models: uses chat models (evidence: `backend/gemini_engine.py`)
- Express API host → Web API routes: mounts routes (evidence: `server/_core/index.ts`)
- Express API host → OAuth routes: registers OAuth (evidence: `server/_core/index.ts`)
- Web API routes → LLM client: invokes LLM (evidence: `server/routers.ts`)
- Web API routes → Industry news: fetches news (evidence: `server/routers.ts`)
- Web API routes → Database access: reads and writes (evidence: `server/routers.ts`)
- Industry news → LLM client: summarizes trends (evidence: `server/newsService.ts`)
- Database access → Web data schema: uses schema (evidence: `server/db.ts`)
- Gemini provider → Streamlit agent: model provider
- OpenRouter fallback → Streamlit agent: fallback provider
- Android local history → Student: stores assessment history
