# shankyyy81/fullstackproject architecture

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

- Interactive diagram: https://gitdiagram.com/shankyyy81/fullstackproject
- Repository: https://github.com/shankyyy81/fullstackproject

## Overview

The SDG Project Management System supports faculty and student workflows: users authenticate, faculty create and assign SDG projects, and project teams coordinate tasks, files, and chat in a workspace. A separate literature workflow uploads project papers and answers questions using retrieved text and a Groq model; SDG analysis is another project capability. The graph follows documented frontend calls and backend route registration. Unsampled route internals are represented as capabilities, but their internal call relationships are omitted where excerpts do not establish them.

Main entry points: [`backend/app/routes/rag.py`](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/rag.py) (Literature Q&A), [`backend/main.py`](https://github.com/shankyyy81/fullstackproject/blob/main/backend/main.py) (API application), [`frontend/src/App.jsx`](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/App.jsx) (Web routing), [`backend/app/routes/auth.py`](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/auth.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Web routing<br/>[App.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_dashboards["Role dashboards<br/>[Dashboard.jsx]"]
  node_create["Project creation<br/>[CreateProject.jsx]"]
  node_facultyview["Faculty dashboard"]
  node_workspace["Project workspace"]
  node_apihelpers["Project API client<br/>[projects.js]"]
  node_http["HTTP client<br/>[client.js]"]
end

subgraph group_api["Backend API"]
  node_server["API application<br/>[main.py]"]
  node_authroutes["Authentication<br/>[auth.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_domain["Project domain"]
  node_projectroutes["Project operations<br/>[projects.py]"]
end

subgraph group_research["Research tools"]
  node_mlroutes["SDG analysis<br/>[ml.py]"]
  node_ragroutes["Literature Q&amp;A<br/>[rag.py]"]
end

subgraph group_persistence["Persistence"]
  node_user["User records<br/>[user.py]"]
  node_project["Project records<br/>[project.py]"]
  node_literature["Literature records<br/>[literature.py]"]
  node_database[("MongoDB<br/>[database.py]")]
end

node_faculty(("Faculty"))
node_student(("Student"))
node_groq{{"Groq service"}}

node_faculty -.->|"uses"| node_app
node_student -.->|"uses"| node_app
node_app -->|"provides"| node_authstate
node_app -->|"routes to"| node_dashboards
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_workspace
node_dashboards -->|"selects"| node_facultyview
node_create -->|"calls"| node_apihelpers
node_facultyview -->|"calls"| node_apihelpers
node_workspace -->|"calls"| node_apihelpers
node_apihelpers -->|"uses"| node_http
node_authstate -->|"calls HTTP"| node_authroutes
node_http -->|"sends requests"| node_server
node_server -->|"registers"| node_authroutes
node_server -->|"registers"| node_projectroutes
node_server -->|"registers"| node_mlroutes
node_server -->|"registers"| node_ragroutes
node_authroutes -->|"reads/writes"| node_user
node_authroutes -->|"reads"| node_project
node_authroutes -->|"uses"| node_schemas
node_projectroutes -->|"uses"| node_user
node_projectroutes -.->|"manages"| node_project
node_projectroutes -->|"uses"| node_schemas
node_mlroutes -.->|"analyzes"| node_project
node_ragroutes -->|"checks access"| node_project
node_ragroutes -->|"reads/writes"| node_literature
node_ragroutes -->|"checks participant"| node_user
node_ragroutes -->|"uses auth dependency"| node_authroutes
node_ragroutes -->|"uses"| node_schemas
node_ragroutes -->|"requests completion"| node_groq
node_server -->|"initializes"| node_database
node_database -->|"registers model"| node_user
node_database -->|"registers model"| node_project
node_database -->|"registers model"| node_literature

click node_app "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/context/AuthContext.jsx"
click node_dashboards "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/Dashboard.jsx"
click node_create "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/CreateProject.jsx"
click node_facultyview "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/FacultyDashboard.jsx"
click node_workspace "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/ProjectWorkspace.jsx"
click node_apihelpers "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/api/projects.js"
click node_http "https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/api/client.js"
click node_server "https://github.com/shankyyy81/fullstackproject/blob/main/backend/main.py"
click node_authroutes "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/auth.py"
click node_projectroutes "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/projects.py"
click node_mlroutes "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/ml.py"
click node_ragroutes "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/rag.py"
click node_user "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/user.py"
click node_project "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/project.py"
click node_literature "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/literature.py"
click node_schemas "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/schemas.py"
click node_database "https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/core/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_app,node_authstate,node_dashboards,node_create,node_facultyview,node_workspace,node_apihelpers,node_http toneBlue
class node_server,node_authroutes,node_schemas toneAmber
class node_projectroutes toneMint
class node_mlroutes,node_ragroutes toneRose
class node_user,node_project,node_literature,node_database,node_faculty,node_student,node_groq toneIndigo
```

## Components

### Web application

- [Web routing](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth state](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Role dashboards](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Project creation](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/CreateProject.jsx): `frontend/src/pages/CreateProject.jsx`
- [Faculty dashboard](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/FacultyDashboard.jsx): `frontend/src/pages/FacultyDashboard.jsx`
- [Project workspace](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/pages/ProjectWorkspace.jsx): `frontend/src/pages/ProjectWorkspace.jsx`
- [Project API client](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/api/projects.js): `frontend/src/api/projects.js`
- [HTTP client](https://github.com/shankyyy81/fullstackproject/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Backend API

- [API application](https://github.com/shankyyy81/fullstackproject/blob/main/backend/main.py): `backend/main.py`
- [Authentication](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [API schemas](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/schemas.py): `backend/app/schemas.py`

### Project domain

- [Project operations](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/projects.py): `backend/app/routes/projects.py`

### Research tools

- [SDG analysis](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/ml.py): `backend/app/routes/ml.py`
- [Literature Q&A](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/routes/rag.py): `backend/app/routes/rag.py`

### Persistence

- [User records](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Project records](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/project.py): `backend/app/models/project.py`
- [Literature records](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/models/literature.py): `backend/app/models/literature.py`
- [MongoDB](https://github.com/shankyyy81/fullstackproject/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### Other components

- **Faculty**
- **Student**
- **Groq service**

## Connections

- Faculty → Web routing: uses (evidence: `README.md`)
- Student → Web routing: uses (evidence: `README.md`)
- Web routing → Auth state: provides (evidence: `frontend/src/App.jsx`)
- Web routing → Role dashboards: routes to (evidence: `frontend/src/App.jsx`)
- Web routing → Project creation: routes to (evidence: `frontend/src/App.jsx`)
- Web routing → Project workspace: routes to (evidence: `frontend/src/App.jsx`)
- Role dashboards → Faculty dashboard: selects (evidence: `frontend/src/pages/Dashboard.jsx`)
- Project creation → Project API client: calls (evidence: `frontend/src/api/projects.js`)
- Faculty dashboard → Project API client: calls (evidence: `frontend/src/api/projects.js`)
- Project workspace → Project API client: calls (evidence: `frontend/src/api/projects.js`)
- Project API client → HTTP client: uses (evidence: `frontend/src/api/projects.js`)
- Auth state → Authentication: calls HTTP (evidence: `frontend/src/context/AuthContext.jsx`)
- HTTP client → API application: sends requests (evidence: `frontend/src/api/client.js`)
- API application → Authentication: registers (evidence: `backend/main.py`)
- API application → Project operations: registers (evidence: `backend/main.py`)
- API application → SDG analysis: registers (evidence: `backend/main.py`)
- API application → Literature Q&A: registers (evidence: `backend/main.py`)
- Authentication → User records: reads/writes (evidence: `backend/app/routes/auth.py`)
- Authentication → Project records: reads (evidence: `backend/app/routes/auth.py`)
- Authentication → API schemas: uses (evidence: `backend/app/routes/auth.py`)
- Project operations → User records: uses (evidence: `backend/app/routes/projects.py`)
- Project operations → Project records: manages (evidence: `backend/app/routes/projects.py`)
- Project operations → API schemas: uses (evidence: `backend/app/routes/projects.py`)
- SDG analysis → Project records: analyzes
- Literature Q&A → Project records: checks access (evidence: `backend/app/routes/rag.py`)
- Literature Q&A → Literature records: reads/writes (evidence: `backend/app/routes/rag.py`)
- Literature Q&A → User records: checks participant (evidence: `backend/app/routes/rag.py`)
- Literature Q&A → Authentication: uses auth dependency (evidence: `backend/app/routes/rag.py`)
- Literature Q&A → API schemas: uses (evidence: `backend/app/routes/rag.py`)
- Literature Q&A → Groq service: requests completion (evidence: `backend/app/routes/rag.py`)
- API application → MongoDB: initializes (evidence: `backend/main.py`)
- MongoDB → User records: registers model (evidence: `backend/app/core/database.py`)
- MongoDB → Project records: registers model (evidence: `backend/app/core/database.py`)
- MongoDB → Literature records: registers model (evidence: `backend/app/core/database.py`)
