# clough/the-student-portal architecture

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

- Interactive diagram: https://gitdiagram.com/clough/the-student-portal
- Repository: https://github.com/clough/the-student-portal

## Overview

The Student Portal is a web application for student course discovery and academic support, with assistant and administrator capabilities. The principal evidenced route is session-based entry to the authenticated home area; students can then search courses, with submitted criteria handled by the course-list endpoint. Administrators have a dashboard for user and course management. The README also describes registration, overrides, messaging, advising, and assistant tools, but their implementations or wiring are not visible in the sampled source, so these are shown as documented capabilities without inferred connections.

Main entry points: [`index.php`](https://github.com/clough/the-student-portal/blob/master/index.php) (Session router), [`dashboard/index.php`](https://github.com/clough/the-student-portal/blob/master/dashboard/index.php) (Management dashboard), [`login/index.php`](https://github.com/clough/the-student-portal/blob/master/login/index.php) (Login form), [`search-course/index.php`](https://github.com/clough/the-student-portal/blob/master/search-course/index.php) (Course search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and setup"]
  node_router["Session router<br/>[index.php]"]
  node_login_page["Login form<br/>[index.php]"]
  node_login_handler["Login handler<br/>[login.php]"]
  node_logout["Logout<br/>[logout.php]"]
  node_installer["Setup installer<br/>[install.php]"]
end

subgraph group_student["Student portal"]
  node_home["Home and news<br/>[index.php]"]
  node_course_search["Course search<br/>[index.php]"]
  node_course_list["Course results<br/>[list-course.php]"]
  node_course_detail["Course detail<br/>[course-detail.php]"]
  node_student_features["Profile, registration, overrides<br/>[student.php]"]
  node_advisory["Course selection advice<br/>[assistant.php]"]
  node_messages["Messaging<br/>[user.php]"]
end

subgraph group_admin["Administration"]
  node_dashboard["Management dashboard<br/>[index.php]"]
  node_course_admin["Course management"]
  node_course_save["Course create and update<br/>[save-course.php]"]
  node_user_admin["User management"]
  node_user_save["User create and update<br/>[save-user.php]"]
end

subgraph group_domain["Shared domain"]
  node_schema[("Database schema<br/>[database.sql]")]
  node_user_domain["User domain<br/>[user.php]"]
  node_course_domain["Course domain<br/>[course.php]"]
  node_assistant_domain["Assistant tools<br/>[assistant.php]"]
end

node_visitor(("Visitor"))
node_student_actor(("Student"))
node_assistant_actor(("Assistant"))
node_admin_actor(("Administrator"))

node_visitor -->|"opens"| node_router
node_router -->|"redirects unauthenticated"| node_login_page
node_router -->|"redirects authenticated"| node_home
node_login_page -->|"submits credentials"| node_login_handler
node_student_actor -->|"searches courses"| node_course_search
node_course_search -->|"posts criteria"| node_course_list
node_course_list -->|"opens details"| node_course_detail
node_student_actor -.->|"uses"| node_student_features
node_student_actor -.->|"requests advice"| node_advisory
node_student_actor -.->|"sends and views"| node_messages
node_assistant_actor -.->|"uses advisory tools"| node_assistant_domain
node_assistant_actor -.->|"sends and views"| node_messages
node_admin_actor -->|"manages portal"| node_dashboard
node_dashboard -->|"opens course management"| node_course_admin
node_dashboard -->|"opens user management"| node_user_admin
node_course_admin -->|"manages courses"| node_course_save
node_user_admin -->|"manages users"| node_user_save
node_installer -.->|"initializes database"| node_schema

click node_router "https://github.com/clough/the-student-portal/blob/master/index.php"
click node_login_page "https://github.com/clough/the-student-portal/blob/master/login/index.php"
click node_login_handler "https://github.com/clough/the-student-portal/blob/master/login/login.php"
click node_logout "https://github.com/clough/the-student-portal/blob/master/login/logout.php"
click node_installer "https://github.com/clough/the-student-portal/blob/master/setup/install.php"
click node_schema "https://github.com/clough/the-student-portal/blob/master/setup/database.sql"
click node_home "https://github.com/clough/the-student-portal/blob/master/home/index.php"
click node_course_search "https://github.com/clough/the-student-portal/blob/master/search-course/index.php"
click node_course_list "https://github.com/clough/the-student-portal/blob/master/search-course/list-course.php"
click node_course_detail "https://github.com/clough/the-student-portal/blob/master/search-course/course-detail.php"
click node_student_features "https://github.com/clough/the-student-portal/blob/master/common/library/student.php"
click node_advisory "https://github.com/clough/the-student-portal/blob/master/common/library/assistant.php"
click node_messages "https://github.com/clough/the-student-portal/blob/master/common/library/user.php"
click node_dashboard "https://github.com/clough/the-student-portal/blob/master/dashboard/index.php"
click node_course_admin "https://github.com/clough/the-student-portal/blob/master/dashboard/course-management.php"
click node_course_save "https://github.com/clough/the-student-portal/blob/master/dashboard/save-course.php"
click node_user_admin "https://github.com/clough/the-student-portal/blob/master/dashboard/user-management.php"
click node_user_save "https://github.com/clough/the-student-portal/blob/master/dashboard/save-user.php"
click node_user_domain "https://github.com/clough/the-student-portal/blob/master/common/library/user.php"
click node_course_domain "https://github.com/clough/the-student-portal/blob/master/common/library/course.php"
click node_assistant_domain "https://github.com/clough/the-student-portal/blob/master/common/library/assistant.php"

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_router,node_login_page,node_login_handler,node_logout,node_installer toneBlue
class node_home,node_course_search,node_course_list,node_course_detail,node_student_features,node_advisory,node_messages toneAmber
class node_dashboard,node_course_admin,node_course_save,node_user_admin,node_user_save toneMint
class node_schema,node_user_domain,node_course_domain,node_assistant_domain toneRose
class node_visitor,node_student_actor,node_assistant_actor,node_admin_actor toneIndigo
```

## Components

### Access and setup

- [Session router](https://github.com/clough/the-student-portal/blob/master/index.php): `index.php`
- [Login form](https://github.com/clough/the-student-portal/blob/master/login/index.php): `login/index.php`
- [Login handler](https://github.com/clough/the-student-portal/blob/master/login/login.php): `login/login.php`
- [Logout](https://github.com/clough/the-student-portal/blob/master/login/logout.php): `login/logout.php`
- [Setup installer](https://github.com/clough/the-student-portal/blob/master/setup/install.php): `setup/install.php`

### Student portal

- [Home and news](https://github.com/clough/the-student-portal/blob/master/home/index.php): `home/index.php`
- [Course search](https://github.com/clough/the-student-portal/blob/master/search-course/index.php): `search-course/index.php`
- [Course results](https://github.com/clough/the-student-portal/blob/master/search-course/list-course.php): `search-course/list-course.php`
- [Course detail](https://github.com/clough/the-student-portal/blob/master/search-course/course-detail.php): `search-course/course-detail.php`
- [Profile, registration, overrides](https://github.com/clough/the-student-portal/blob/master/common/library/student.php): `common/library/student.php`
- [Course selection advice](https://github.com/clough/the-student-portal/blob/master/common/library/assistant.php): `common/library/assistant.php`
- [Messaging](https://github.com/clough/the-student-portal/blob/master/common/library/user.php): `common/library/user.php`

### Administration

- [Management dashboard](https://github.com/clough/the-student-portal/blob/master/dashboard/index.php): `dashboard/index.php`
- [Course management](https://github.com/clough/the-student-portal/blob/master/dashboard/course-management.php): `dashboard/course-management.php`
- [Course create and update](https://github.com/clough/the-student-portal/blob/master/dashboard/save-course.php): `dashboard/save-course.php`
- [User management](https://github.com/clough/the-student-portal/blob/master/dashboard/user-management.php): `dashboard/user-management.php`
- [User create and update](https://github.com/clough/the-student-portal/blob/master/dashboard/save-user.php): `dashboard/save-user.php`

### Shared domain

- [Database schema](https://github.com/clough/the-student-portal/blob/master/setup/database.sql): `setup/database.sql`
- [User domain](https://github.com/clough/the-student-portal/blob/master/common/library/user.php): `common/library/user.php`
- [Course domain](https://github.com/clough/the-student-portal/blob/master/common/library/course.php): `common/library/course.php`
- [Assistant tools](https://github.com/clough/the-student-portal/blob/master/common/library/assistant.php): `common/library/assistant.php`

### Other components

- **Visitor**
- **Student**
- **Assistant**
- **Administrator**

## Connections

- Visitor → Session router: opens
- Session router → Login form: redirects unauthenticated
- Session router → Home and news: redirects authenticated
- Login form → Login handler: submits credentials
- Student → Course search: searches courses
- Course search → Course results: posts criteria
- Course results → Course detail: opens details
- Student → Profile, registration, overrides: uses
- Student → Course selection advice: requests advice
- Student → Messaging: sends and views
- Assistant → Assistant tools: uses advisory tools
- Assistant → Messaging: sends and views
- Administrator → Management dashboard: manages portal
- Management dashboard → Course management: opens course management
- Management dashboard → User management: opens user management
- Course management → Course create and update: manages courses
- User management → User create and update: manages users
- Setup installer → Database schema: initializes database
