# k05572616-coder/student_mentorship architecture

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

- Interactive diagram: https://gitdiagram.com/k05572616-coder/student_mentorship
- Repository: https://github.com/k05572616-coder/student_mentorship

## Overview

Student Mentorship & Grievance Management is a web application for account access, mentor allocation and meetings, grievance submission and handling, and administrative oversight. Users interact through the browser UI; the Java server serves frontend assets and routes API requests to domain handlers, which access PostgreSQL. The sampled frontend confirms login, grievance, meeting, administration, and allocation requests. MentorshipApi and the database utilities are indexed but not excerpted, so their internal behavior is not detailed; frontend-to-handler links are shown as unverified HTTP relationships.

Main entry points: [`student_mentorship/backend/Main.java`](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/Main.java) (HTTP server), [`student_mentorship/backend/server/Database.java`](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/Database.java) (Database access), [`student_mentorship/backend/server/JsonUtil.java`](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/JsonUtil.java) (JSON utilities), [`student_mentorship/backend/api/AuthApi.java`](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/AuthApi.java) (Accounts and auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_frontend["Browser UI<br/>[app.js]"]
  node_web_assets["Static assets<br/>[index.html]"]
end

subgraph group_server["HTTP server"]
  node_http_server["HTTP server<br/>[Main.java]"]
end

subgraph group_domain["Domain APIs"]
  node_auth["Accounts and auth<br/>[AuthApi.java]"]
  node_grievances["Grievance handling<br/>[GrievanceApi.java]"]
  node_mentorship["Mentorship<br/>[MentorshipApi.java]"]
  node_admin["Admin oversight<br/>[AdminApi.java]"]
end

subgraph group_storage["Persistence and utilities"]
  node_database_access["Database access<br/>[Database.java]"]
  node_postgres[("PostgreSQL")]
  node_json["JSON utilities<br/>[JsonUtil.java]"]
  node_schema["Database schema<br/>[schema.sql]"]
end

node_users(("Students and staff"))

node_users -->|"use"| node_frontend
node_frontend -.->|"request API"| node_http_server
node_http_server -->|"serves"| node_web_assets
node_http_server -->|"initializes"| node_database_access
node_http_server -->|"routes"| node_auth
node_http_server -->|"routes"| node_grievances
node_http_server -->|"routes"| node_mentorship
node_http_server -->|"routes"| node_admin
node_auth -->|"queries"| node_database_access
node_grievances -->|"queries"| node_database_access
node_admin -->|"queries"| node_database_access
node_mentorship -.->|"queries"| node_database_access
node_database_access -.->|"accesses"| node_postgres
node_schema -.->|"defines tables"| node_postgres
node_auth -->|"parses and sends"| node_json
node_grievances -->|"parses and sends"| node_json
node_admin -->|"sends"| node_json
node_http_server -->|"sends responses"| node_json

click node_frontend "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/frontend/app.js"
click node_web_assets "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/frontend/index.html"
click node_http_server "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/Main.java"
click node_auth "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/AuthApi.java"
click node_grievances "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/GrievanceApi.java"
click node_mentorship "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/MentorshipApi.java"
click node_admin "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/AdminApi.java"
click node_database_access "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/Database.java"
click node_json "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/JsonUtil.java"
click node_schema "https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/schema.sql"

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,node_web_assets toneBlue
class node_http_server toneAmber
class node_auth,node_grievances,node_mentorship,node_admin toneMint
class node_database_access,node_postgres,node_json,node_schema toneRose
class node_users toneIndigo
```

## Components

### Web interface

- [Browser UI](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/frontend/app.js): `student_mentorship/frontend/app.js`
- [Static assets](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/frontend/index.html): `student_mentorship/frontend/index.html`

### HTTP server

- [HTTP server](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/Main.java): `student_mentorship/backend/Main.java`

### Domain APIs

- [Accounts and auth](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/AuthApi.java): `student_mentorship/backend/api/AuthApi.java`
- [Grievance handling](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/GrievanceApi.java): `student_mentorship/backend/api/GrievanceApi.java`
- [Mentorship](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/MentorshipApi.java): `student_mentorship/backend/api/MentorshipApi.java`
- [Admin oversight](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/api/AdminApi.java): `student_mentorship/backend/api/AdminApi.java`

### Persistence and utilities

- [Database access](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/Database.java): `student_mentorship/backend/server/Database.java`
- **PostgreSQL**
- [JSON utilities](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/server/JsonUtil.java): `student_mentorship/backend/server/JsonUtil.java`
- [Database schema](https://github.com/k05572616-coder/student_mentorship/blob/main/student_mentorship/backend/schema.sql): `student_mentorship/backend/schema.sql`

### Other components

- **Students and staff**

## Connections

- Students and staff → Browser UI: use
- Browser UI → HTTP server: request API
- HTTP server → Static assets: serves (evidence: `student_mentorship/backend/Main.java`)
- HTTP server → Database access: initializes (evidence: `student_mentorship/backend/Main.java`)
- HTTP server → Accounts and auth: routes (evidence: `student_mentorship/backend/Main.java`)
- HTTP server → Grievance handling: routes (evidence: `student_mentorship/backend/Main.java`)
- HTTP server → Mentorship: routes (evidence: `student_mentorship/backend/Main.java`)
- HTTP server → Admin oversight: routes (evidence: `student_mentorship/backend/Main.java`)
- Accounts and auth → Database access: queries (evidence: `student_mentorship/backend/api/AuthApi.java`)
- Grievance handling → Database access: queries (evidence: `student_mentorship/backend/api/GrievanceApi.java`)
- Admin oversight → Database access: queries (evidence: `student_mentorship/backend/api/AdminApi.java`)
- Mentorship → Database access: queries
- Database access → PostgreSQL: accesses
- Database schema → PostgreSQL: defines tables
- Accounts and auth → JSON utilities: parses and sends (evidence: `student_mentorship/backend/api/AuthApi.java`)
- Grievance handling → JSON utilities: parses and sends (evidence: `student_mentorship/backend/api/GrievanceApi.java`)
- Admin oversight → JSON utilities: sends (evidence: `student_mentorship/backend/api/AdminApi.java`)
- HTTP server → JSON utilities: sends responses (evidence: `student_mentorship/backend/Main.java`)
