# smokeyy444/smart-student-manager architecture

> Architecture diagram of the GitHub repository smokeyy444/smart-student-manager, 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/smokeyy444/smart-student-manager
- Repository: https://github.com/smokeyy444/smart-student-manager

## Overview

This is a student academic-management web app: students create an account, then manage semesters, subjects, grades, attendance, events, reminders, and profile settings through dashboard-linked views. Server actions provide the application’s data operations, with authentication and Prisma persistence underneath. The README is a generic Next.js template and does not document product capabilities; relationships below rely on sampled excerpts and SOURCE INDEX references, so unsampled integrations are omitted where their wiring is not shown.

Main entry points: [`src/lib/actions/events.ts`](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/events.ts) (Event actions), [`src/lib/auth/guards.ts`](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/auth/guards.ts) (Access guards), [`src/lib/prisma.ts`](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/prisma.ts) (Prisma database), [`src/lib/actions/academic.ts`](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/academic.ts) (Academic actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_registration["Registration<br/>[page.tsx]"]
  node_login["Login<br/>[page.tsx]"]
  node_auth["Auth actions<br/>[auth.ts]"]
  node_session["Session cookies<br/>[session.ts]"]
  node_guards["Access guards<br/>[guards.ts]"]
end

subgraph group_academics["Academic tracking"]
  node_academicview["Grades view<br/>[grades-view.tsx]"]
  node_academic["Academic actions<br/>[academic.ts]"]
  node_gpa["Grade calculations<br/>[gpa.ts]"]
  node_attendanceview["Attendance view"]
  node_attendance["Attendance actions<br/>[attendance.ts]"]
  node_attendancecalc["Attendance calculations<br/>[attendance.ts]"]
  node_smartmodal["Smart import"]
  node_smartaction["Import processing<br/>[smart-import.ts]"]
  node_gemini["Gemini integration<br/>[gemini.ts]"]
  node_matching["Record matching<br/>[matching.ts]"]
end

subgraph group_planning["Events and alerts"]
  node_eventsview["Events cockpit<br/>[events-cockpit.tsx]"]
  node_events["Event actions<br/>[events.ts]"]
  node_eventform["Event editor"]
  node_reminders["Reminder center"]
  node_browsernotify["Browser notifications<br/>[browser.ts]"]
end

subgraph group_platform["Application platform"]
  node_dashboard["Dashboard<br/>[dashboard-view.tsx]"]
  node_dashboarddata["Dashboard data<br/>[dashboard.ts]"]
  node_profile["Profile settings<br/>[profile-form.tsx]"]
  node_settings["User settings<br/>[settings-form.tsx]"]
  node_layout["App layout<br/>[app-layout.tsx]"]
  node_db[("Prisma database<br/>[prisma.ts]")]
end

node_student(("Student"))

node_student -->|"creates account"| node_registration
node_student -.->|"signs in"| node_login
node_registration -->|"registers via"| node_auth
node_login -->|"authenticates via"| node_auth
node_auth -->|"sets or clears"| node_session
node_auth -->|"creates and reads"| node_db
node_session -->|"provides identity"| node_guards
node_guards -->|"loads user"| node_db
node_student -.->|"views progress"| node_dashboard
node_dashboarddata -.->|"gets current user"| node_guards
node_academicview -->|"manages academics"| node_academic
node_academic -->|"checks user"| node_guards
node_academic -->|"reads and writes"| node_db
node_academic -->|"calculates grades"| node_gpa
node_attendanceview -->|"manages attendance"| node_attendance
node_attendance -.->|"calculates attendance"| node_attendancecalc
node_student -.->|"imports records"| node_smartmodal
node_smartmodal -->|"submits import"| node_smartaction
node_smartaction -->|"extracts with"| node_gemini
node_smartaction -->|"matches records"| node_matching
node_smartaction -->|"persists import"| node_db
node_eventsview -->|"loads event data"| node_events
node_eventform -->|"creates events"| node_events
node_events -->|"checks user"| node_guards
node_events -->|"reads and writes"| node_db
node_reminders -->|"loads reminders"| node_events
node_reminders -->|"dispatches alerts"| node_browsernotify
node_profile -.->|"edits profile"| node_student
node_settings -.->|"edits preferences"| node_student
node_layout -.->|"frames app views"| node_student
node_student -->|"updates profile"| node_profile
node_student -->|"updates settings"| node_settings
node_student -->|"uses workspace"| node_layout

click node_registration "https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/register/page.tsx"
click node_login "https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/login/page.tsx"
click node_auth "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/auth.ts"
click node_session "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/auth/session.ts"
click node_guards "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/auth/guards.ts"
click node_dashboard "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/dashboard/dashboard-view.tsx"
click node_dashboarddata "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/dashboard.ts"
click node_academicview "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/grades/grades-view.tsx"
click node_academic "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/academic.ts"
click node_gpa "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/calculations/gpa.ts"
click node_attendanceview "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/attendance/attendance-view.tsx"
click node_attendance "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/attendance.ts"
click node_attendancecalc "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/calculations/attendance.ts"
click node_smartmodal "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/ai/smart-import-modal.tsx"
click node_smartaction "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/smart-import.ts"
click node_gemini "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/gemini.ts"
click node_matching "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/matching.ts"
click node_eventsview "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/events/events-cockpit.tsx"
click node_events "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/events.ts"
click node_eventform "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/events/event-form-modal.tsx"
click node_reminders "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/reminders/reminder-center.tsx"
click node_browsernotify "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/notifications/browser.ts"
click node_profile "https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/profile/profile-form.tsx"
click node_settings "https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/settings/settings-form.tsx"
click node_layout "https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/layout/app-layout.tsx"
click node_db "https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/prisma.ts"

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_registration,node_login,node_auth,node_session,node_guards toneBlue
class node_academicview,node_academic,node_gpa,node_attendanceview,node_attendance,node_attendancecalc,node_smartmodal,node_smartaction,node_gemini,node_matching toneAmber
class node_eventsview,node_events,node_eventform,node_reminders,node_browsernotify toneMint
class node_dashboard,node_dashboarddata,node_profile,node_settings,node_layout,node_db toneRose
class node_student toneIndigo
```

## Components

### Access and identity

- [Registration](https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/register/page.tsx): `src/app/register/page.tsx`
- [Login](https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Auth actions](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/auth.ts): `src/lib/actions/auth.ts`
- [Session cookies](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/auth/session.ts): `src/lib/auth/session.ts`
- [Access guards](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/auth/guards.ts): `src/lib/auth/guards.ts`

### Academic tracking

- [Grades view](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/grades/grades-view.tsx): `src/components/grades/grades-view.tsx`
- [Academic actions](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/academic.ts): `src/lib/actions/academic.ts`
- [Grade calculations](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/calculations/gpa.ts): `src/lib/calculations/gpa.ts`
- [Attendance view](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/attendance/attendance-view.tsx): `src/components/attendance/attendance-view.tsx`
- [Attendance actions](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/attendance.ts): `src/lib/actions/attendance.ts`
- [Attendance calculations](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/calculations/attendance.ts): `src/lib/calculations/attendance.ts`
- [Smart import](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/ai/smart-import-modal.tsx): `src/components/ai/smart-import-modal.tsx`
- [Import processing](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/smart-import.ts): `src/lib/ai/smart-import.ts`
- [Gemini integration](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/gemini.ts): `src/lib/ai/gemini.ts`
- [Record matching](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/ai/matching.ts): `src/lib/ai/matching.ts`

### Events and alerts

- [Events cockpit](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/events/events-cockpit.tsx): `src/components/events/events-cockpit.tsx`
- [Event actions](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/events.ts): `src/lib/actions/events.ts`
- [Event editor](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/events/event-form-modal.tsx): `src/components/events/event-form-modal.tsx`
- [Reminder center](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/reminders/reminder-center.tsx): `src/components/reminders/reminder-center.tsx`
- [Browser notifications](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/notifications/browser.ts): `src/lib/notifications/browser.ts`

### Application platform

- [Dashboard](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/dashboard/dashboard-view.tsx): `src/components/dashboard/dashboard-view.tsx`
- [Dashboard data](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/actions/dashboard.ts): `src/lib/actions/dashboard.ts`
- [Profile settings](https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/profile/profile-form.tsx): `src/app/profile/profile-form.tsx`
- [User settings](https://github.com/smokeyy444/smart-student-manager/blob/main/src/app/settings/settings-form.tsx): `src/app/settings/settings-form.tsx`
- [App layout](https://github.com/smokeyy444/smart-student-manager/blob/main/src/components/layout/app-layout.tsx): `src/components/layout/app-layout.tsx`
- [Prisma database](https://github.com/smokeyy444/smart-student-manager/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`

### Other components

- **Student**

## Connections

- Student → Registration: creates account (evidence: `src/app/register/page.tsx`)
- Student → Login: signs in
- Registration → Auth actions: registers via (evidence: `src/app/register/page.tsx`)
- Login → Auth actions: authenticates via (evidence: `src/app/login/page.tsx`)
- Auth actions → Session cookies: sets or clears (evidence: `src/lib/actions/auth.ts`)
- Auth actions → Prisma database: creates and reads (evidence: `src/lib/actions/auth.ts`)
- Session cookies → Access guards: provides identity (evidence: `src/lib/auth/guards.ts`)
- Access guards → Prisma database: loads user (evidence: `src/lib/auth/guards.ts`)
- Student → Dashboard: views progress
- Dashboard data → Access guards: gets current user
- Grades view → Academic actions: manages academics (evidence: `src/app/grades/page.tsx`)
- Academic actions → Access guards: checks user (evidence: `src/lib/actions/academic.ts`)
- Academic actions → Prisma database: reads and writes (evidence: `src/lib/actions/academic.ts`)
- Academic actions → Grade calculations: calculates grades (evidence: `src/lib/actions/academic.ts`)
- Attendance view → Attendance actions: manages attendance (evidence: `src/app/attendance/page.tsx`)
- Attendance actions → Attendance calculations: calculates attendance
- Student → Smart import: imports records
- Smart import → Import processing: submits import (evidence: `src/components/ai/smart-import-modal.tsx`)
- Import processing → Gemini integration: extracts with (evidence: `src/lib/ai/smart-import.ts`)
- Import processing → Record matching: matches records (evidence: `src/lib/ai/smart-import.ts`)
- Import processing → Prisma database: persists import (evidence: `src/lib/ai/smart-import.ts`)
- Events cockpit → Event actions: loads event data (evidence: `src/app/events/page.tsx`)
- Event editor → Event actions: creates events (evidence: `src/components/events/event-form-modal.tsx`)
- Event actions → Access guards: checks user (evidence: `src/lib/actions/events.ts`)
- Event actions → Prisma database: reads and writes (evidence: `src/lib/actions/events.ts`)
- Reminder center → Event actions: loads reminders (evidence: `src/components/reminders/reminder-center.tsx`)
- Reminder center → Browser notifications: dispatches alerts (evidence: `src/components/reminders/reminder-center.tsx`)
- Profile settings → Student: edits profile
- User settings → Student: edits preferences
- App layout → Student: frames app views
- Student → Profile settings: updates profile
- Student → User settings: updates settings
- Student → App layout: uses workspace
