How saiking45305-ctrl/ai-based-daily-routine-balance-advisor- works
Routine Balance is documented as a browser-based, energy-aware daily planner: people enter energy, sleep, mood, and commitments, review a balanced timeline and score, then adjust the plan or ask the AI coach for guidance. The supplied tree, however, contains mostly server/template infrastructure and omits the documented client source, so the UI, local persistence, and planning logic cannot be traced here. The graph shows evidenced server responsibilities and documented AI integration; several README capabilities have no source node in this checkout.
Main entry points: index.ts Express Server · env.ts Environment Config · oauth.ts OAuth Callback · sdk.ts Auth SDK
Components 27
Server API
- Express Server
index.ts - tRPC API
routers.ts - System Procedures
systemRouter.ts - Request Context
context.ts - Procedure Setup
trpc.ts - Environment Config
env.ts - Web App Serving
vite.ts
Identity and Data
- OAuth Callback
oauth.ts - Auth SDK
sdk.ts - Session Cookies
cookies.ts - User Database
db.ts - Data Schema
schema.ts
Platform Integrations
- LLM Client
llm.ts - Storage Proxy
storageProxy.ts - Map Integration
map.ts - Voice Transcription
voiceTranscription.ts - Image Generation
imageGeneration.ts - Heartbeat Service
heartbeat.ts - Owner Notifications
notification.ts
Client Utilities
- Auth Hook
useAuth.ts - Composition Helpers
useComposition.ts - Stable Callback Hook
usePersistFn.ts - Shared Constants
const.ts - Platform SDK
sdk.ts
Other components
- Planner
- Manus Services
- Storage Service
Connections 26
- Planner → Express Server: uses web app
README.md - Express Server → tRPC API: mounts API
index.ts - Express Server → OAuth Callback: registers routes
index.ts - Express Server → Storage Proxy: registers proxy
index.ts - Express Server → Request Context: creates context
index.ts - Express Server → Web App Serving: serves frontend
index.ts - tRPC API → System Procedures: exposes procedures
README.md - Request Context → Auth SDK: authenticates request
context.ts - OAuth Callback → Auth SDK: exchanges credentials
oauth.ts - OAuth Callback → User Database: upserts user
oauth.ts - OAuth Callback → Session Cookies: sets session cookie
oauth.ts - Auth SDK → User Database: reads and updates user
sdk.ts - Auth SDK → Environment Config: reads settings
sdk.ts - System Procedures → Owner Notifications: sends notification
systemRouter.ts - Owner Notifications → Manus Services: posts notification
notification.ts - LLM Client → Manus Services: calls LLM API
llm.ts - Storage Proxy → Manus Services: requests signed URL
storageProxy.ts - Storage Proxy → Storage Service: redirects to object
storageProxy.ts - Map Integration → Environment Config: reads settings
map.ts - Voice Transcription → Environment Config: reads settings
voiceTranscription.ts - Image Generation → Environment Config: reads settings
imageGeneration.ts - Heartbeat Service → Environment Config: reads settings
heartbeat.ts - Auth Hook → Shared Constants: starts login
useAuth.ts - Auth Hook → tRPC API: queries auth
README.md - Composition Helpers → Stable Callback Hook: uses stable callbacks
useComposition.ts - Platform SDK → Shared Constants: uses shared constants
sdk.ts