How cachebag/ticked works
Project type and purpose
• Type: Terminal-based full-stack-like application (Python CLI/TUI)
• Purpose: Task and productivity manager with modules for calendar sync (CalDAV), Canvas LMS integration, Nest editor features, Spotify control, plus local task storage and utilities (system-stats, timers).
File structure
• ticked/app.py – Application entry point (initializes Textual TUI).
• ticked/config/ – Configuration and theming.
• ticked/core/ – Business logic & data layer:
• database/ – Local DB access (ticked_db.py) and CalDAV sync (caldav_sync.py)
• ticked/ui/ – UI layer:
• screens/ – High-level screen controllers (over_arching.py)
• views/ – Individual views (calendar, canvas, nest, pomodoro, settings, spotify, welcome)
• mixins/ – Shared UI behaviors (focus handling).
• ticked/widgets/ – Reusable UI widgets (task_widget).
• ticked/utils/ – Helper modules (system_stats, time_utils).
• External integrations: Canvas API, Spotify API, iOS/Google/Outlook CalDAV.
• Dev & CI: docs/, GitHub workflows, tests/, check.sh, security_scan.py.
README for additional insights
• Core features: Task management, NEST+ (code editing UX), CANVAS LMS, Spotify.
• Dependencies: Python, Textual framework, requests or specific API clients for Canvas/Spotify.
• Deployment: pip and Homebrew packages—single binary/CLI entry.
Main components & relationships
a. UI Layer (TUI)
• Screens & Views (Textual)
• Widgets
–– interacts with Application Core via a controller/dispatcher (app.py → screens → views → widgets)
b. Application Core
• Task & Schedule Manager
• CalDAV Sync (abstracts Google/iOS/Outlook calendars)
• Canvas LMS Client
• Spotify Client
• Interacts with Database Layer to read/write local data.
c. Database Layer
• Local SQLite (via ticked_db.py)
• Sync operations (candaV_sync) read/write calendar events.
d. Utilities
• System statistics (CPU/RAM)
• Time utilities (pomodoro timer, date formatting)
e. External Services
• CalDAV servers (Google, Outlook, iCloud)
• Canvas LMS REST API
• Spotify Web API
f. Configuration
• theme.tcss, config loader – applies user preferences to UI.
g. Documentation & CI (separate, for developer workflow).
Architectural patterns & design principles
• Clear Layering: UI ←→ Core ←→ Data
• Modularity: Each integration (Canvas, Spotify, CalDAV) in its own module.
• Event-Driven/Message Passing: Textual framework uses events to update state & UI.
• Separation of Concerns: Utils vs. core vs. UI.
• Single Responsibility: Each view/widget has one job.
Putting it all together
• Off to the right, External Services clouds.
• Bottom: Config & Utils feeding into UI/Core.