# stgregdemo1-dotcom/student_portal architecture

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

- Interactive diagram: https://gitdiagram.com/stgregdemo1-dotcom/student_portal
- Repository: https://github.com/stgregdemo1-dotcom/student_portal

## Overview

This is a Next.js college website and student-information portal. Its major user-facing areas cover public college information, applicant admission and verification, and role-based administration, registrar, student, and teacher tasks. The sampled server routes expose admission, account, scheduling, grade, and management operations backed by Mongoose models. The source index establishes model references for several routes, but most page-to-API wiring is unsampled; those relationships are therefore omitted rather than inferred.

Main entry points: [`models/Schema.ts`](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/models/Schema.ts) (Mongoose domain models), [`app/(website)/layout.tsx`](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/(website)/layout.tsx) (Public site layout), [`app/portal/students/clientlayout.tsx`](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/portal/students/clientlayout.tsx) (Student portal shell), [`app/api/admission/route.ts`](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/route.ts) (Admission records API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public and Admissions"]
  node_website["College information pages"]
  node_website_layout["Public site layout<br/>[layout.tsx]"]
  node_admission_pages["Admission pages"]
  node_public_header["Public header<br/>[pheader.tsx]"]
  node_public_footer["Public footer<br/>[Pfooter.tsx]"]
end

subgraph group_access["Accounts and APIs"]
  node_admission_api["Admission records API<br/>[route.ts]"]
  node_admission_enroll_api["Enrollment API<br/>[route.ts]"]
  node_admission_verify_api["Applicant verification API<br/>[route.ts]"]
  node_login_api["Login API<br/>[route.ts]"]
end

subgraph group_operations["Administration and Registrar"]
  node_admin_api["Admin API<br/>[route.ts]"]
  node_registrar_api["Registrar API<br/>[route.ts]"]
  node_admin_pages["Admin portal"]
  node_registrar_pages["Registrar portal"]
end

subgraph group_learning["Student and Teacher"]
  node_student_api["Student API<br/>[route.ts]"]
  node_teacher_api["Teacher API<br/>[route.ts]"]
  node_student_pages["Student portal"]
  node_teacher_pages["Teacher portal"]
  node_student_shell["Student portal shell<br/>[clientlayout.tsx]"]
  node_sidebar["Student navigation<br/>[Sidebar.tsx]"]
  node_student_header["Student header<br/>[sheader.tsx]"]
end

subgraph group_data["Domain Data"]
  node_schema[("Mongoose domain models<br/>[Schema.ts]")]
end

node_visitor(("Website visitor"))
node_applicant(("Applicant"))
node_portaluser(("Portal user"))

node_website_layout -->|"renders"| node_public_header
node_website_layout -->|"renders"| node_public_footer
node_student_shell -->|"renders"| node_sidebar
node_student_shell -->|"renders"| node_student_header
node_admission_api -->|"queries and saves"| node_schema
node_admission_enroll_api -->|"creates records"| node_schema
node_admission_verify_api -->|"checks applicant"| node_schema
node_login_api -->|"writes audit"| node_schema
node_admin_api -->|"accesses models"| node_schema
node_registrar_api -->|"accesses models"| node_schema
node_student_api -->|"accesses models"| node_schema
node_teacher_api -->|"accesses models"| node_schema

click node_website "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/(website)"
click node_website_layout "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/(website)/layout.tsx"
click node_admission_pages "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/admission"
click node_admission_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/route.ts"
click node_admission_enroll_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/enroll/route.ts"
click node_admission_verify_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/verify/route.ts"
click node_login_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/login/route.ts"
click node_admin_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/admin/route.ts"
click node_registrar_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/registrar/route.ts"
click node_admin_pages "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/admin"
click node_registrar_pages "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/registrar"
click node_student_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/student/route.ts"
click node_teacher_api "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/teacher/route.ts"
click node_student_pages "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/students"
click node_teacher_pages "https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/teachers"
click node_schema "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/models/Schema.ts"
click node_student_shell "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/portal/students/clientlayout.tsx"
click node_sidebar "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/Sidebar.tsx"
click node_student_header "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/sheader.tsx"
click node_public_header "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/pheader.tsx"
click node_public_footer "https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/Pfooter.tsx"

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_website,node_website_layout,node_admission_pages,node_public_header,node_public_footer,node_portaluser toneBlue
class node_admission_api,node_admission_enroll_api,node_admission_verify_api,node_login_api toneAmber
class node_admin_api,node_registrar_api,node_admin_pages,node_registrar_pages toneMint
class node_student_api,node_teacher_api,node_student_pages,node_teacher_pages,node_student_shell,node_sidebar,node_student_header toneRose
class node_schema,node_visitor,node_applicant toneIndigo
```

## Components

### Public and Admissions

- [College information pages](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/(website)): `app/(website)`
- [Public site layout](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/(website)/layout.tsx): `app/(website)/layout.tsx`
- [Admission pages](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/admission): `app/admission`
- [Public header](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/pheader.tsx): `app/-components/pheader.tsx`
- [Public footer](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/Pfooter.tsx): `app/-components/Pfooter.tsx`

### Accounts and APIs

- [Admission records API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/route.ts): `app/api/admission/route.ts`
- [Enrollment API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/enroll/route.ts): `app/api/admission/enroll/route.ts`
- [Applicant verification API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/admission/verify/route.ts): `app/api/admission/verify/route.ts`
- [Login API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/login/route.ts): `app/api/login/route.ts`

### Administration and Registrar

- [Admin API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/admin/route.ts): `app/api/portal/admin/route.ts`
- [Registrar API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/registrar/route.ts): `app/api/portal/registrar/route.ts`
- [Admin portal](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/admin): `app/portal/admin`
- [Registrar portal](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/registrar): `app/portal/registrar`

### Student and Teacher

- [Student API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/student/route.ts): `app/api/portal/student/route.ts`
- [Teacher API](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/api/portal/teacher/route.ts): `app/api/portal/teacher/route.ts`
- [Student portal](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/students): `app/portal/students`
- [Teacher portal](https://github.com/stgregdemo1-dotcom/student_portal/tree/main/app/portal/teachers): `app/portal/teachers`
- [Student portal shell](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/portal/students/clientlayout.tsx): `app/portal/students/clientlayout.tsx`
- [Student navigation](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/Sidebar.tsx): `app/-components/Sidebar.tsx`
- [Student header](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/app/-components/sheader.tsx): `app/-components/sheader.tsx`

### Domain Data

- [Mongoose domain models](https://github.com/stgregdemo1-dotcom/student_portal/blob/main/models/Schema.ts): `models/Schema.ts`

### Other components

- **Website visitor**
- **Applicant**
- **Portal user**

## Connections

- Public site layout → Public header: renders (evidence: `app/(website)/layout.tsx`)
- Public site layout → Public footer: renders (evidence: `app/(website)/layout.tsx`)
- Student portal shell → Student navigation: renders (evidence: `app/portal/students/clientlayout.tsx`)
- Student portal shell → Student header: renders (evidence: `app/portal/students/clientlayout.tsx`)
- Admission records API → Mongoose domain models: queries and saves (evidence: `app/api/admission/route.ts`)
- Enrollment API → Mongoose domain models: creates records (evidence: `app/api/admission/enroll/route.ts`)
- Applicant verification API → Mongoose domain models: checks applicant (evidence: `app/api/admission/verify/route.ts`)
- Login API → Mongoose domain models: writes audit (evidence: `app/api/login/route.ts`)
- Admin API → Mongoose domain models: accesses models (evidence: `app/api/portal/admin/route.ts`)
- Registrar API → Mongoose domain models: accesses models (evidence: `app/api/portal/registrar/route.ts`)
- Student API → Mongoose domain models: accesses models (evidence: `app/api/portal/student/route.ts`)
- Teacher API → Mongoose domain models: accesses models (evidence: `app/api/portal/teacher/route.ts`)
