Build a local-first TUI calendar application in Rust with the following requirements:
- Real-time clock display with configurable timezone
- Monthly/weekly calendar grid (using
ratatuiandcrossterm) - Public holidays display by country (hardcoded country code in config, loaded from a local JSON/TOML file bundled with the binary — use
https://docs.rs/holidays/latest/holidays/or a curated static dataset) - Upcoming events panel showing the next N events
- All local events stored in a local SQLite database (
~/.local/share/solstice/events.db) usingrusqlite - No remote server required — fully offline-capable
- TOML config file at
~/.config/solstice/config.toml - Configurable fields: timezone, country code (ISO 3166-1 alpha-2), theme colors, date format, first day of week
- OAuth2 PKCE + Device Authorization Grant flow (no backend server needed)
- Store access/refresh token locally at
~/.config/solstice/gcal_token.json - Read-only sync: fetch events and cache them in the local SQLite DB
- Sync command:
solstice sync(manual trigger, no background daemon) - Use
oauth2crate for the auth flow andreqwestfor API calls
- Top bar: current time (large) + date + timezone label
- Center: calendar grid with highlighted today, holiday markers, and event dots
- Right panel: event list for selected day
- Bottom bar: keybindings hint
- Theme: support Catppuccin Mocha as default, customizable via omarchy themes config
- Rust edition 2026
ratatuifor TUI renderingcrosstermas backendchrono+chrono-tzfor date/timerusqlitefor local storageserde+tomlfor configoauth2+reqwestfor Google Calendartokioasync runtime (only for sync command, rest is sync)
solstice/ ├── src/ │ ├── main.rs │ ├── app.rs # App state machine │ ├── ui/ # ratatui widgets │ ├── calendar/ # Grid logic, holiday loading │ ├── events/ # SQLite CRUD │ ├── gcal/ # OAuth2 + API sync │ └── config.rs # TOML config loading ├── assets/ │ └── holidays/ # JSON files per country (e.g., CO.json, US.json) └── Cargo.toml
Start by scaffolding the project structure, implementing the config loader, the clock widget, and the calendar grid with holiday markers. Leave Google Calendar sync as a stub for now.