# dhakshesh-48/se-project architecture

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

- Interactive diagram: https://gitdiagram.com/dhakshesh-48/se-project
- Repository: https://github.com/dhakshesh-48/se-project

## Overview

ReqMind is a local financial requirements-engineering app. Stakeholders provide project context through an adaptive interview and optional source uploads; the API masks, extracts, chunks, and indexes those sources, then retrieves evidence for cited draft requirements. Users inspect evidence, review quality findings, and set approval statuses before requesting an SDLC recommendation or exporting the audit trail. The map distinguishes the API orchestrator from processing and analysis services. README capabilities are included, but some main.py wiring is inferred from documented endpoints because its excerpt omits lines.

Main entry points: [`app/main.py`](https://github.com/dhakshesh-48/se-project/blob/main/app/main.py) (API orchestration), [`app/static/app.js`](https://github.com/dhakshesh-48/se-project/blob/main/app/static/app.js) (ReqMind UI), [`app/services/rag.py`](https://github.com/dhakshesh-48/se-project/blob/main/app/services/rag.py) (Semantic retrieval), [`app/services/llm.py`](https://github.com/dhakshesh-48/se-project/blob/main/app/services/llm.py) (LLM generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["ReqMind UI<br/>[app.js]"]
  node_page["App page<br/>[index.html]"]
  node_api["API orchestration<br/>[main.py]"]
end

subgraph group_evidence["Evidence pipeline"]
  node_documents["Document processing<br/>[documents.py]"]
  node_vector["Semantic retrieval<br/>[rag.py]"]
  node_chromadb[("ChromaDB")]
end

subgraph group_analysis["Requirements analysis"]
  node_llm["LLM generation<br/>[llm.py]"]
  node_generation_prompt["Generation prompt"]
  node_drafts["Evidence-only drafts<br/>[generator.py]"]
  node_quality["Quality analysis<br/>[quality.py]"]
  node_approval["Requirement review<br/>[main.py]"]
  node_sdlc["SDLC recommendation<br/>[sdlc.py]"]
end

subgraph group_project["Project records"]
  node_schemas["Domain schemas<br/>[schemas.py]"]
  node_storage[("Project storage<br/>[storage.py]")]
  node_audit_export["Audit and export<br/>[main.py]"]
end

node_stakeholder(("Stakeholder"))
node_embedding_provider["Embedding API"]

node_stakeholder -->|"provides context"| node_web
node_page -->|"renders"| node_web
node_web -->|"calls API"| node_api
node_api -->|"extracts, masks, chunks"| node_documents
node_api -->|"indexes sources"| node_vector
node_vector -.->|"requests embeddings"| node_embedding_provider
node_vector -->|"indexes and queries"| node_chromadb
node_api -->|"loads and saves"| node_storage
node_api -->|"retrieves evidence"| node_vector
node_api -.->|"generates drafts"| node_llm
node_llm -->|"reads template"| node_generation_prompt
node_llm -.->|"requests generation"| node_embedding_provider
node_api -->|"creates fallback drafts"| node_drafts
node_api -->|"checks requirements"| node_quality
node_api -->|"records decision"| node_approval
node_web -->|"submits review"| node_approval
node_api -->|"scores requirements"| node_sdlc
node_api -->|"requests export"| node_audit_export
node_audit_export -->|"loads project"| node_storage
node_api -->|"validates project data"| node_schemas

click node_web "https://github.com/dhakshesh-48/se-project/blob/main/app/static/app.js"
click node_page "https://github.com/dhakshesh-48/se-project/blob/main/app/templates/index.html"
click node_api "https://github.com/dhakshesh-48/se-project/blob/main/app/main.py"
click node_documents "https://github.com/dhakshesh-48/se-project/blob/main/app/services/documents.py"
click node_vector "https://github.com/dhakshesh-48/se-project/blob/main/app/services/rag.py"
click node_llm "https://github.com/dhakshesh-48/se-project/blob/main/app/services/llm.py"
click node_generation_prompt "https://github.com/dhakshesh-48/se-project/blob/main/app/prompts/requirement_generation.txt"
click node_drafts "https://github.com/dhakshesh-48/se-project/blob/main/app/services/generator.py"
click node_quality "https://github.com/dhakshesh-48/se-project/blob/main/app/services/quality.py"
click node_approval "https://github.com/dhakshesh-48/se-project/blob/main/app/main.py"
click node_sdlc "https://github.com/dhakshesh-48/se-project/blob/main/app/services/sdlc.py"
click node_schemas "https://github.com/dhakshesh-48/se-project/blob/main/app/schemas.py"
click node_storage "https://github.com/dhakshesh-48/se-project/blob/main/app/services/storage.py"
click node_audit_export "https://github.com/dhakshesh-48/se-project/blob/main/app/main.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_web,node_page,node_api toneBlue
class node_documents,node_vector,node_chromadb toneAmber
class node_llm,node_generation_prompt,node_drafts,node_quality,node_approval,node_sdlc,node_embedding_provider toneMint
class node_schemas,node_storage,node_audit_export toneRose
class node_stakeholder toneIndigo
```

## Components

### User experience

- [ReqMind UI](https://github.com/dhakshesh-48/se-project/blob/main/app/static/app.js): `app/static/app.js`
- [App page](https://github.com/dhakshesh-48/se-project/blob/main/app/templates/index.html): `app/templates/index.html`
- [API orchestration](https://github.com/dhakshesh-48/se-project/blob/main/app/main.py): `app/main.py`

### Evidence pipeline

- [Document processing](https://github.com/dhakshesh-48/se-project/blob/main/app/services/documents.py): `app/services/documents.py`
- [Semantic retrieval](https://github.com/dhakshesh-48/se-project/blob/main/app/services/rag.py): `app/services/rag.py`
- **ChromaDB**

### Requirements analysis

- [LLM generation](https://github.com/dhakshesh-48/se-project/blob/main/app/services/llm.py): `app/services/llm.py`
- [Generation prompt](https://github.com/dhakshesh-48/se-project/blob/main/app/prompts/requirement_generation.txt): `app/prompts/requirement_generation.txt`
- [Evidence-only drafts](https://github.com/dhakshesh-48/se-project/blob/main/app/services/generator.py): `app/services/generator.py`
- [Quality analysis](https://github.com/dhakshesh-48/se-project/blob/main/app/services/quality.py): `app/services/quality.py`
- [Requirement review](https://github.com/dhakshesh-48/se-project/blob/main/app/main.py): `app/main.py`
- [SDLC recommendation](https://github.com/dhakshesh-48/se-project/blob/main/app/services/sdlc.py): `app/services/sdlc.py`

### Project records

- [Domain schemas](https://github.com/dhakshesh-48/se-project/blob/main/app/schemas.py): `app/schemas.py`
- [Project storage](https://github.com/dhakshesh-48/se-project/blob/main/app/services/storage.py): `app/services/storage.py`
- [Audit and export](https://github.com/dhakshesh-48/se-project/blob/main/app/main.py): `app/main.py`

### Other components

- **Stakeholder**
- **Embedding API**

## Connections

- Stakeholder → ReqMind UI: provides context
- App page → ReqMind UI: renders
- ReqMind UI → API orchestration: calls API
- API orchestration → Document processing: extracts, masks, chunks
- API orchestration → Semantic retrieval: indexes sources
- Semantic retrieval → Embedding API: requests embeddings
- Semantic retrieval → ChromaDB: indexes and queries
- API orchestration → Project storage: loads and saves
- API orchestration → Semantic retrieval: retrieves evidence
- API orchestration → LLM generation: generates drafts
- LLM generation → Generation prompt: reads template
- LLM generation → Embedding API: requests generation
- API orchestration → Evidence-only drafts: creates fallback drafts
- API orchestration → Quality analysis: checks requirements
- API orchestration → Requirement review: records decision
- ReqMind UI → Requirement review: submits review
- API orchestration → SDLC recommendation: scores requirements
- API orchestration → Audit and export: requests export
- Audit and export → Project storage: loads project
- API orchestration → Domain schemas: validates project data
