# codepath/pathreview-ai301-fa26-s3 architecture

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

- Interactive diagram: https://gitdiagram.com/codepath/pathreview-ai301-fa26-s3
- Repository: https://github.com/codepath/pathreview-ai301-fa26-s3

## Overview

PathReview lets developers submit portfolio material and receive structured review feedback through a web dashboard. The documented product spans profile ingestion, agent-assisted analysis, evidence-based RAG feedback, safety checks, and review history. The review service excerpt shows the processing sequence, but its agent, RAG, and safety implementations are placeholders; ingestion is implemented separately, and its connection to review processing is not confirmed in the excerpts. Dashed edges mark likely but unverified integration points.

Main entry points: [`core/services/review_service.py`](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/services/review_service.py) (Review workflow), [`frontend/src/App.tsx`](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/App.tsx) (Dashboard app), [`api/routes/reviews.py`](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/reviews.py) (Review routes), [`api/routes/profiles.py`](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/profiles.py) (Profile routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web dashboard"]
  node_webapp["Dashboard app<br/>[App.tsx]"]
  node_auth_ui["Auth state<br/>[AuthContext.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_review_ui["Review views<br/>[ReviewPage.tsx]"]
  node_history_ui["Review history"]
end

subgraph group_api["API and profiles"]
  node_api_app["REST application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_profile_routes["Profile routes<br/>[profiles.py]"]
  node_review_routes["Review routes<br/>[reviews.py]"]
  node_profile_service["Profile service<br/>[profile_service.py]"]
end

subgraph group_processing["Review processing"]
  node_review_service["Review workflow<br/>[review_service.py]"]
  node_ingestion["Source ingestion<br/>[pipeline.py]"]
  node_agent["Analysis agent<br/>[orchestrator.py]"]
  node_agent_tools["Analysis tools"]
  node_rag["RAG feedback"]
  node_safety["Safety checks"]
end

subgraph group_data["Persistence"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_models["User and portfolio records"]
  node_vector_store[("Vector store<br/>[vector_store.py]")]
end

node_developer(("Developer"))
node_github["GitHub"]
node_llm["AI model service"]

node_developer -->|"uses"| node_webapp
node_webapp -->|"uses"| node_auth_ui
node_webapp -->|"routes to"| node_review_ui
node_webapp -->|"routes to"| node_history_ui
node_review_ui -->|"requests status"| node_api_client
node_history_ui -->|"loads history"| node_api_client
node_api_client -.->|"calls API"| node_review_routes
node_api_app -->|"registers routes"| node_review_routes
node_api_app -->|"registers routes"| node_profile_routes
node_review_routes -->|"authenticates requests"| node_auth
node_review_routes -->|"creates and processes"| node_review_service
node_profile_routes -->|"authenticates requests"| node_auth
node_profile_routes -->|"delegates profile work"| node_profile_service
node_review_service -->|"queries and commits"| node_db_session
node_profile_service -.->|"persists profiles"| node_db_session
node_models -->|"uses ORM base"| node_db_session
node_review_service -.->|"ingests sources"| node_ingestion
node_ingestion -->|"stores embeddings"| node_vector_store
node_review_service -->|"orchestrates analysis"| node_agent
node_agent -.->|"dispatches tools"| node_agent_tools
node_review_service -->|"retrieves and generates"| node_rag
node_rag -.->|"retrieves evidence"| node_vector_store
node_review_service -->|"checks output"| node_safety
node_agent_tools -.->|"analyzes profile"| node_github
node_rag -.->|"generates feedback"| node_llm

click node_webapp "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/context/AuthContext.tsx"
click node_api_client "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/services/api.ts"
click node_review_ui "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/pages/ReviewPage.tsx"
click node_history_ui "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/pages/ReviewHistoryPage.tsx"
click node_api_app "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/main.py"
click node_auth "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/middleware/auth.py"
click node_profile_routes "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/profiles.py"
click node_review_routes "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/reviews.py"
click node_profile_service "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/services/profile_service.py"
click node_review_service "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/services/review_service.py"
click node_ingestion "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/ingestion/pipeline.py"
click node_agent "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/agent/orchestrator.py"
click node_agent_tools "https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/agent/tools"
click node_rag "https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/rag"
click node_safety "https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/safety"
click node_db_session "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/database.py"
click node_models "https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/core/models"
click node_vector_store "https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/rag/retriever/vector_store.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_webapp,node_auth_ui,node_api_client,node_review_ui,node_history_ui toneBlue
class node_api_app,node_auth,node_profile_routes,node_review_routes,node_profile_service toneAmber
class node_review_service,node_ingestion,node_agent,node_agent_tools,node_rag,node_safety toneMint
class node_db_session,node_models,node_vector_store toneRose
class node_developer,node_github,node_llm toneIndigo
```

## Components

### Web dashboard

- [Dashboard app](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Auth state](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Review views](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/pages/ReviewPage.tsx): `frontend/src/pages/ReviewPage.tsx`
- [Review history](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/frontend/src/pages/ReviewHistoryPage.tsx): `frontend/src/pages/ReviewHistoryPage.tsx`

### API and profiles

- [REST application](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/main.py): `api/main.py`
- [Authentication](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/middleware/auth.py): `api/middleware/auth.py`
- [Profile routes](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/profiles.py): `api/routes/profiles.py`
- [Review routes](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/api/routes/reviews.py): `api/routes/reviews.py`
- [Profile service](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/services/profile_service.py): `core/services/profile_service.py`

### Review processing

- [Review workflow](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/services/review_service.py): `core/services/review_service.py`
- [Source ingestion](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/ingestion/pipeline.py): `ingestion/pipeline.py`
- [Analysis agent](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/agent/orchestrator.py): `agent/orchestrator.py`
- [Analysis tools](https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/agent/tools): `agent/tools`
- [RAG feedback](https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/rag): `rag`
- [Safety checks](https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/safety): `safety`

### Persistence

- [Database sessions](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/core/database.py): `core/database.py`
- [User and portfolio records](https://github.com/codepath/pathreview-ai301-fa26-s3/tree/main/core/models): `core/models`
- [Vector store](https://github.com/codepath/pathreview-ai301-fa26-s3/blob/main/rag/retriever/vector_store.py): `rag/retriever/vector_store.py`

### Other components

- **Developer**
- **GitHub**
- **AI model service**

## Connections

- Developer → Dashboard app: uses
- Dashboard app → Auth state: uses (evidence: `frontend/src/App.tsx`)
- Dashboard app → Review views: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard app → Review history: routes to (evidence: `frontend/src/App.tsx`)
- Review views → API client: requests status (evidence: `frontend/src/pages/ReviewPage.tsx`)
- Review history → API client: loads history (evidence: `frontend/src/pages/ReviewHistoryPage.tsx`)
- API client → Review routes: calls API
- REST application → Review routes: registers routes (evidence: `api/main.py`)
- REST application → Profile routes: registers routes (evidence: `api/main.py`)
- Review routes → Authentication: authenticates requests (evidence: `api/routes/reviews.py`)
- Review routes → Review workflow: creates and processes (evidence: `api/routes/reviews.py`)
- Profile routes → Authentication: authenticates requests (evidence: `api/routes/profiles.py`)
- Profile routes → Profile service: delegates profile work (evidence: `api/routes/profiles.py`)
- Review workflow → Database sessions: queries and commits (evidence: `core/services/review_service.py`)
- Profile service → Database sessions: persists profiles
- User and portfolio records → Database sessions: uses ORM base (evidence: `core/models/profile.py`)
- Review workflow → Source ingestion: ingests sources
- Source ingestion → Vector store: stores embeddings (evidence: `ingestion/pipeline.py`)
- Review workflow → Analysis agent: orchestrates analysis (evidence: `core/services/review_service.py`)
- Analysis agent → Analysis tools: dispatches tools
- Review workflow → RAG feedback: retrieves and generates (evidence: `core/services/review_service.py`)
- RAG feedback → Vector store: retrieves evidence
- Review workflow → Safety checks: checks output (evidence: `core/services/review_service.py`)
- Analysis tools → GitHub: analyzes profile
- RAG feedback → AI model service: generates feedback
