# prathmesh4647/guidance-ai architecture

> Architecture diagram of the GitHub repository prathmesh4647/guidance-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prathmesh4647/guidance-ai
- Repository: https://github.com/prathmesh4647/guidance-ai

## Overview

#### 1. System Purpose and Runtime
Guidance.AI is a Django-based academic project-management platform for students and faculty. It manages ideas, teams, projects, evaluations, SDLC workbooks, notices, and public project presentation. Django is exposed through WSGI/ASGI entry points in `guidance/wsgi.py` and `guidance/asgi.py`; `manage.py` is the operational CLI entry point.

#### 2. Application Composition and Routing
The Django project owns global configuration and route composition in `guidance/settings.py` and `guidance/urls.py`. Feature apps each provide model/view/URL boundaries:
- `accounts/urls.py`, `accounts/views.py`
- `ideas/urls.py`, `ideas/views.py`
- `projects/urls.py`, `projects/views.py`
- `teams/urls.py`, `teams/views.py`
- `workbook/urls.py`, `workbook/views.py`
- `notices/urls.py`, `notices/views.py`
- `Showcase/urls.py`, `Showcase/views.py`

#### 3. Identity, Roles, and Access Boundary
Authentication and role-aware user behavior are centered in the accounts app. Its custom user schema is defined by `accounts/models.py`, including the phone-field evolution captured in `accounts/migrations/0002_customuser_phone.py`. Student and faculty views/dashboards form the primary authorization boundary before users can submit/review ideas, manage teams, or evaluate projects.

#### 4. Idea Generation and Similarity Pipeline
The ideas domain accepts student proposals, invokes generative AI, and evaluates conceptual overlap. Core ownership is in `ideas/models.py` and `ideas/views.py`; AI integration is separated into `ideas/gemini_engine.py` and `ideas/ai_engine.py`. Idea migrations explicitly add embeddings and similarity scores in `ideas/migrations/0002_idea_embedding_idea_similarity_score.py`. The supplied Sentence Transformer model is local at `local_model/model.safetensors`, with module definition in `local_model/modules.json`. Google Gemini is the external idea-generation service; embeddings/similarity are intended for PostgreSQL pgvector storage/search.

#### 5. Project Lifecycle and Faculty Evaluation
Approved work transitions into the projects domain, which stores submission state, assets/links, similarity metadata, likes, batch/year, and structured evaluation data. Main boundaries are `projects/models.py`, `projects/views.py`, and `projects/urls.py`. Schema history shows this lifecycle: embeddings in `projects/migrations/0002_project_embedding_project_similarity_score.py`, GitHub linkage in `projects/migrations/0003_project_github_link.py`, evaluation criteria in `projects/migrations/0005_project_evaluation_coding_and_more.py`, and status/leaderboard fields in `projects/migrations/0006_alter_project_status.py` and `0007_project_batch_year_project_likes.py`.

#### 6. Collaboration, Progress, and Communication
Teams represent student project groupings in `teams/models.py` and `teams/views.py`. The workbook app records project SDLC progress through `workbook/models.py` and `workbook/views.py`, with initial data support in `workbook/seed_data.py`. Faculty/student announcements are isolated in `notices/models.py` and `notices/views.py`; their team-association migrations establish the delivery relationship.

#### 7. Presentation, Infrastructure, and UI
Public-facing showcase and project discovery are handled by `Showcase/models.py`, `Showcase/views.py`, and templates such as `Showcase/templates/showcase.html`. Server-rendered shared UI lives in `templates/base.html`, with static assets under `static/css/base_style.css` and `static/js`. PostgreSQL is the primary database, pgvector supports vector similarity, Docker deployment is defined in `docker-compose.yml`, and the stated deployment topology includes Nginx. Python dependencies are declared in `requirements.txt`; frontend package metadata is in `package.json`.

