How not4rohith/byok-based-ai-assistant works
This is a BYOK personal AI task manager with desktop and mobile clients backed by an HTTP service and MongoDB. Users organize tasks and lists, configure providers and models, and chat with an assistant that can select tools, manage tasks and goals, and use memory. The graph combines the principal UI-to-API-to-domain workflow with documented AI capabilities, chat persistence, sync, and analytics. Some feature links are based on README statements because their implementation files were not excerpted; those limits are reflected in the evidence citations.
Main entry points: server.ts HTTP server · task.service.ts Task management · App.tsx Desktop task UI · ai.service.ts AI orchestration
Components 26
Client applications
- Desktop task UI
apps/desktop/src/App.tsx - Task views
apps/desktop/src/components/GoogleTasksMobileView.tsx - Chat interface
apps/desktop/src/components/FullScreenChat.tsx - Settings UI
apps/desktop/src/components/SettingsView.tsx - Desktop API client
apps/desktop/src/api/client.ts - Offline cache
apps/desktop/src/api/offlineCache.ts - Mobile client
apps/mobile/App.tsx - Mobile storage
apps/mobile/src/services/mobileStorage.ts
Backend API and domains
- HTTP server
backend/src/server.ts - Task and list routes
backend/src/routes/tasks.router.ts - Task management
backend/src/services/task.service.ts - Goal management
backend/src/services/goal.service.ts - Memory management
backend/src/services/memory.service.ts - Chat routes
backend/src/routes/chat.router.ts - Productivity analytics
backend/src/services/analytics.service.ts
AI assistant
- AI orchestration
backend/src/services/ai.service.ts - Intent decision router
backend/src/ai/router/laya.router.ts - Autonomous agent
backend/src/services/aiAgentRunner.ts - Prompt modules
backend/src/ai/prompts - Assistant tools
backend/src/ai/tools/registry.ts - Provider fallback
backend/src/ai/provider-manager.ts
Persistence and integrations
- Chat storage
backend/src/services/chatStorage.service.ts - MongoDB data
backend/src/db/connection.ts - Google Tasks sync
backend/src/services/googleTasks.service.ts - Conflict resolution
backend/src/services/syncConflictResolver.ts
Other components
- User
Connections 34
- User → Desktop task UI: uses
README.md - User → Mobile client: uses
README.md - Desktop task UI → Task views: renders
apps/desktop/src/App.tsx - Desktop task UI → Chat interface: opens
apps/desktop/src/App.tsx - Desktop task UI → Settings UI: opens
apps/desktop/src/App.tsx - Desktop task UI → Desktop API client: requests data
apps/desktop/src/App.tsx - Desktop API client → Offline cache: caches responses
apps/desktop/src/api/client.ts - Mobile client → Mobile storage: uses
apps/mobile/App.tsx - Mobile storage → HTTP server: sends API requests
apps/mobile/src/services/mobileStorage.ts - Desktop API client → HTTP server: sends API requests
apps/desktop/src/api/client.ts - Settings UI → Desktop API client: configures providers
README.md - HTTP server → Task and list routes: registers routes
backend/src/server.ts - Task and list routes → Task management: delegates tasks
- HTTP server → Chat routes: registers routes
backend/src/server.ts - Chat routes → AI orchestration: invokes AI
backend/src/routes/chat.router.ts - Chat routes → Chat storage: reads and saves chats
backend/src/routes/chat.router.ts - AI orchestration → Intent decision router: classifies intent
README.md - Intent decision router → Prompt modules: selects prompt modules
README.md - Intent decision router → Assistant tools: selects tools
README.md - AI orchestration → Autonomous agent: runs agent
README.md - Autonomous agent → Task management: manages tasks
README.md - Autonomous agent → Goal management: manages goals
README.md - Autonomous agent → Memory management: extracts memory
README.md - AI orchestration → Provider fallback: generates responses
README.md - Provider fallback → User: calls chosen provider
- Task management → MongoDB data: reads and writes
backend/src/services/task.service.ts - Chat storage → MongoDB data: persists sessions
backend/src/services/chatStorage.service.ts - Task management → Google Tasks sync: syncs tasks
backend/src/services/task.service.ts - HTTP server → Goal management: initializes service
backend/src/server.ts - HTTP server → Memory management: initializes service
backend/src/server.ts - HTTP server → Conflict resolution: registers sync
backend/src/server.ts - HTTP server → Productivity analytics: registers analytics
backend/src/server.ts - Conflict resolution → Task management: resolves conflicts
- Productivity analytics → Task management: summarizes activity