# ljhlvpz/taskpilot architecture

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

- Interactive diagram: https://gitdiagram.com/ljhlvpz/taskpilot
- Repository: https://github.com/ljhlvpz/taskpilot

## Overview

TaskPilot is a mobile task and personal-organization app. Users authenticate, then create, browse, schedule, complete, and manage tasks; task screens use task services backed by Firestore, while notification services schedule reminders and summaries. Major product areas also include an AI assistant, calendar, notes, profile/preferences, and PIN-based app locking. The graph follows sampled calls and source-index references; unsampled feature internals and backend wiring are not inferred.

Main entry points: [`services/taskService.js`](https://github.com/ljhlvpz/taskpilot/blob/main/services/taskService.js) (Task service), [`services/notificationService.js`](https://github.com/ljhlvpz/taskpilot/blob/main/services/notificationService.js) (Notification scheduling), [`app/(tabs)/tasks.jsx`](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/tasks.jsx) (Task list), [`app/(tabs)/assistant.jsx`](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/assistant.jsx) (AI assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile experience"]
  node_task_list["Task list<br/>[tasks.jsx]"]
  node_task_create["Task creation<br/>[create-task.jsx]"]
  node_task_edit["Task editing<br/>[&#91;id&#93;.jsx]"]
  node_task_detail["Task details<br/>[&#91;id&#93;.jsx]"]
  node_calendar["Calendar<br/>[calendar.jsx]"]
  node_dashboard["Dashboard<br/>[dashboard.jsx]"]
  node_assistant["AI assistant<br/>[assistant.jsx]"]
  node_notes["Notes<br/>[notes.jsx]"]
  node_profile["Profile settings<br/>[profile.jsx]"]
  node_theme["Theme context<br/>[ThemeContext.jsx]"]
end

subgraph group_identity["Identity and security"]
  node_auth_screens["Sign-in screens<br/>[login.jsx]"]
  node_auth_service["Authentication service<br/>[authService.js]"]
  node_auth_sdk["Firebase authentication<br/>[auth.js]"]
  node_auth_context["Auth context<br/>[AuthContext.jsx]"]
  node_pin_gate["PIN gate<br/>[PinGate.jsx]"]
  node_pin_storage[("Secure PIN storage<br/>[pinStorage.js]")]
end

subgraph group_work["Task and notes domain"]
  node_task_service["Task service<br/>[taskService.js]"]
  node_note_service["Note service<br/>[noteService.js]"]
end

subgraph group_platform["Firebase platform"]
  node_firestore["Firestore access<br/>[firestore.js]"]
  node_firebase_config["Firebase setup<br/>[firebaseConfig.js]"]
end

subgraph group_support["Intelligence and alerts"]
  node_priority["Priority prediction<br/>[priorityService.js]"]
  node_notifications["Notification scheduling"]
  node_inbox["Notification inbox"]
  node_notification_os["Device notifications"]
  node_ai_service["AI service<br/>[aiService.js]"]
end

node_user(("User"))

node_user -->|"signs in"| node_auth_screens
node_auth_screens -->|"requests auth"| node_auth_service
node_auth_service -->|"delegates auth"| node_auth_sdk
node_auth_sdk -->|"uses Firebase"| node_firebase_config
node_auth_context -->|"uses Firebase"| node_firebase_config
node_pin_gate -->|"verifies PIN"| node_pin_storage
node_pin_gate -->|"reads auth"| node_auth_context
node_user -->|"manages tasks"| node_task_list
node_user -->|"creates tasks"| node_task_create
node_user -->|"views schedule"| node_calendar
node_user -->|"views overview"| node_dashboard
node_user -->|"uses assistant"| node_assistant
node_user -.->|"manages notes"| node_notes
node_task_list -->|"loads and updates"| node_task_service
node_task_create -->|"creates tasks"| node_task_service
node_task_edit -->|"edits tasks"| node_task_service
node_task_detail -->|"loads task"| node_task_service
node_calendar -->|"loads tasks"| node_task_service
node_dashboard -->|"loads tasks"| node_task_service
node_assistant -->|"uses tasks"| node_task_service
node_task_service -->|"delegates operations"| node_firestore
node_note_service -->|"uses notes store"| node_firestore
node_firestore -->|"uses database"| node_firebase_config
node_task_create -->|"schedules reminders"| node_notifications
node_task_edit -->|"updates reminders"| node_notifications
node_task_list -->|"updates reminders"| node_notifications
node_notifications -->|"predicts priority"| node_priority
node_notifications -->|"checks account"| node_firebase_config
node_notifications -->|"schedules alerts"| node_notification_os
node_dashboard -->|"reads inbox"| node_inbox
node_task_detail -->|"uses inbox"| node_inbox
node_assistant -->|"uses theme"| node_theme
node_task_list -->|"uses theme"| node_theme
node_user -.->|"manages profile"| node_profile
node_assistant -.->|"AI implementation"| node_ai_service

click node_task_list "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/tasks.jsx"
click node_task_create "https://github.com/ljhlvpz/taskpilot/blob/main/app/create-task.jsx"
click node_task_edit "https://github.com/ljhlvpz/taskpilot/blob/main/app/edit-task/%5Bid%5D.jsx"
click node_task_detail "https://github.com/ljhlvpz/taskpilot/blob/main/app/task/%5Bid%5D.jsx"
click node_calendar "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/calendar.jsx"
click node_dashboard "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/dashboard.jsx"
click node_assistant "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/assistant.jsx"
click node_notes "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/notes.jsx"
click node_profile "https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/profile.jsx"
click node_theme "https://github.com/ljhlvpz/taskpilot/blob/main/contexts/ThemeContext.jsx"
click node_auth_screens "https://github.com/ljhlvpz/taskpilot/blob/main/app/(auth)/login.jsx"
click node_auth_service "https://github.com/ljhlvpz/taskpilot/blob/main/services/authService.js"
click node_auth_sdk "https://github.com/ljhlvpz/taskpilot/blob/main/firebase/auth.js"
click node_auth_context "https://github.com/ljhlvpz/taskpilot/blob/main/contexts/AuthContext.jsx"
click node_pin_gate "https://github.com/ljhlvpz/taskpilot/blob/main/components/PinGate.jsx"
click node_pin_storage "https://github.com/ljhlvpz/taskpilot/blob/main/utils/pinStorage.js"
click node_task_service "https://github.com/ljhlvpz/taskpilot/blob/main/services/taskService.js"
click node_note_service "https://github.com/ljhlvpz/taskpilot/blob/main/services/noteService.js"
click node_firestore "https://github.com/ljhlvpz/taskpilot/blob/main/firebase/firestore.js"
click node_firebase_config "https://github.com/ljhlvpz/taskpilot/blob/main/firebase/firebaseConfig.js"
click node_priority "https://github.com/ljhlvpz/taskpilot/blob/main/services/priorityService.js"
click node_notifications "https://github.com/ljhlvpz/taskpilot/blob/main/services/notificationService.js"
click node_inbox "https://github.com/ljhlvpz/taskpilot/blob/main/services/notificationInbox.js"
click node_ai_service "https://github.com/ljhlvpz/taskpilot/blob/main/services/aiService.js"

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_task_list,node_task_create,node_task_edit,node_task_detail,node_calendar,node_dashboard,node_assistant,node_notes,node_profile,node_theme,node_user toneBlue
class node_auth_screens,node_auth_service,node_auth_sdk,node_auth_context,node_pin_gate,node_pin_storage toneAmber
class node_task_service,node_note_service toneMint
class node_firestore,node_firebase_config toneRose
class node_priority,node_notifications,node_inbox,node_notification_os,node_ai_service toneIndigo
```

## Components

### Mobile experience

- [Task list](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/tasks.jsx): `app/(tabs)/tasks.jsx`
- [Task creation](https://github.com/ljhlvpz/taskpilot/blob/main/app/create-task.jsx): `app/create-task.jsx`
- [Task editing](https://github.com/ljhlvpz/taskpilot/blob/main/app/edit-task/%5Bid%5D.jsx): `app/edit-task/[id].jsx`
- [Task details](https://github.com/ljhlvpz/taskpilot/blob/main/app/task/%5Bid%5D.jsx): `app/task/[id].jsx`
- [Calendar](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/calendar.jsx): `app/(tabs)/calendar.jsx`
- [Dashboard](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/dashboard.jsx): `app/(tabs)/dashboard.jsx`
- [AI assistant](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/assistant.jsx): `app/(tabs)/assistant.jsx`
- [Notes](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/notes.jsx): `app/(tabs)/notes.jsx`
- [Profile settings](https://github.com/ljhlvpz/taskpilot/blob/main/app/(tabs)/profile.jsx): `app/(tabs)/profile.jsx`
- [Theme context](https://github.com/ljhlvpz/taskpilot/blob/main/contexts/ThemeContext.jsx): `contexts/ThemeContext.jsx`

### Identity and security

- [Sign-in screens](https://github.com/ljhlvpz/taskpilot/blob/main/app/(auth)/login.jsx): `app/(auth)/login.jsx`
- [Authentication service](https://github.com/ljhlvpz/taskpilot/blob/main/services/authService.js): `services/authService.js`
- [Firebase authentication](https://github.com/ljhlvpz/taskpilot/blob/main/firebase/auth.js): `firebase/auth.js`
- [Auth context](https://github.com/ljhlvpz/taskpilot/blob/main/contexts/AuthContext.jsx): `contexts/AuthContext.jsx`
- [PIN gate](https://github.com/ljhlvpz/taskpilot/blob/main/components/PinGate.jsx): `components/PinGate.jsx`
- [Secure PIN storage](https://github.com/ljhlvpz/taskpilot/blob/main/utils/pinStorage.js): `utils/pinStorage.js`

### Task and notes domain

- [Task service](https://github.com/ljhlvpz/taskpilot/blob/main/services/taskService.js): `services/taskService.js`
- [Note service](https://github.com/ljhlvpz/taskpilot/blob/main/services/noteService.js): `services/noteService.js`

### Firebase platform

- [Firestore access](https://github.com/ljhlvpz/taskpilot/blob/main/firebase/firestore.js): `firebase/firestore.js`
- [Firebase setup](https://github.com/ljhlvpz/taskpilot/blob/main/firebase/firebaseConfig.js): `firebase/firebaseConfig.js`

### Intelligence and alerts

- [Priority prediction](https://github.com/ljhlvpz/taskpilot/blob/main/services/priorityService.js): `services/priorityService.js`
- [Notification scheduling](https://github.com/ljhlvpz/taskpilot/blob/main/services/notificationService.js): `services/notificationService.js`
- [Notification inbox](https://github.com/ljhlvpz/taskpilot/blob/main/services/notificationInbox.js): `services/notificationInbox.js`
- **Device notifications**
- [AI service](https://github.com/ljhlvpz/taskpilot/blob/main/services/aiService.js): `services/aiService.js`

### Other components

- **User**

## Connections

- User → Sign-in screens: signs in (evidence: `app/(auth)/login.jsx`)
- Sign-in screens → Authentication service: requests auth (evidence: `app/(auth)/login.jsx`)
- Authentication service → Firebase authentication: delegates auth (evidence: `services/authService.js`)
- Firebase authentication → Firebase setup: uses Firebase (evidence: `firebase/auth.js`)
- Auth context → Firebase setup: uses Firebase (evidence: `contexts/AuthContext.jsx`)
- PIN gate → Secure PIN storage: verifies PIN (evidence: `components/PinGate.jsx`)
- PIN gate → Auth context: reads auth (evidence: `components/PinGate.jsx`)
- User → Task list: manages tasks (evidence: `app/(tabs)/tasks.jsx`)
- User → Task creation: creates tasks (evidence: `app/create-task.jsx`)
- User → Calendar: views schedule (evidence: `app/(tabs)/calendar.jsx`)
- User → Dashboard: views overview (evidence: `app/(tabs)/dashboard.jsx`)
- User → AI assistant: uses assistant (evidence: `app/(tabs)/assistant.jsx`)
- User → Notes: manages notes
- Task list → Task service: loads and updates (evidence: `app/(tabs)/tasks.jsx`)
- Task creation → Task service: creates tasks (evidence: `app/create-task.jsx`)
- Task editing → Task service: edits tasks (evidence: `app/edit-task/[id].jsx`)
- Task details → Task service: loads task (evidence: `app/task/[id].jsx`)
- Calendar → Task service: loads tasks (evidence: `app/(tabs)/calendar.jsx`)
- Dashboard → Task service: loads tasks (evidence: `app/(tabs)/dashboard.jsx`)
- AI assistant → Task service: uses tasks (evidence: `app/(tabs)/assistant.jsx`)
- Task service → Firestore access: delegates operations (evidence: `services/taskService.js`)
- Note service → Firestore access: uses notes store (evidence: `firebase/firestore.js`)
- Firestore access → Firebase setup: uses database (evidence: `firebase/firestore.js`)
- Task creation → Notification scheduling: schedules reminders (evidence: `app/create-task.jsx`)
- Task editing → Notification scheduling: updates reminders (evidence: `app/edit-task/[id].jsx`)
- Task list → Notification scheduling: updates reminders (evidence: `app/(tabs)/tasks.jsx`)
- Notification scheduling → Priority prediction: predicts priority (evidence: `services/notificationService.js`)
- Notification scheduling → Firebase setup: checks account (evidence: `services/notificationService.js`)
- Notification scheduling → Device notifications: schedules alerts (evidence: `services/notificationService.js`)
- Dashboard → Notification inbox: reads inbox (evidence: `app/(tabs)/dashboard.jsx`)
- Task details → Notification inbox: uses inbox (evidence: `app/task/[id].jsx`)
- AI assistant → Theme context: uses theme (evidence: `app/(tabs)/assistant.jsx`)
- Task list → Theme context: uses theme (evidence: `app/(tabs)/tasks.jsx`)
- User → Profile settings: manages profile
- AI assistant → AI service: AI implementation
