# xieshie/student-services architecture

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

- Interactive diagram: https://gitdiagram.com/xieshie/student-services
- Repository: https://github.com/xieshie/student-services

## Overview

Student Services is a Laravel/Livewire application for school staff to manage students and service requests, with a Sanctum REST API and asynchronous Excel imports. The main workflow is staff login, student lookup or maintenance, then creating and reviewing requests; administrators can upload imports whose rows create students and pending requests and produce import logs. The README documents capabilities and route roles; some component and route wiring is represented from that documentation because those sources were not sampled.

Main entry points: [`routes/web.php`](https://github.com/xieshie/student-services/blob/master/routes/web.php) (Web routes), [`app/Models/Student.php`](https://github.com/xieshie/student-services/blob/master/app/Models/Student.php) (Students), [`app/Models/ServiceRequest.php`](https://github.com/xieshie/student-services/blob/master/app/Models/ServiceRequest.php) (Service requests), [`app/Jobs/ProcessServiceRequestImport.php`](https://github.com/xieshie/student-services/blob/master/app/Jobs/ProcessServiceRequestImport.php) (Import processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Staff Web"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_login["Login<br/>[Login.php]"]
  node_dashboard["Dashboard<br/>[Dashboard.php]"]
  node_students_ui["Student pages<br/>[StudentIndex.php]"]
  node_student_forms["Student forms<br/>[StudentCreate.php]"]
  node_request_pages["Request pages"]
  node_request_create["Request creation"]
  node_request_show["Request review"]
end

subgraph group_api["REST API"]
  node_student_api["Student API"]
  node_request_api["Request API"]
  node_api_routes["API routes<br/>[api.php]"]
  node_auth_middleware["Role middleware"]
end

subgraph group_import["Excel Import"]
  node_import_ui["Import logs UI<br/>[ImportIndex.php]"]
  node_upload["Import upload"]
  node_import_job["Import processor"]
  node_excel["Excel reader"]
  node_queue["Laravel queue<br/>[queue.php]"]
end

subgraph group_data["Domain Data"]
  node_students["Students<br/>[Student.php]"]
  node_requests["Service requests<br/>[ServiceRequest.php]"]
  node_logs["Import logs<br/>[ImportLog.php]"]
  node_users["Users<br/>[User.php]"]
  node_database[("Database<br/>[database.php]")]
end

node_staff(("Staff"))
node_api_client(("API client"))

node_staff -->|"opens pages"| node_web_routes
node_web_routes -->|"routes login"| node_login
node_web_routes -->|"routes dashboard"| node_dashboard
node_web_routes -->|"routes students"| node_students_ui
node_web_routes -->|"routes edits"| node_student_forms
node_web_routes -->|"routes requests"| node_request_pages
node_web_routes -->|"routes creation"| node_request_create
node_web_routes -->|"routes review"| node_request_show
node_web_routes -->|"routes imports"| node_import_ui
node_students_ui -->|"queries"| node_students
node_student_forms -->|"creates or updates"| node_students
node_request_pages -->|"queries"| node_requests
node_request_create -->|"searches"| node_students
node_request_create -->|"creates"| node_requests
node_request_show -->|"updates status"| node_requests
node_api_client -->|"calls"| node_api_routes
node_api_routes -->|"dispatches"| node_student_api
node_api_routes -->|"dispatches"| node_request_api
node_api_routes -->|"protects routes"| node_auth_middleware
node_student_api -->|"queries"| node_students
node_request_api -->|"queries and updates"| node_requests
node_staff -->|"uploads workbook"| node_upload
node_upload -->|"creates log"| node_logs
node_upload -->|"dispatches job"| node_queue
node_queue -->|"runs job"| node_import_job
node_import_job -.->|"reads workbook"| node_excel
node_import_job -->|"finds or creates"| node_students
node_import_job -->|"checks and creates"| node_requests
node_import_job -->|"updates summary"| node_logs
node_students -->|"persists"| node_database
node_requests -->|"persists"| node_database
node_logs -->|"persists"| node_database
node_users -->|"persists"| node_database
node_import_ui -->|"shows logs"| node_logs

click node_web_routes "https://github.com/xieshie/student-services/blob/master/routes/web.php"
click node_login "https://github.com/xieshie/student-services/blob/master/app/Livewire/Auth/Login.php"
click node_dashboard "https://github.com/xieshie/student-services/blob/master/app/Livewire/Dashboard.php"
click node_students_ui "https://github.com/xieshie/student-services/blob/master/app/Livewire/Students/StudentIndex.php"
click node_student_forms "https://github.com/xieshie/student-services/blob/master/app/Livewire/Students/StudentCreate.php"
click node_request_pages "https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestIndex.php"
click node_request_create "https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestCreate.php"
click node_request_show "https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestShow.php"
click node_import_ui "https://github.com/xieshie/student-services/blob/master/app/Livewire/Imports/ImportIndex.php"
click node_student_api "https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/Api/StudentApiController.php"
click node_request_api "https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/Api/ServiceRequestApiController.php"
click node_api_routes "https://github.com/xieshie/student-services/blob/master/routes/api.php"
click node_auth_middleware "https://github.com/xieshie/student-services/blob/master/app/Http/Middleware/AdminMiddleware.php"
click node_upload "https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/ImportUploadController.php"
click node_import_job "https://github.com/xieshie/student-services/blob/master/app/Jobs/ProcessServiceRequestImport.php"
click node_students "https://github.com/xieshie/student-services/blob/master/app/Models/Student.php"
click node_requests "https://github.com/xieshie/student-services/blob/master/app/Models/ServiceRequest.php"
click node_logs "https://github.com/xieshie/student-services/blob/master/app/Models/ImportLog.php"
click node_users "https://github.com/xieshie/student-services/blob/master/app/Models/User.php"
click node_database "https://github.com/xieshie/student-services/blob/master/config/database.php"
click node_queue "https://github.com/xieshie/student-services/blob/master/config/queue.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_web_routes,node_login,node_dashboard,node_students_ui,node_student_forms,node_request_pages,node_request_create,node_request_show,node_api_client toneBlue
class node_student_api,node_request_api,node_api_routes,node_auth_middleware toneAmber
class node_import_ui,node_upload,node_import_job,node_excel,node_queue toneMint
class node_students,node_requests,node_logs,node_users,node_database toneRose
class node_staff toneIndigo
```

## Components

### Staff Web

- [Web routes](https://github.com/xieshie/student-services/blob/master/routes/web.php): `routes/web.php`
- [Login](https://github.com/xieshie/student-services/blob/master/app/Livewire/Auth/Login.php): `app/Livewire/Auth/Login.php`
- [Dashboard](https://github.com/xieshie/student-services/blob/master/app/Livewire/Dashboard.php): `app/Livewire/Dashboard.php`
- [Student pages](https://github.com/xieshie/student-services/blob/master/app/Livewire/Students/StudentIndex.php): `app/Livewire/Students/StudentIndex.php`
- [Student forms](https://github.com/xieshie/student-services/blob/master/app/Livewire/Students/StudentCreate.php): `app/Livewire/Students/StudentCreate.php`
- [Request pages](https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestIndex.php): `app/Livewire/ServiceRequests/ServiceRequestIndex.php`
- [Request creation](https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestCreate.php): `app/Livewire/ServiceRequests/ServiceRequestCreate.php`
- [Request review](https://github.com/xieshie/student-services/blob/master/app/Livewire/ServiceRequests/ServiceRequestShow.php): `app/Livewire/ServiceRequests/ServiceRequestShow.php`

### REST API

- [Student API](https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/Api/StudentApiController.php): `app/Http/Controllers/Api/StudentApiController.php`
- [Request API](https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/Api/ServiceRequestApiController.php): `app/Http/Controllers/Api/ServiceRequestApiController.php`
- [API routes](https://github.com/xieshie/student-services/blob/master/routes/api.php): `routes/api.php`
- [Role middleware](https://github.com/xieshie/student-services/blob/master/app/Http/Middleware/AdminMiddleware.php): `app/Http/Middleware/AdminMiddleware.php`

### Excel Import

- [Import logs UI](https://github.com/xieshie/student-services/blob/master/app/Livewire/Imports/ImportIndex.php): `app/Livewire/Imports/ImportIndex.php`
- [Import upload](https://github.com/xieshie/student-services/blob/master/app/Http/Controllers/ImportUploadController.php): `app/Http/Controllers/ImportUploadController.php`
- [Import processor](https://github.com/xieshie/student-services/blob/master/app/Jobs/ProcessServiceRequestImport.php): `app/Jobs/ProcessServiceRequestImport.php`
- **Excel reader**
- [Laravel queue](https://github.com/xieshie/student-services/blob/master/config/queue.php): `config/queue.php`

### Domain Data

- [Students](https://github.com/xieshie/student-services/blob/master/app/Models/Student.php): `app/Models/Student.php`
- [Service requests](https://github.com/xieshie/student-services/blob/master/app/Models/ServiceRequest.php): `app/Models/ServiceRequest.php`
- [Import logs](https://github.com/xieshie/student-services/blob/master/app/Models/ImportLog.php): `app/Models/ImportLog.php`
- [Users](https://github.com/xieshie/student-services/blob/master/app/Models/User.php): `app/Models/User.php`
- [Database](https://github.com/xieshie/student-services/blob/master/config/database.php): `config/database.php`

### Other components

- **Staff**
- **API client**

## Connections

- Staff → Web routes: opens pages
- Web routes → Login: routes login
- Web routes → Dashboard: routes dashboard
- Web routes → Student pages: routes students
- Web routes → Student forms: routes edits
- Web routes → Request pages: routes requests
- Web routes → Request creation: routes creation
- Web routes → Request review: routes review
- Web routes → Import logs UI: routes imports
- Student pages → Students: queries
- Student forms → Students: creates or updates
- Request pages → Service requests: queries
- Request creation → Students: searches
- Request creation → Service requests: creates
- Request review → Service requests: updates status
- API client → API routes: calls
- API routes → Student API: dispatches
- API routes → Request API: dispatches
- API routes → Role middleware: protects routes
- Student API → Students: queries
- Request API → Service requests: queries and updates
- Staff → Import upload: uploads workbook
- Import upload → Import logs: creates log
- Import upload → Laravel queue: dispatches job
- Laravel queue → Import processor: runs job
- Import processor → Excel reader: reads workbook
- Import processor → Students: finds or creates
- Import processor → Service requests: checks and creates
- Import processor → Import logs: updates summary
- Students → Database: persists
- Service requests → Database: persists
- Import logs → Database: persists
- Users → Database: persists
- Import logs UI → Import logs: shows logs
