# lyxari/capnet architecture

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

- Interactive diagram: https://gitdiagram.com/lyxari/capnet
- Repository: https://github.com/lyxari/capnet

## Overview

CapNet is a capstone repository and review web app with account roles, searchable submissions, faculty moderation, and administrator account and repository analytics. A student’s visible workflow is to authenticate, use the dashboard to submit a PDF for metadata extraction, and work with capstone records; faculty review submissions, while administrators manage accounts. The server routes PDF extraction through Gemini with a local NLP fallback. The README gives no capability details, so the UI branches are based on sampled scripts; storage and database relationships are shown only where the excerpts demonstrate Supabase operations.

Main entry points: [`capnet-website/script.js`](https://github.com/lyxari/capnet/blob/main/capnet-website/script.js) (Sign-in and signup), [`capnet-website/dashboard.js`](https://github.com/lyxari/capnet/blob/main/capnet-website/dashboard.js) (Student dashboard), [`capnet-website/nlp-route.js`](https://github.com/lyxari/capnet/blob/main/capnet-website/nlp-route.js) (PDF extraction route), [`capnet-website/faculty.js`](https://github.com/lyxari/capnet/blob/main/capnet-website/faculty.js) (Faculty review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and access"]
  node_auth_ui["Sign-in and signup<br/>[script.js]"]
  node_supabase_client["Supabase client<br/>[supabase-config.js]"]
  node_supabase[("Supabase")]
end

subgraph group_catalog["Capstone workspace"]
  node_dashboard["Student dashboard<br/>[dashboard.js]"]
  node_faculty_review["Faculty review<br/>[faculty.js]"]
  node_admin_console["Admin console<br/>[admin.js]"]
end

subgraph group_service["Extraction service"]
  node_web_server["Web and API server<br/>[server.js]"]
  node_pdf_route["PDF extraction route<br/>[nlp-route.js]"]
  node_nlp_engine["Local metadata scanner<br/>[nlp-engine.js]"]
  node_gemini["Gemini API"]
end

node_student(("Student"))
node_faculty_actor(("Faculty"))
node_admin_actor(("Administrator"))

node_student -->|"signs in"| node_auth_ui
node_faculty_actor -->|"signs in"| node_auth_ui
node_admin_actor -->|"signs in"| node_auth_ui
node_auth_ui -->|"authenticates"| node_supabase
node_supabase_client -->|"creates client"| node_supabase
node_student -->|"uses"| node_dashboard
node_dashboard -->|"reads and writes"| node_supabase
node_dashboard -->|"posts PDF"| node_web_server
node_web_server -->|"mounts route"| node_pdf_route
node_pdf_route -->|"requests extraction"| node_gemini
node_pdf_route -->|"falls back to scan"| node_nlp_engine
node_faculty_actor -->|"reviews submissions"| node_faculty_review
node_faculty_review -->|"reads and updates"| node_supabase
node_admin_actor -->|"manages accounts"| node_admin_console
node_admin_console -->|"manages records"| node_supabase

click node_auth_ui "https://github.com/lyxari/capnet/blob/main/capnet-website/script.js"
click node_supabase_client "https://github.com/lyxari/capnet/blob/main/capnet-website/supabase-config.js"
click node_dashboard "https://github.com/lyxari/capnet/blob/main/capnet-website/dashboard.js"
click node_faculty_review "https://github.com/lyxari/capnet/blob/main/capnet-website/faculty.js"
click node_admin_console "https://github.com/lyxari/capnet/blob/main/capnet-website/admin.js"
click node_web_server "https://github.com/lyxari/capnet/blob/main/capnet-website/server.js"
click node_pdf_route "https://github.com/lyxari/capnet/blob/main/capnet-website/nlp-route.js"
click node_nlp_engine "https://github.com/lyxari/capnet/blob/main/capnet-website/nlp-engine.js"

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_auth_ui,node_supabase_client,node_supabase toneBlue
class node_dashboard,node_faculty_review,node_admin_console toneAmber
class node_web_server,node_pdf_route,node_nlp_engine,node_gemini toneMint
class node_student,node_faculty_actor,node_admin_actor toneIndigo
```

## Components

### Accounts and access

- [Sign-in and signup](https://github.com/lyxari/capnet/blob/main/capnet-website/script.js): `capnet-website/script.js`
- [Supabase client](https://github.com/lyxari/capnet/blob/main/capnet-website/supabase-config.js): `capnet-website/supabase-config.js`
- **Supabase**

### Capstone workspace

- [Student dashboard](https://github.com/lyxari/capnet/blob/main/capnet-website/dashboard.js): `capnet-website/dashboard.js`
- [Faculty review](https://github.com/lyxari/capnet/blob/main/capnet-website/faculty.js): `capnet-website/faculty.js`
- [Admin console](https://github.com/lyxari/capnet/blob/main/capnet-website/admin.js): `capnet-website/admin.js`

### Extraction service

- [Web and API server](https://github.com/lyxari/capnet/blob/main/capnet-website/server.js): `capnet-website/server.js`
- [PDF extraction route](https://github.com/lyxari/capnet/blob/main/capnet-website/nlp-route.js): `capnet-website/nlp-route.js`
- [Local metadata scanner](https://github.com/lyxari/capnet/blob/main/capnet-website/nlp-engine.js): `capnet-website/nlp-engine.js`
- **Gemini API**

### Other components

- **Student**
- **Faculty**
- **Administrator**

## Connections

- Student → Sign-in and signup: signs in (evidence: `capnet-website/script.js`)
- Faculty → Sign-in and signup: signs in (evidence: `capnet-website/script.js`)
- Administrator → Sign-in and signup: signs in (evidence: `capnet-website/script.js`)
- Sign-in and signup → Supabase: authenticates (evidence: `capnet-website/script.js`)
- Supabase client → Supabase: creates client (evidence: `capnet-website/supabase-config.js`)
- Student → Student dashboard: uses (evidence: `capnet-website/dashboard.js`)
- Student dashboard → Supabase: reads and writes (evidence: `capnet-website/dashboard.js`)
- Student dashboard → Web and API server: posts PDF (evidence: `capnet-website/dashboard.js`)
- Web and API server → PDF extraction route: mounts route (evidence: `capnet-website/server.js`)
- PDF extraction route → Gemini API: requests extraction (evidence: `capnet-website/nlp-route.js`)
- PDF extraction route → Local metadata scanner: falls back to scan (evidence: `capnet-website/nlp-route.js`)
- Faculty → Faculty review: reviews submissions (evidence: `capnet-website/faculty.js`)
- Faculty review → Supabase: reads and updates (evidence: `capnet-website/faculty.js`)
- Administrator → Admin console: manages accounts (evidence: `capnet-website/admin.js`)
- Admin console → Supabase: manages records (evidence: `capnet-website/admin.js`)