Main entry points: [`guidance/urls.py`](https://github.com/prathmesh4647/guidance-ai/blob/main/guidance/urls.py) (Django project), [`projects/models.py`](https://github.com/prathmesh4647/guidance-ai/blob/main/projects/models.py) (Projects and evaluation), [`ideas/models.py`](https://github.com/prathmesh4647/guidance-ai/blob/main/ideas/models.py) (Ideas), [`accounts/models.py`](https://github.com/prathmesh4647/guidance-ai/blob/main/accounts/models.py) (Accounts and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Django runtime"]
  node_ops{{"Operations CLI<br/>Django CLI<br/>[manage.py]"}}
  node_django["Django project<br/>configuration and routing<br/>[urls.py]"]
  node_servers{{"WSGI / ASGI entrypoints<br/>server entrypoints<br/>[wsgi.py]"}}
end

subgraph group_domains["Application domains"]
  node_accounts["Accounts and roles<br/>auth domain<br/>[models.py]"]
  node_ideas["Ideas<br/>proposal domain<br/>[models.py]"]
  node_projects["Projects and evaluation<br/>lifecycle domain<br/>[models.py]"]
  node_teams["Teams<br/>collaboration domain<br/>[models.py]"]
  node_workbook["SDLC workbook<br/>progress domain<br/>[models.py]"]
  node_notices["Notices<br/>announcement domain<br/>[models.py]"]
end

subgraph group_ai["AI and similarity"]
  node_idea_ai["Idea AI engines<br/>AI integration<br/>[gemini_engine.py]"]
  node_gemini{{"Google Gemini<br/>external AI service"}}
  node_sentence_model["Local Sentence Transformer<br/>embedding model<br/>[model.safetensors]"]
  node_postgres[("PostgreSQL with pgvector<br/>primary database")]
end

subgraph group_delivery["Presentation and delivery"]
  node_showcase["Public showcase<br/>presentation domain<br/>[views.py]"]
  node_shared_ui["Server-rendered UI<br/>templates and static assets<br/>[base.html]"]
  node_nginx{{"Nginx<br/>reverse proxy"}}
  node_docker["Docker deployment<br/>deployment topology<br/>[docker-compose.yml]"]
end

node_ops -->|"operates"| node_django
node_servers -->|"loads"| node_django
node_nginx -->|"proxies requests"| node_servers
node_django -->|"routes"| node_accounts
node_django -->|"routes"| node_ideas
node_django -->|"routes"| node_projects
node_django -->|"routes"| node_teams
node_django -->|"routes"| node_workbook
node_django -->|"routes"| node_notices
node_django -->|"routes"| node_showcase
node_accounts -->|"authorizes proposals"| node_ideas
node_accounts -->|"authorizes evaluation"| node_projects
node_ideas -->|"invokes"| node_idea_ai
node_idea_ai -->|"generates ideas"| node_gemini
node_idea_ai -->|"creates embeddings"| node_sentence_model
node_ideas -->|"approved work transitions"| node_projects
node_teams -->|"groups collaborators"| node_projects
node_projects -->|"tracks SDLC progress"| node_workbook
node_teams -->|"receives announcements"| node_notices
node_projects -->|"publishes projects"| node_showcase
node_accounts -->|"persists"| node_postgres
node_ideas -->|"stores vectors"| node_postgres
node_projects -->|"stores lifecycle data"| node_postgres
node_teams -->|"persists"| node_postgres
node_workbook -->|"persists"| node_postgres
node_notices -->|"persists"| node_postgres
node_showcase -->|"renders"| node_shared_ui
node_docker -->|"deploys"| node_nginx
node_docker -->|"provisions"| node_postgres

click node_ops "https://github.com/prathmesh4647/guidance-ai/blob/main/manage.py"
click node_django "https://github.com/prathmesh4647/guidance-ai/blob/main/guidance/urls.py"
click node_servers "https://github.com/prathmesh4647/guidance-ai/blob/main/guidance/wsgi.py"
click node_accounts "https://github.com/prathmesh4647/guidance-ai/blob/main/accounts/models.py"
click node_ideas "https://github.com/prathmesh4647/guidance-ai/blob/main/ideas/models.py"
click node_projects "https://github.com/prathmesh4647/guidance-ai/blob/main/projects/models.py"
click node_teams "https://github.com/prathmesh4647/guidance-ai/blob/main/teams/models.py"
click node_workbook "https://github.com/prathmesh4647/guidance-ai/blob/main/workbook/models.py"
click node_notices "https://github.com/prathmesh4647/guidance-ai/blob/main/notices/models.py"
click node_idea_ai "https://github.com/prathmesh4647/guidance-ai/blob/main/ideas/gemini_engine.py"
click node_sentence_model "https://github.com/prathmesh4647/guidance-ai/blob/main/local_model/model.safetensors"
click node_showcase "https://github.com/prathmesh4647/guidance-ai/blob/main/Showcase/views.py"
click node_shared_ui "https://github.com/prathmesh4647/guidance-ai/blob/main/templates/base.html"
click node_docker "https://github.com/prathmesh4647/guidance-ai/blob/main/docker-compose.yml"

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_ops,node_django,node_servers toneBlue
class node_accounts,node_ideas,node_projects,node_teams,node_workbook,node_notices toneAmber
class node_idea_ai,node_gemini,node_sentence_model,node_postgres toneMint
class node_showcase,node_shared_ui,node_nginx,node_docker toneRose
```

## Components

### Django runtime

- [Operations CLI](https://github.com/prathmesh4647/guidance-ai/blob/main/manage.py): Django CLI · `manage.py`
- [Django project](https://github.com/prathmesh4647/guidance-ai/blob/main/guidance/urls.py): configuration and routing · Composes global settings and feature routes. · `guidance/urls.py`
- [WSGI / ASGI entrypoints](https://github.com/prathmesh4647/guidance-ai/blob/main/guidance/wsgi.py): server entrypoints · `guidance/wsgi.py`

### Application domains

- [Accounts and roles](https://github.com/prathmesh4647/guidance-ai/blob/main/accounts/models.py): auth domain · Custom users and student/faculty access boundary. · `accounts/models.py`
- [Ideas](https://github.com/prathmesh4647/guidance-ai/blob/main/ideas/models.py): proposal domain · Student proposal submission and similarity state. · `ideas/models.py`
- [Projects and evaluation](https://github.com/prathmesh4647/guidance-ai/blob/main/projects/models.py): lifecycle domain · Approved work, submissions, evaluation, and leaderboard data. · `projects/models.py`
- [Teams](https://github.com/prathmesh4647/guidance-ai/blob/main/teams/models.py): collaboration domain · `teams/models.py`
- [SDLC workbook](https://github.com/prathmesh4647/guidance-ai/blob/main/workbook/models.py): progress domain · Records project SDLC progress. · `workbook/models.py`
- [Notices](https://github.com/prathmesh4647/guidance-ai/blob/main/notices/models.py): announcement domain · `notices/models.py`

### AI and similarity

- [Idea AI engines](https://github.com/prathmesh4647/guidance-ai/blob/main/ideas/gemini_engine.py): AI integration · Generates ideas and coordinates similarity processing. · `ideas/gemini_engine.py`
- **Google Gemini**: external AI service
- [Local Sentence Transformer](https://github.com/prathmesh4647/guidance-ai/blob/main/local_model/model.safetensors): embedding model · `local_model/model.safetensors`
- **PostgreSQL with pgvector**: primary database · Stores application data and vector similarity data.

### Presentation and delivery

- [Public showcase](https://github.com/prathmesh4647/guidance-ai/blob/main/Showcase/views.py): presentation domain · Public project discovery and presentation. · `Showcase/views.py`
- [Server-rendered UI](https://github.com/prathmesh4647/guidance-ai/blob/main/templates/base.html): templates and static assets · `templates/base.html`
- **Nginx**: reverse proxy
- [Docker deployment](https://github.com/prathmesh4647/guidance-ai/blob/main/docker-compose.yml): deployment topology · `docker-compose.yml`

## Connections

- Operations CLI → Django project: operates
- WSGI / ASGI entrypoints → Django project: loads
- Nginx → WSGI / ASGI entrypoints: proxies requests
- Django project → Accounts and roles: routes
- Django project → Ideas: routes
- Django project → Projects and evaluation: routes
- Django project → Teams: routes
- Django project → SDLC workbook: routes
- Django project → Notices: routes
- Django project → Public showcase: routes
- Accounts and roles → Ideas: authorizes proposals
- Accounts and roles → Projects and evaluation: authorizes evaluation
- Ideas → Idea AI engines: invokes
- Idea AI engines → Google Gemini: generates ideas
- Idea AI engines → Local Sentence Transformer: creates embeddings
- Ideas → Projects and evaluation: approved work transitions
- Teams → Projects and evaluation: groups collaborators
- Projects and evaluation → SDLC workbook: tracks SDLC progress
- Teams → Notices: receives announcements
- Projects and evaluation → Public showcase: publishes projects
- Accounts and roles → PostgreSQL with pgvector: persists
- Ideas → PostgreSQL with pgvector: stores vectors
- Projects and evaluation → PostgreSQL with pgvector: stores lifecycle data
- Teams → PostgreSQL with pgvector: persists
- SDLC workbook → PostgreSQL with pgvector: persists
- Notices → PostgreSQL with pgvector: persists
- Public showcase → Server-rendered UI: renders
- Docker deployment → Nginx: deploys
- Docker deployment → PostgreSQL with pgvector: provisions
