# kogulanathan69/mypersonal_full-backend-work architecture

> Architecture diagram of the GitHub repository kogulanathan69/mypersonal_full-backend-work, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kogulanathan69/mypersonal_full-backend-work
- Repository: https://github.com/kogulanathan69/mypersonal_full-backend-work

## Overview

BuildMind is a preliminary 2D residential-planning backend: API workflows collect land, survey and home requirements, generate feasible plan alternatives, support validated edits and confirmation, and produce preliminary reports. The repository also includes private Python geometry/survey services and a regulation-evidence retrieval service. The README describes the intended MVP, while its state note says the deployed API currently exposes only health and several feature routes are not yet wired. Edges below are limited to relationships explicit in the excerpts, SOURCE INDEX, or README; many unsampled API and persistence connections are therefore omitted.

Main entry points: [`src/BuildMind.API/Program.cs`](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.API/Program.cs) (ASP.NET API), [`src/BuildMind.Application/Features/Auth/Services/AuthenticationService.cs`](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Auth/Services/AuthenticationService.cs) (Authentication), [`src/BuildMind.Application/Features/Survey/Services/SurveyUploadService.cs`](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Survey/Services/SurveyUploadService.cs) (Survey intake), [`rag-service/app/engine.py`](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/app/engine.py) (Retrieval engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and identity"]
  node_api["ASP.NET API<br/>[Program.cs]"]
  node_auth["Authentication"]
  node_sessions["Session lifecycle<br/>[SessionService.cs]"]
end

subgraph group_planning["Planning workflow"]
  node_survey["Survey intake"]
  node_generation["Plan generation<br/>[engine.py]"]
  node_editing["Plan editing<br/>[engine.py]"]
  node_preview["Candidate preview"]
  node_editassist["AI edit orchestration"]
  node_confirmation["Plan confirmation"]
  node_reports["Preliminary reports"]
end

subgraph group_python["Python geometry and survey"]
  node_surveyextract["Survey extraction"]
  node_land["Land validation<br/>[validation.py]"]
  node_footprint["Footprint feasibility<br/>[feasibility.py]"]
end

subgraph group_regulations["Regulatory evidence"]
  node_ragapi["RAG service API<br/>[main.py]"]
  node_ragengine["Retrieval engine<br/>[engine.py]"]
  node_retrieval["Evidence retrieval<br/>[service.py]"]
end

subgraph group_infrastructure["Persistence and integrations"]
  node_surveyfiles["Survey storage"]
  node_ragclient["RAG client"]
  node_constraintsclient["Constraint client"]
  node_database[("MySQL persistence")]
end

node_user(("User"))
node_external[("Regulatory corpus")]

node_user -.->|"submits requests"| node_api
node_api -.->|"routes auth"| node_auth
node_auth -->|"authenticates login"| node_sessions
node_auth -.->|"reads and writes users"| node_database
node_api -.->|"accepts surveys"| node_survey
node_survey -.->|"stores uploads"| node_surveyfiles
node_survey -.->|"requests extraction"| node_surveyextract
node_surveyextract -.->|"provides survey inputs"| node_land
node_land -.->|"assesses parcel"| node_generation
node_generation -->|"uses feasibility"| node_footprint
node_api -.->|"exposes editing"| node_editing
node_api -.->|"previews candidates"| node_preview
node_editassist -->|"requests preview"| node_preview
node_preview -.->|"confirms plan"| node_confirmation
node_confirmation -.->|"enables reporting"| node_reports
node_api -.->|"requests evidence"| node_ragclient
node_ragclient -->|"searches regulations"| node_ragapi
node_ragclient -.->|"looks up constraints"| node_constraintsclient
node_ragapi -->|"dispatches retrieval"| node_ragengine
node_ragengine -->|"searches evidence"| node_retrieval
node_ragengine -->|"loads verified corpus"| node_external
node_surveyfiles -->|"reconciles references"| node_database

click node_api "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.API/Program.cs"
click node_auth "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Auth/Services/AuthenticationService.cs"
click node_sessions "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Auth/Services/SessionService.cs"
click node_survey "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Survey/Services/SurveyUploadService.cs"
click node_surveyfiles "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Survey/PrivateSurveyFileStorage.cs"
click node_surveyextract "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/survey/extraction_pipeline.py"
click node_land "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/land/validation.py"
click node_generation "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/placement/engine.py"
click node_footprint "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/footprint/feasibility.py"
click node_editing "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/plan_editor/operations/engine.py"
click node_preview "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Editing/CandidatePreviewService.cs"
click node_editassist "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Editing/AiEditOrchestrationService.cs"
click node_confirmation "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Confirmation/FinalPlanConfirmation.cs"
click node_reports "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Reports/Services/ReportDataBuilder.cs"
click node_ragclient "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Integration/RagServiceClient.cs"
click node_constraintsclient "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Integration/RagServiceClient.Constraints.cs"
click node_ragapi "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/app/main.py"
click node_ragengine "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/app/engine.py"
click node_retrieval "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/regulation_retrieval/evidence_step6/service.py"
click node_database "https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Persistence/BuildMindDbContext.cs"

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_api,node_auth,node_sessions,node_user toneBlue
class node_survey,node_generation,node_editing,node_preview,node_editassist,node_confirmation,node_reports,node_external toneAmber
class node_surveyextract,node_land,node_footprint toneMint
class node_ragapi,node_ragengine,node_retrieval toneRose
class node_surveyfiles,node_ragclient,node_constraintsclient,node_database toneIndigo
```

## Components

### API and identity

- [ASP.NET API](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.API/Program.cs): `src/BuildMind.API/Program.cs`
- [Authentication](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Auth/Services/AuthenticationService.cs): `src/BuildMind.Application/Features/Auth/Services/AuthenticationService.cs`
- [Session lifecycle](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Auth/Services/SessionService.cs): `src/BuildMind.Application/Features/Auth/Services/SessionService.cs`

### Planning workflow

- [Survey intake](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Survey/Services/SurveyUploadService.cs): `src/BuildMind.Application/Features/Survey/Services/SurveyUploadService.cs`
- [Plan generation](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/placement/engine.py): `python-services/app/geometry/placement/engine.py`
- [Plan editing](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/plan_editor/operations/engine.py): `python-services/app/plan_editor/operations/engine.py`
- [Candidate preview](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Editing/CandidatePreviewService.cs): `src/BuildMind.Application/Features/PlanEditor/Editing/CandidatePreviewService.cs`
- [AI edit orchestration](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Editing/AiEditOrchestrationService.cs): `src/BuildMind.Application/Features/PlanEditor/Editing/AiEditOrchestrationService.cs`
- [Plan confirmation](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/PlanEditor/Confirmation/FinalPlanConfirmation.cs): `src/BuildMind.Application/Features/PlanEditor/Confirmation/FinalPlanConfirmation.cs`
- [Preliminary reports](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Application/Features/Reports/Services/ReportDataBuilder.cs): `src/BuildMind.Application/Features/Reports/Services/ReportDataBuilder.cs`

### Python geometry and survey

- [Survey extraction](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/survey/extraction_pipeline.py): `python-services/app/survey/extraction_pipeline.py`
- [Land validation](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/land/validation.py): `python-services/app/geometry/land/validation.py`
- [Footprint feasibility](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/python-services/app/geometry/footprint/feasibility.py): `python-services/app/geometry/footprint/feasibility.py`

### Regulatory evidence

- [RAG service API](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/app/main.py): `rag-service/app/main.py`
- [Retrieval engine](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/app/engine.py): `rag-service/app/engine.py`
- [Evidence retrieval](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/rag-service/regulation_retrieval/evidence_step6/service.py): `rag-service/regulation_retrieval/evidence_step6/service.py`

### Persistence and integrations

- [Survey storage](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Survey/PrivateSurveyFileStorage.cs): `src/BuildMind.Infrastructure/Survey/PrivateSurveyFileStorage.cs`
- [RAG client](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Integration/RagServiceClient.cs): `src/BuildMind.Infrastructure/Integration/RagServiceClient.cs`
- [Constraint client](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Integration/RagServiceClient.Constraints.cs): `src/BuildMind.Infrastructure/Integration/RagServiceClient.Constraints.cs`
- [MySQL persistence](https://github.com/kogulanathan69/mypersonal_full-backend-work/blob/main/src/BuildMind.Infrastructure/Persistence/BuildMindDbContext.cs): `src/BuildMind.Infrastructure/Persistence/BuildMindDbContext.cs`

### Other components

- **User**
- **Regulatory corpus**

## Connections

- User → ASP.NET API: submits requests
- ASP.NET API → Authentication: routes auth
- Authentication → Session lifecycle: authenticates login (evidence: `src/BuildMind.Application/Features/Auth/Services/SessionService.cs`)
- Authentication → MySQL persistence: reads and writes users
- ASP.NET API → Survey intake: accepts surveys
- Survey intake → Survey storage: stores uploads (evidence: `src/BuildMind.Infrastructure/Survey/PrivateSurveyFileStorage.cs`)
- Survey intake → Survey extraction: requests extraction
- Survey extraction → Land validation: provides survey inputs
- Land validation → Plan generation: assesses parcel
- Plan generation → Footprint feasibility: uses feasibility (evidence: `python-services/app/geometry/placement/engine.py`)
- ASP.NET API → Plan editing: exposes editing
- ASP.NET API → Candidate preview: previews candidates
- AI edit orchestration → Candidate preview: requests preview (evidence: `src/BuildMind.Application/Features/PlanEditor/Editing/AiEditOrchestrationService.cs`)
- Candidate preview → Plan confirmation: confirms plan
- Plan confirmation → Preliminary reports: enables reporting
- ASP.NET API → RAG client: requests evidence
- RAG client → RAG service API: searches regulations (evidence: `src/BuildMind.Infrastructure/Integration/RagServiceClient.cs`)
- RAG client → Constraint client: looks up constraints (evidence: `src/BuildMind.Infrastructure/Integration/RagServiceClient.Constraints.cs`)
- RAG service API → Retrieval engine: dispatches retrieval (evidence: `rag-service/app/main.py`)
- Retrieval engine → Evidence retrieval: searches evidence (evidence: `rag-service/app/engine.py`)
- Retrieval engine → Regulatory corpus: loads verified corpus (evidence: `rag-service/app/engine.py`)
- Survey storage → MySQL persistence: reconciles references
