← back

daypilotAI

View on GitHub β†’

🌟 Architectural Vision & System Design

daypilotAI is designed as a high-performance, local-first daily planning platform that transforms unstructured natural language inputs into structured, optimized, and conflict-free daily schedules. The system architecture prioritizes ultra-low latency, high reactivity, and strict separation of concerns between the non-deterministic AI processing layer and the deterministic scheduling engine.

[ Natural Language Input ] ──> [ Svelte UI Layer ]
                                      β”‚
                                      β–Ό (Async Payload)
[ Web Worker (Scheduling Engine) ] <── [ SvelteKit Edge API (LLM Proxy) ]
        β”‚
        β”œβ”€> Conflict Resolution Heuristics
        └─> Cognitive Load Balancing
              β”‚
              β–Ό (Structured State Update)
[ Reactive Svelte Stores ] ──> [ LocalStorage / IndexedDB Sync ]

Core Data & System Flow

  • Ingestion / Input: Users input unstructured text (e.g., β€œI need to write code for 3 hours, meet with the team at 2 PM, and review PRs before that”). This input is captured via a highly responsive Svelte component and dispatched to the backend.
  • Processing / Logic: The unstructured input is processed via a secure SvelteKit serverless endpoint that interfaces with an LLM to extract structured JSON intents (tasks, durations, dependencies, and hard constraints). These intents are then passed to a client-side Web Worker running a custom interval-scheduling heuristic to resolve overlaps and optimize cognitive load without blocking the main UI thread.
  • Persistence & Caching: The application utilizes a local-first persistence model. State is synchronized reactively to IndexedDB via Svelte stores, ensuring instant offline availability and sub-millisecond load times, with an optional synchronization layer for cloud backup.

πŸ’» Tech Stack & Engineering Decisions

Every technology in the stack was selected to maximize runtime performance, minimize bundle size, and guarantee type safety across the application boundary.

  • Frontend (Svelte & Tailwind CSS): Svelte was selected over virtual-DOM-based frameworks (like React) for its compiler-first approach. By compiling reactivity directly into surgical DOM updates, the application maintains a 60 FPS rendering pipeline even during complex drag-and-drop schedule re-orderings. Tailwind CSS provides a utility-