How mostafaai10/dopa_pal works
dopaPal is an ADHD-oriented desktop cognitive companion: users capture tasks through the ambient bubble or dashboard, the backend parses and prioritizes them, and the client presents manageable work. The broader product also covers energy/state tracking, focus, rewards, voice, chat, and Google/Notion sync. The graph reflects documented capabilities and indexed references; unsampled route internals and client IPC details limit some relationships.
Main entry points: service.py AI service · tasks.py Task routes · task_service.py Task service · api.js Client API
Components 34
Desktop client
- Ambient bubble
client/src/renderer/components/Bubble/Bubble.jsx - Dashboard
client/src/renderer/components/Dashboard/Dashboard.jsx - Client API
client/src/renderer/services/api.js
Backend API
- Task routes
server/app/api/v1/tasks.py - State routes
server/app/api/v1/state.py - Reward routes
server/app/api/v1/rewards.py - Chat routes
server/app/api/v1/chat.py - User routes
server/app/api/v1/users.py - Integration routes
server/app/api/v1/integrations.py - OAuth routes
server/app/api/v1/auth_google.py - Notion OAuth
server/app/api/v1/auth_notion.py - Sync routes
server/app/api/v1/sync.py
Task intelligence
- Task service
server/app/services/task_service.py - AI service
server/app/services/ai/service.py - Task ingestion
server/app/services/ai/ingestion.py - Task chunking
server/app/services/ai/chunking.py - PINCH ranking
server/app/services/ai/pinch.py - Task segmentation
server/app/services/ai/segmentation.py - AI schemas
server/app/services/ai/schemas.py - NVIDIA LLM client
server/app/services/ai/llm/nvidia_client.py
Support services
- State scoring
server/app/services/state_service.py - Rewards and vault
server/app/services/reward_service.py - Focus mode
server/app/services/focus_mode.py - Speech transcription
server/app/services/speech_to_text.py - Notifications
server/app/services/enhanced_notification.py - WebSocket manager
server/app/services/websocket_manager.py - Integration manager
server/app/services/integration_service.py - Google sync
server/app/services/google_service.py - Notion sync
server/app/services/notion_service.py
Persistence
- SQL database
server/app/core/database.py - Tasks and blocks
server/app/models/task.py - Users
server/app/models/user.py - State logs
server/app/models/state.py
Other components
- User
Connections 33
- User → Ambient bubble: captures tasks
- User → Dashboard: manages work
- Ambient bubble → Client API: requests data
client/src/renderer/components/Bubble/Bubble.jsx - Dashboard → Client API: requests data
client/src/renderer/components/Dashboard/Dashboard.jsx - Client API → Task routes: calls API
- Client API → User routes: calls API
- Task routes → Task service: delegates tasks
server/app/api/v1/tasks.py - Task routes → Speech transcription: transcribes audio
server/app/api/v1/tasks.py - Task routes → Focus mode: toggles focus
server/app/api/v1/tasks.py - Task routes → Notifications: uses notifications
server/app/api/v1/tasks.py - Task routes → WebSocket manager: broadcasts updates
server/app/api/v1/tasks.py - Task service → AI service: requests analysis
server/app/services/task_service.py - Task service → Tasks and blocks: persists tasks
server/app/services/task_service.py - AI service → Task ingestion: parses input
server/app/services/ai/service.py - AI service → Task chunking: chunks tasks
server/app/services/ai/service.py - AI service → PINCH ranking: scores tasks
server/app/services/ai/service.py - AI service → Task segmentation: plans steps
server/app/services/ai/service.py - AI service → NVIDIA LLM client: enriches with LLM
server/app/services/ai/service.py - Task ingestion → NVIDIA LLM client: optionally enriches
server/app/services/ai/ingestion.py - State routes → State scoring: computes state
- State scoring → State logs: stores scores
- Reward routes → Rewards and vault: manages rewards
- Chat routes → AI service: uses AI
- Integration routes → Integration manager: manages providers
- OAuth routes → Integration manager: stores OAuth
server/app/api/v1/auth_google.py - Notion OAuth → Integration manager: stores OAuth
server/app/api/v1/auth_notion.py - Sync routes → Google sync: manages sync
- Sync routes → Notion sync: manages sync
- Integration manager → Notion sync: configures sync
server/app/services/integration_service.py - Google sync → Task service: ingests tasks
server/app/services/google_service.py - Notion sync → Task service: ingests tasks
server/app/services/notion_service.py - Tasks and blocks → SQL database: uses ORM base
server/app/models/task.py - Users → SQL database: uses ORM base
server/app/models/user.py