# raminsajjad/ai-university-planner architecture

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

- Interactive diagram: https://gitdiagram.com/raminsajjad/ai-university-planner
- Repository: https://github.com/raminsajjad/ai-university-planner

## Overview

AI University Planner is an authenticated academic-management app: students enter courses, assignments, and exams, then can request an AI-generated daily and weekly study plan grounded in that data. The main workflow runs from authenticated pages through feature clients and server actions to Prisma-backed persistence; the planner action also invokes the Groq-backed generator. Dashboard, analytics, notifications, profile, and settings provide supporting capabilities. Edges reflect the supplied excerpts, SOURCE INDEX references, or README; some implementation details, including unsampled pages and actions, are therefore shown only at subsystem level.

Main entry points: [`lib/prisma.ts`](https://github.com/raminsajjad/ai-university-planner/blob/main/lib/prisma.ts) (Prisma data access), [`lib/auth.ts`](https://github.com/raminsajjad/ai-university-planner/blob/main/lib/auth.ts) (Authentication), [`app/assignments/page.tsx`](https://github.com/raminsajjad/ai-university-planner/blob/main/app/assignments/page.tsx) (Academic pages), [`components/layout/app-shell.tsx`](https://github.com/raminsajjad/ai-university-planner/blob/main/components/layout/app-shell.tsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and shell"]
  node_academic_pages["Academic pages<br/>[page.tsx]"]
  node_planner_page["Planner page<br/>[page.tsx]"]
  node_dashboard_page["Dashboard page<br/>[page.tsx]"]
  node_analytics_page["Analytics page<br/>[page.tsx]"]
  node_notifications_page["Notifications page<br/>[page.tsx]"]
  node_app_shell["App shell<br/>[app-shell.tsx]"]
end

subgraph group_academic["Academic records"]
  node_course_ui["Course management<br/>[courses-client.tsx]"]
  node_assignment_ui["Assignment management"]
  node_exam_ui["Exam management<br/>[exams-client.tsx]"]
  node_course_actions["Course actions<br/>[courses.ts]"]
  node_assignment_actions["Assignment actions<br/>[assignments.ts]"]
  node_exam_actions["Exam actions<br/>[exams.ts]"]
  node_notifications_actions["Notification actions<br/>[notifications.ts]"]
  node_notifications_ui["Notification interface"]
end

subgraph group_planning["Planning and insights"]
  node_planner_ui["Planner form and result<br/>[planner-client.tsx]"]
  node_planner_actions["Plan generation action<br/>[planner.ts]"]
  node_ai_generator["Study plan generator<br/>[ai.ts]"]
  node_dashboard_data["Dashboard metrics<br/>[dashboard.ts]"]
  node_analytics_views["Analytics charts"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_auth_actions["Registration<br/>[auth.ts]"]
  node_profile["Student profile<br/>[profile.ts]"]
  node_settings["Account settings<br/>[page.tsx]"]
end

subgraph group_platform["Persistence and services"]
  node_prisma["Prisma data access<br/>[prisma.ts]"]
  node_database[("PostgreSQL")]
  node_groq{{"Groq AI service"}}
end

node_student(("Student"))

node_student -->|"manages records"| node_academic_pages
node_student -->|"requests plan"| node_planner_page
node_student -->|"views progress"| node_dashboard_page
node_student -->|"views analytics"| node_analytics_page
node_student -->|"checks alerts"| node_notifications_page
node_academic_pages -->|"renders"| node_course_ui
node_academic_pages -->|"renders"| node_assignment_ui
node_academic_pages -->|"renders"| node_exam_ui
node_academic_pages -->|"uses shell"| node_app_shell
node_planner_page -->|"renders"| node_planner_ui
node_planner_page -->|"uses shell"| node_app_shell
node_dashboard_page -->|"loads metrics"| node_dashboard_data
node_dashboard_page -->|"uses shell"| node_app_shell
node_analytics_page -->|"renders charts"| node_analytics_views
node_analytics_page -->|"uses shell"| node_app_shell
node_notifications_page -->|"renders"| node_notifications_ui
node_notifications_page -->|"uses shell"| node_app_shell
node_course_ui -->|"calls"| node_course_actions
node_assignment_ui -->|"calls"| node_assignment_actions
node_exam_ui -->|"calls"| node_exam_actions
node_planner_ui -->|"submits"| node_planner_actions
node_notifications_ui -->|"calls"| node_notifications_actions
node_planner_actions -->|"generates plan"| node_ai_generator
node_ai_generator -->|"requests completion"| node_groq
node_course_actions -->|"checks session"| node_auth
node_assignment_actions -->|"checks session"| node_auth
node_exam_actions -->|"checks session"| node_auth
node_planner_actions -->|"checks session"| node_auth
node_notifications_actions -->|"checks session"| node_auth
node_auth_actions -->|"accesses data"| node_prisma
node_auth -->|"queries users"| node_prisma
node_course_actions -->|"reads and writes"| node_prisma
node_assignment_actions -->|"reads and writes"| node_prisma
node_exam_actions -->|"reads and writes"| node_prisma
node_planner_actions -->|"loads and saves"| node_prisma
node_notifications_actions -->|"reads and writes"| node_prisma
node_dashboard_data -.->|"loads metrics"| node_prisma
node_profile -.->|"accesses profile data"| node_prisma
node_prisma -->|"persists records"| node_database
node_student -->|"manages account"| node_settings

click node_academic_pages "https://github.com/raminsajjad/ai-university-planner/blob/main/app/assignments/page.tsx"
click node_planner_page "https://github.com/raminsajjad/ai-university-planner/blob/main/app/planner/page.tsx"
click node_dashboard_page "https://github.com/raminsajjad/ai-university-planner/blob/main/app/dashboard/page.tsx"
click node_analytics_page "https://github.com/raminsajjad/ai-university-planner/blob/main/app/analytics/page.tsx"
click node_notifications_page "https://github.com/raminsajjad/ai-university-planner/blob/main/app/notifications/page.tsx"
click node_app_shell "https://github.com/raminsajjad/ai-university-planner/blob/main/components/layout/app-shell.tsx"
click node_course_ui "https://github.com/raminsajjad/ai-university-planner/blob/main/components/courses/courses-client.tsx"
click node_assignment_ui "https://github.com/raminsajjad/ai-university-planner/blob/main/components/assignments/assignments-client.tsx"
click node_exam_ui "https://github.com/raminsajjad/ai-university-planner/blob/main/components/exams/exams-client.tsx"
click node_course_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/courses.ts"
click node_assignment_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/assignments.ts"
click node_exam_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/exams.ts"
click node_planner_ui "https://github.com/raminsajjad/ai-university-planner/blob/main/components/planner/planner-client.tsx"
click node_planner_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/planner.ts"
click node_ai_generator "https://github.com/raminsajjad/ai-university-planner/blob/main/lib/ai.ts"
click node_dashboard_data "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/dashboard.ts"
click node_analytics_views "https://github.com/raminsajjad/ai-university-planner/blob/main/components/analytics/analytics-charts.tsx"
click node_notifications_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/notifications.ts"
click node_notifications_ui "https://github.com/raminsajjad/ai-university-planner/blob/main/components/notifications/notifications-client.tsx"
click node_auth "https://github.com/raminsajjad/ai-university-planner/blob/main/lib/auth.ts"
click node_auth_actions "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/auth.ts"
click node_profile "https://github.com/raminsajjad/ai-university-planner/blob/main/actions/profile.ts"
click node_settings "https://github.com/raminsajjad/ai-university-planner/blob/main/app/settings/page.tsx"
click node_prisma "https://github.com/raminsajjad/ai-university-planner/blob/main/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_academic_pages,node_planner_page,node_dashboard_page,node_analytics_page,node_notifications_page,node_app_shell toneBlue
class node_course_ui,node_assignment_ui,node_exam_ui,node_course_actions,node_assignment_actions,node_exam_actions,node_notifications_actions,node_notifications_ui toneAmber
class node_planner_ui,node_planner_actions,node_ai_generator,node_dashboard_data,node_analytics_views toneMint
class node_auth,node_auth_actions,node_profile,node_settings toneRose
class node_prisma,node_database,node_groq,node_student toneIndigo
```

## Components

### App entry and shell

- [Academic pages](https://github.com/raminsajjad/ai-university-planner/blob/main/app/assignments/page.tsx): `app/assignments/page.tsx`
- [Planner page](https://github.com/raminsajjad/ai-university-planner/blob/main/app/planner/page.tsx): `app/planner/page.tsx`
- [Dashboard page](https://github.com/raminsajjad/ai-university-planner/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Analytics page](https://github.com/raminsajjad/ai-university-planner/blob/main/app/analytics/page.tsx): `app/analytics/page.tsx`
- [Notifications page](https://github.com/raminsajjad/ai-university-planner/blob/main/app/notifications/page.tsx): `app/notifications/page.tsx`
- [App shell](https://github.com/raminsajjad/ai-university-planner/blob/main/components/layout/app-shell.tsx): `components/layout/app-shell.tsx`

### Academic records

- [Course management](https://github.com/raminsajjad/ai-university-planner/blob/main/components/courses/courses-client.tsx): `components/courses/courses-client.tsx`
- [Assignment management](https://github.com/raminsajjad/ai-university-planner/blob/main/components/assignments/assignments-client.tsx): `components/assignments/assignments-client.tsx`
- [Exam management](https://github.com/raminsajjad/ai-university-planner/blob/main/components/exams/exams-client.tsx): `components/exams/exams-client.tsx`
- [Course actions](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/courses.ts): `actions/courses.ts`
- [Assignment actions](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/assignments.ts): `actions/assignments.ts`
- [Exam actions](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/exams.ts): `actions/exams.ts`
- [Notification actions](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/notifications.ts): `actions/notifications.ts`
- [Notification interface](https://github.com/raminsajjad/ai-university-planner/blob/main/components/notifications/notifications-client.tsx): `components/notifications/notifications-client.tsx`

### Planning and insights

- [Planner form and result](https://github.com/raminsajjad/ai-university-planner/blob/main/components/planner/planner-client.tsx): `components/planner/planner-client.tsx`
- [Plan generation action](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/planner.ts): `actions/planner.ts`
- [Study plan generator](https://github.com/raminsajjad/ai-university-planner/blob/main/lib/ai.ts): `lib/ai.ts`
- [Dashboard metrics](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/dashboard.ts): `actions/dashboard.ts`
- [Analytics charts](https://github.com/raminsajjad/ai-university-planner/blob/main/components/analytics/analytics-charts.tsx): `components/analytics/analytics-charts.tsx`

### Identity and profile

- [Authentication](https://github.com/raminsajjad/ai-university-planner/blob/main/lib/auth.ts): `lib/auth.ts`
- [Registration](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/auth.ts): `actions/auth.ts`
- [Student profile](https://github.com/raminsajjad/ai-university-planner/blob/main/actions/profile.ts): `actions/profile.ts`
- [Account settings](https://github.com/raminsajjad/ai-university-planner/blob/main/app/settings/page.tsx): `app/settings/page.tsx`

### Persistence and services

- [Prisma data access](https://github.com/raminsajjad/ai-university-planner/blob/main/lib/prisma.ts): `lib/prisma.ts`
- **PostgreSQL**
- **Groq AI service**

### Other components

- **Student**

## Connections

- Student → Academic pages: manages records
- Student → Planner page: requests plan
- Student → Dashboard page: views progress
- Student → Analytics page: views analytics
- Student → Notifications page: checks alerts
- Academic pages → Course management: renders
- Academic pages → Assignment management: renders (evidence: `app/assignments/page.tsx`)
- Academic pages → Exam management: renders
- Academic pages → App shell: uses shell (evidence: `app/assignments/page.tsx`)
- Planner page → Planner form and result: renders (evidence: `app/planner/page.tsx`)
- Planner page → App shell: uses shell (evidence: `app/planner/page.tsx`)
- Dashboard page → Dashboard metrics: loads metrics (evidence: `app/dashboard/page.tsx`)
- Dashboard page → App shell: uses shell (evidence: `app/dashboard/page.tsx`)
- Analytics page → Analytics charts: renders charts (evidence: `app/analytics/page.tsx`)
- Analytics page → App shell: uses shell (evidence: `app/analytics/page.tsx`)
- Notifications page → Notification interface: renders (evidence: `app/notifications/page.tsx`)
- Notifications page → App shell: uses shell (evidence: `app/notifications/page.tsx`)
- Course management → Course actions: calls (evidence: `components/courses/courses-client.tsx`)
- Assignment management → Assignment actions: calls (evidence: `components/assignments/assignments-client.tsx`)
- Exam management → Exam actions: calls (evidence: `components/exams/exams-client.tsx`)
- Planner form and result → Plan generation action: submits (evidence: `components/planner/planner-client.tsx`)
- Notification interface → Notification actions: calls (evidence: `components/notifications/notifications-client.tsx`)
- Plan generation action → Study plan generator: generates plan (evidence: `actions/planner.ts`)
- Study plan generator → Groq AI service: requests completion (evidence: `lib/ai.ts`)
- Course actions → Authentication: checks session (evidence: `actions/courses.ts`)
- Assignment actions → Authentication: checks session (evidence: `actions/assignments.ts`)
- Exam actions → Authentication: checks session (evidence: `actions/exams.ts`)
- Plan generation action → Authentication: checks session (evidence: `actions/planner.ts`)
- Notification actions → Authentication: checks session (evidence: `actions/notifications.ts`)
- Registration → Prisma data access: accesses data (evidence: `actions/auth.ts`)
- Authentication → Prisma data access: queries users (evidence: `lib/auth.ts`)
- Course actions → Prisma data access: reads and writes (evidence: `actions/courses.ts`)
- Assignment actions → Prisma data access: reads and writes (evidence: `actions/assignments.ts`)
- Exam actions → Prisma data access: reads and writes (evidence: `actions/exams.ts`)
- Plan generation action → Prisma data access: loads and saves (evidence: `actions/planner.ts`)
- Notification actions → Prisma data access: reads and writes (evidence: `actions/notifications.ts`)
- Dashboard metrics → Prisma data access: loads metrics
- Student profile → Prisma data access: accesses profile data
- Prisma data access → PostgreSQL: persists records
- Student → Account settings: manages account
