# charan-sandeep/geteasy architecture

> Architecture diagram of the GitHub repository charan-sandeep/geteasy, 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/charan-sandeep/geteasy
- Repository: https://github.com/charan-sandeep/geteasy

## Overview

Subject Guide is a subject-scoped study assistant: learners create a course workspace, upload and categorize materials, then ask grounded questions or solve question banks using those materials. Uploads are extracted, chunked, indexed, and used to refresh topic relationships and question-topic links; queries retrieve subject-scoped evidence before generating cited answers. The README also documents subject analytics and prerequisite suggestions. The tree and sampled code support the upload and query wiring; several subject-management and vector-store internals were not sampled, so their internal calls are not expanded.

Main entry points: [`backend/app/routers/documents.py`](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/documents.py) (Document routes), [`backend/app/routers/query.py`](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/query.py) (Query routes), [`backend/app/database.py`](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/database.py) (Database session), [`backend/app/main.py`](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/main.py) (API entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learner experience"]
  node_frontend["Study interface<br/>[page.js]"]
end

subgraph group_api["API and domain"]
  node_api_entry["API entry<br/>[main.py]"]
  node_auth_routes["Account routes<br/>[auth.py]"]
  node_subject_routes["Subject routes<br/>[subjects.py]"]
  node_document_routes["Document routes<br/>[documents.py]"]
  node_query_routes["Query routes<br/>[query.py]"]
  node_auth_service["Identity checks<br/>[auth_service.py]"]
end

subgraph group_knowledge["Study knowledge"]
  node_document_processing["Document processing"]
  node_vector_service["Vector retrieval<br/>[vector_store.py]"]
  node_topic_service["Topic mapping<br/>[topic_service.py]"]
  node_answer_service["Answer generation<br/>[llm_service.py]"]
end

subgraph group_integrations["Persistence and model"]
  node_relational_data[("Relational data<br/>[models.py]")]
  node_database_config["Database session<br/>[database.py]"]
  node_postgres[("PostgreSQL")]
  node_chroma[("ChromaDB")]
  node_groq["Groq"]
end

node_student(("Learner"))

node_student -->|"uses"| node_frontend
node_frontend -->|"sends requests"| node_api_entry
node_api_entry -->|"dispatches"| node_auth_routes
node_api_entry -->|"dispatches"| node_subject_routes
node_api_entry -->|"dispatches"| node_document_routes
node_api_entry -->|"dispatches"| node_query_routes
node_auth_routes -->|"hashes credentials"| node_auth_service
node_auth_service -->|"queries users"| node_database_config
node_subject_routes -->|"checks ownership"| node_auth_service
node_document_routes -->|"checks ownership"| node_auth_service
node_query_routes -->|"checks ownership"| node_auth_service
node_auth_routes -->|"stores accounts"| node_database_config
node_subject_routes -->|"manages subjects"| node_database_config
node_document_routes -->|"manages metadata"| node_database_config
node_query_routes -->|"reads topics"| node_database_config
node_database_config -->|"connects"| node_postgres
node_document_routes -->|"extracts and chunks"| node_document_processing
node_document_routes -->|"indexes chunks"| node_vector_service
node_document_routes -->|"refreshes mappings"| node_topic_service
node_document_routes -->|"stores chunk records"| node_database_config
node_vector_service -->|"stores and retrieves"| node_chroma
node_topic_service -->|"persists topic links"| node_database_config
node_query_routes -->|"retrieves evidence"| node_vector_service
node_query_routes -->|"finds prerequisites"| node_topic_service
node_query_routes -->|"generates answers"| node_answer_service
node_query_routes -->|"extracts questions"| node_document_processing
node_answer_service -->|"requests completion"| node_groq

click node_frontend "https://github.com/charan-sandeep/geteasy/blob/main/frontend/app/page.js"
click node_api_entry "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/auth.py"
click node_subject_routes "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/subjects.py"
click node_document_routes "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/documents.py"
click node_query_routes "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/query.py"
click node_auth_service "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/auth_service.py"
click node_document_processing "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/document_processor.py"
click node_vector_service "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/vector_store.py"
click node_topic_service "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/topic_service.py"
click node_answer_service "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/llm_service.py"
click node_relational_data "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/models/models.py"
click node_database_config "https://github.com/charan-sandeep/geteasy/blob/main/backend/app/database.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_frontend toneBlue
class node_api_entry,node_auth_routes,node_subject_routes,node_document_routes,node_query_routes,node_auth_service toneAmber
class node_document_processing,node_vector_service,node_topic_service,node_answer_service toneMint
class node_relational_data,node_database_config,node_postgres,node_chroma,node_groq toneRose
class node_student toneIndigo
```

## Components

### Learner experience

- [Study interface](https://github.com/charan-sandeep/geteasy/blob/main/frontend/app/page.js): `frontend/app/page.js`

### API and domain

- [API entry](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/main.py): `backend/app/main.py`
- [Account routes](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Subject routes](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/subjects.py): `backend/app/routers/subjects.py`
- [Document routes](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/documents.py): `backend/app/routers/documents.py`
- [Query routes](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/routers/query.py): `backend/app/routers/query.py`
- [Identity checks](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`

### Study knowledge

- [Document processing](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/document_processor.py): `backend/app/services/document_processor.py`
- [Vector retrieval](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/vector_store.py): `backend/app/services/vector_store.py`
- [Topic mapping](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/topic_service.py): `backend/app/services/topic_service.py`
- [Answer generation](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/services/llm_service.py): `backend/app/services/llm_service.py`

### Persistence and model

- [Relational data](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- [Database session](https://github.com/charan-sandeep/geteasy/blob/main/backend/app/database.py): `backend/app/database.py`
- **PostgreSQL**
- **ChromaDB**
- **Groq**

### Other components

- **Learner**

## Connections

- Learner → Study interface: uses
- Study interface → API entry: sends requests
- API entry → Account routes: dispatches
- API entry → Subject routes: dispatches
- API entry → Document routes: dispatches
- API entry → Query routes: dispatches
- Account routes → Identity checks: hashes credentials
- Identity checks → Database session: queries users
- Subject routes → Identity checks: checks ownership
- Document routes → Identity checks: checks ownership
- Query routes → Identity checks: checks ownership
- Account routes → Database session: stores accounts
- Subject routes → Database session: manages subjects
- Document routes → Database session: manages metadata
- Query routes → Database session: reads topics
- Database session → PostgreSQL: connects
- Document routes → Document processing: extracts and chunks
- Document routes → Vector retrieval: indexes chunks
- Document routes → Topic mapping: refreshes mappings
- Document routes → Database session: stores chunk records
- Vector retrieval → ChromaDB: stores and retrieves
- Topic mapping → Database session: persists topic links
- Query routes → Vector retrieval: retrieves evidence
- Query routes → Topic mapping: finds prerequisites
- Query routes → Answer generation: generates answers
- Query routes → Document processing: extracts questions
- Answer generation → Groq: requests completion
