# jabinkvm/laravel-todo-app architecture

> Architecture diagram of the GitHub repository jabinkvm/laravel-todo-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jabinkvm/laravel-todo-app
- Repository: https://github.com/jabinkvm/laravel-todo-app

## Overview

This Laravel application supports school administration of student accounts and assigned tasks, alongside role-based dashboards and school–student messaging. Users enter through web routes; authentication dispatches by role, while school and student actions manage task and student records. Chat handles conversations, messages, read state, and image attachments. The source excerpts show key controller/model interactions; many route mappings and other capabilities are supported by the source index, while some view and persistence details were not sampled.

Main entry points: [`routes/web.php`](https://github.com/jabinkvm/laravel-todo-app/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/ChatController.php`](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/ChatController.php) (Chat actions), [`app/Http/Controllers/AdminController.php`](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/AdminController.php) (Administration), [`app/Http/Controllers/SchoolController.php`](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/SchoolController.php) (School management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web and access"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_login["Login and sessions"]
  node_registration["Registration"]
  node_role_middleware["Role access<br/>[RoleMiddleware.php]"]
end

subgraph group_accounts["School and student management"]
  node_admin["Administration"]
  node_school["School management"]
  node_student["Student dashboard"]
  node_profile["Profile management"]
  node_user_model[("User records<br/>[User.php]")]
  node_school_model[("School records<br/>[School.php]")]
  node_student_model[("Student records<br/>[Student.php]")]
end

subgraph group_tasks["Task workflow"]
  node_task_controller["Task actions<br/>[TaskController.php]"]
  node_task_model[("Task records<br/>[Task.php]")]
end

subgraph group_messaging["Messaging"]
  node_chat_controller["Chat actions<br/>[ChatController.php]"]
  node_conversation_model[("Conversations<br/>[Conversation.php]")]
  node_message_model[("Messages<br/>[Message.php]")]
end

node_visitor(("User"))

node_visitor -.->|"requests pages"| node_web_routes
node_web_routes -->|"routes to"| node_admin
node_web_routes -->|"routes to"| node_school
node_web_routes -->|"routes to"| node_student
node_web_routes -->|"routes to"| node_profile
node_web_routes -->|"routes to"| node_task_controller
node_web_routes -->|"routes to"| node_chat_controller
node_web_routes -->|"includes auth"| node_auth_routes
node_auth_routes -->|"routes to"| node_login
node_auth_routes -->|"routes to"| node_registration
node_login -.->|"role-gates pages"| node_role_middleware
node_login -->|"authenticates"| node_user_model
node_registration -->|"creates account"| node_user_model
node_admin -->|"reads and updates"| node_user_model
node_admin -->|"manages"| node_school_model
node_admin -->|"manages"| node_student_model
node_admin -->|"reads"| node_task_model
node_school -->|"manages accounts"| node_user_model
node_school -->|"loads school"| node_school_model
node_school -->|"creates and manages"| node_student_model
node_school -->|"deletes student tasks"| node_task_model
node_student -->|"loads tasks"| node_task_model
node_task_controller -->|"creates and updates"| node_task_model
node_task_controller -->|"loads assignees"| node_student_model
node_chat_controller -->|"loads conversations"| node_conversation_model
node_chat_controller -->|"reads and sends"| node_message_model
node_chat_controller -->|"finds contacts"| node_school_model
node_chat_controller -->|"finds contacts"| node_student_model
node_chat_controller -->|"loads participants"| node_user_model

click node_web_routes "https://github.com/jabinkvm/laravel-todo-app/blob/main/routes/web.php"
click node_auth_routes "https://github.com/jabinkvm/laravel-todo-app/blob/main/routes/auth.php"
click node_login "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_role_middleware "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_admin "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/AdminController.php"
click node_school "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/SchoolController.php"
click node_student "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/StudentController.php"
click node_profile "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/ProfileController.php"
click node_user_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/User.php"
click node_school_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/School.php"
click node_student_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Student.php"
click node_task_controller "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/TaskController.php"
click node_task_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Task.php"
click node_chat_controller "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/ChatController.php"
click node_conversation_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Conversation.php"
click node_message_model "https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Message.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_auth_routes,node_login,node_registration,node_role_middleware,node_visitor toneBlue
class node_admin,node_school,node_student,node_profile,node_user_model,node_school_model,node_student_model toneAmber
class node_task_controller,node_task_model toneMint
class node_chat_controller,node_conversation_model,node_message_model toneRose
```

## Components

### Web and access

- [Web routes](https://github.com/jabinkvm/laravel-todo-app/blob/main/routes/web.php): `routes/web.php`
- [Auth routes](https://github.com/jabinkvm/laravel-todo-app/blob/main/routes/auth.php): `routes/auth.php`
- [Login and sessions](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Role access](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`

### School and student management

- [Administration](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`
- [School management](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/SchoolController.php): `app/Http/Controllers/SchoolController.php`
- [Student dashboard](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/StudentController.php): `app/Http/Controllers/StudentController.php`
- [Profile management](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [User records](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/User.php): `app/Models/User.php`
- [School records](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/School.php): `app/Models/School.php`
- [Student records](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Student.php): `app/Models/Student.php`

### Task workflow

- [Task actions](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/TaskController.php): `app/Http/Controllers/TaskController.php`
- [Task records](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Task.php): `app/Models/Task.php`

### Messaging

- [Chat actions](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Http/Controllers/ChatController.php): `app/Http/Controllers/ChatController.php`
- [Conversations](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Conversation.php): `app/Models/Conversation.php`
- [Messages](https://github.com/jabinkvm/laravel-todo-app/blob/main/app/Models/Message.php): `app/Models/Message.php`

### Other components

- **User**

## Connections

- User → Web routes: requests pages
- Web routes → Administration: routes to (evidence: `routes/web.php`)
- Web routes → School management: routes to (evidence: `routes/web.php`)
- Web routes → Student dashboard: routes to (evidence: `routes/web.php`)
- Web routes → Profile management: routes to (evidence: `routes/web.php`)
- Web routes → Task actions: routes to (evidence: `routes/web.php`)
- Web routes → Chat actions: routes to (evidence: `routes/web.php`)
- Web routes → Auth routes: includes auth (evidence: `routes/web.php`)
- Auth routes → Login and sessions: routes to (evidence: `routes/auth.php`)
- Auth routes → Registration: routes to (evidence: `routes/auth.php`)
- Login and sessions → Role access: role-gates pages
- Login and sessions → User records: authenticates (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Registration → User records: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Administration → User records: reads and updates (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → School records: manages (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Student records: manages (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Task records: reads (evidence: `app/Http/Controllers/AdminController.php`)
- School management → User records: manages accounts (evidence: `app/Http/Controllers/SchoolController.php`)
- School management → School records: loads school (evidence: `app/Http/Controllers/SchoolController.php`)
- School management → Student records: creates and manages (evidence: `app/Http/Controllers/SchoolController.php`)
- School management → Task records: deletes student tasks (evidence: `app/Http/Controllers/SchoolController.php`)
- Student dashboard → Task records: loads tasks (evidence: `app/Http/Controllers/StudentController.php`)
- Task actions → Task records: creates and updates (evidence: `app/Http/Controllers/TaskController.php`)
- Task actions → Student records: loads assignees (evidence: `app/Http/Controllers/TaskController.php`)
- Chat actions → Conversations: loads conversations (evidence: `app/Http/Controllers/ChatController.php`)
- Chat actions → Messages: reads and sends (evidence: `app/Http/Controllers/ChatController.php`)
- Chat actions → School records: finds contacts (evidence: `app/Http/Controllers/ChatController.php`)
- Chat actions → Student records: finds contacts (evidence: `app/Http/Controllers/ChatController.php`)
- Chat actions → User records: loads participants (evidence: `app/Http/Controllers/ChatController.php`)
