# codespheretechnologies/productivityai architecture

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

- Interactive diagram: https://gitdiagram.com/codespheretechnologies/productivityai
- Repository: https://github.com/codespheretechnologies/productivityai

## Overview

This is an AI-assisted productivity web application built on Laravel, rather than the Laravel framework itself. The principal workflow is a signed-in user creating and managing tasks, organizing them with categories, tags, subtasks and calendar events, then reviewing dashboard/productivity information; AI features can suggest, break down, rewrite and plan tasks. Notes, notifications, reminders, administration and account management are substantial supporting capabilities. The task controller excerpt confirms its calls into task services and repositories; other links reflect the source-tree structure and Laravel entry points, not inspected implementation details.

Main entry points: [`routes/web.php`](https://github.com/codespheretechnologies/productivityai/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/TaskController.php`](https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/TaskController.php) (Task controller), [`app/Http/Controllers/AIAssistantController.php`](https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/AIAssistantController.php) (AI feature controller), [`app/Services/AI/AIAssistantService.php`](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIAssistantService.php) (AI assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and UI"]
  node_routes["Web routes<br/>[web.php]"]
  node_views["Blade interface"]
end

subgraph group_work["Task workspace"]
  node_taskctl["Task controller<br/>[TaskController.php]"]
  node_taskservice["Task service<br/>[TaskService.php]"]
  node_taskrepo["Task repository<br/>[TaskRepository.php]"]
  node_taskmodel["Task model<br/>[Task.php]"]
  node_catalog["Categories and tags"]
  node_notes["Notes<br/>[NoteService.php]"]
end

subgraph group_planning["Planning and insights"]
  node_calendar["Calendar events"]
  node_dashboard["Dashboard"]
  node_productivity["Productivity insights"]
end

subgraph group_assist["AI assistance"]
  node_ai_controller["AI feature controller"]
  node_ai_assist["AI assistant"]
  node_ai_service["AI provider service<br/>[AIService.php]"]
  node_ai_factory["Provider selection"]
  node_ai_providers["AI providers"]
  node_ai_history["AI history"]
end

subgraph group_ops["Accounts and operations"]
  node_auth["Authentication"]
  node_admin["Administration"]
  node_reminders["Reminder processing"]
  node_notifications["Notifications and digests"]
end

node_user(("Signed-in user"))
node_database[("Application database")]
node_ai_external{{"AI provider API"}}
node_mail{{"Mail delivery"}}

node_user -->|"sends requests"| node_routes
node_routes -->|"dispatches"| node_taskctl
node_routes -->|"dispatches"| node_ai_controller
node_routes -->|"dispatches"| node_auth
node_routes -->|"dispatches"| node_admin
node_taskctl -->|"calls"| node_taskservice
node_taskctl -->|"queries"| node_taskrepo
node_taskctl -->|"renders"| node_views
node_taskservice -->|"delegates persistence"| node_taskrepo
node_taskrepo -->|"reads and writes"| node_database
node_catalog -->|"reads and writes"| node_database
node_notes -->|"reads and writes"| node_database
node_calendar -->|"reads and writes"| node_database
node_dashboard -->|"reads"| node_database
node_productivity -->|"reads"| node_database
node_ai_controller -->|"calls"| node_ai_assist
node_ai_assist -->|"uses"| node_ai_service
node_ai_service -->|"selects provider"| node_ai_factory
node_ai_factory -->|"creates"| node_ai_providers
node_ai_providers -->|"sends prompts"| node_ai_external
node_ai_assist -->|"records activity"| node_ai_history
node_ai_controller -->|"applies task changes"| node_taskservice
node_auth -->|"reads and writes"| node_database
node_admin -->|"reads and writes"| node_database
node_reminders -->|"checks reminders"| node_database
node_reminders -->|"triggers"| node_notifications
node_notifications -->|"sends messages"| node_mail
node_notifications -->|"stores notifications"| node_database
node_views -->|"displays results"| node_user

click node_routes "https://github.com/codespheretechnologies/productivityai/blob/main/routes/web.php"
click node_views "https://github.com/codespheretechnologies/productivityai/tree/main/resources/views"
click node_taskctl "https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/TaskController.php"
click node_taskservice "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Task/TaskService.php"
click node_taskrepo "https://github.com/codespheretechnologies/productivityai/blob/main/app/Repositories/TaskRepository.php"
click node_taskmodel "https://github.com/codespheretechnologies/productivityai/blob/main/app/Models/Task.php"
click node_catalog "https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/CategoryController.php"
click node_notes "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Note/NoteService.php"
click node_calendar "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Calendar/CalendarService.php"
click node_dashboard "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Dashboard/DashboardService.php"
click node_productivity "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Productivity/ProductivityService.php"
click node_ai_controller "https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/AIAssistantController.php"
click node_ai_assist "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIAssistantService.php"
click node_ai_service "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIService.php"
click node_ai_factory "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIProviderFactory.php"
click node_ai_providers "https://github.com/codespheretechnologies/productivityai/tree/main/app/Services/AI/Providers"
click node_ai_history "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIHistoryService.php"
click node_auth "https://github.com/codespheretechnologies/productivityai/tree/main/app/Http/Controllers/Auth"
click node_admin "https://github.com/codespheretechnologies/productivityai/tree/main/app/Http/Controllers/Admin"
click node_reminders "https://github.com/codespheretechnologies/productivityai/blob/main/app/Console/Commands/ProcessReminders.php"
click node_notifications "https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Notification/NotificationService.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_routes,node_views,node_user toneBlue
class node_taskctl,node_taskservice,node_taskrepo,node_taskmodel,node_catalog,node_notes,node_database toneAmber
class node_calendar,node_dashboard,node_productivity,node_ai_external toneMint
class node_ai_controller,node_ai_assist,node_ai_service,node_ai_factory,node_ai_providers,node_ai_history toneRose
class node_auth,node_admin,node_reminders,node_notifications,node_mail toneIndigo
```

## Components

### Web entry and UI

- [Web routes](https://github.com/codespheretechnologies/productivityai/blob/main/routes/web.php): `routes/web.php`
- [Blade interface](https://github.com/codespheretechnologies/productivityai/tree/main/resources/views): `resources/views`

### Task workspace

- [Task controller](https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/TaskController.php): `app/Http/Controllers/TaskController.php`
- [Task service](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Task/TaskService.php): `app/Services/Task/TaskService.php`
- [Task repository](https://github.com/codespheretechnologies/productivityai/blob/main/app/Repositories/TaskRepository.php): `app/Repositories/TaskRepository.php`
- [Task model](https://github.com/codespheretechnologies/productivityai/blob/main/app/Models/Task.php): `app/Models/Task.php`
- [Categories and tags](https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`
- [Notes](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Note/NoteService.php): `app/Services/Note/NoteService.php`

### Planning and insights

- [Calendar events](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Calendar/CalendarService.php): `app/Services/Calendar/CalendarService.php`
- [Dashboard](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Dashboard/DashboardService.php): `app/Services/Dashboard/DashboardService.php`
- [Productivity insights](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Productivity/ProductivityService.php): `app/Services/Productivity/ProductivityService.php`

### AI assistance

- [AI feature controller](https://github.com/codespheretechnologies/productivityai/blob/main/app/Http/Controllers/AIAssistantController.php): `app/Http/Controllers/AIAssistantController.php`
- [AI assistant](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIAssistantService.php): `app/Services/AI/AIAssistantService.php`
- [AI provider service](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIService.php): `app/Services/AI/AIService.php`
- [Provider selection](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIProviderFactory.php): `app/Services/AI/AIProviderFactory.php`
- [AI providers](https://github.com/codespheretechnologies/productivityai/tree/main/app/Services/AI/Providers): `app/Services/AI/Providers`
- [AI history](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/AI/AIHistoryService.php): `app/Services/AI/AIHistoryService.php`

### Accounts and operations

- [Authentication](https://github.com/codespheretechnologies/productivityai/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Administration](https://github.com/codespheretechnologies/productivityai/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`
- [Reminder processing](https://github.com/codespheretechnologies/productivityai/blob/main/app/Console/Commands/ProcessReminders.php): `app/Console/Commands/ProcessReminders.php`
- [Notifications and digests](https://github.com/codespheretechnologies/productivityai/blob/main/app/Services/Notification/NotificationService.php): `app/Services/Notification/NotificationService.php`

### Other components

- **Signed-in user**
- **Application database**
- **AI provider API**
- **Mail delivery**

## Connections

- Signed-in user → Web routes: sends requests
- Web routes → Task controller: dispatches
- Web routes → AI feature controller: dispatches
- Web routes → Authentication: dispatches
- Web routes → Administration: dispatches
- Task controller → Task service: calls
- Task controller → Task repository: queries
- Task controller → Blade interface: renders
- Task service → Task repository: delegates persistence
- Task repository → Application database: reads and writes
- Categories and tags → Application database: reads and writes
- Notes → Application database: reads and writes
- Calendar events → Application database: reads and writes
- Dashboard → Application database: reads
- Productivity insights → Application database: reads
- AI feature controller → AI assistant: calls
- AI assistant → AI provider service: uses
- AI provider service → Provider selection: selects provider
- Provider selection → AI providers: creates
- AI providers → AI provider API: sends prompts
- AI assistant → AI history: records activity
- AI feature controller → Task service: applies task changes
- Authentication → Application database: reads and writes
- Administration → Application database: reads and writes
- Reminder processing → Application database: checks reminders
- Reminder processing → Notifications and digests: triggers
- Notifications and digests → Mail delivery: sends messages
- Notifications and digests → Application database: stores notifications
- Blade interface → Signed-in user: displays results
