┌─────────────────────────────────────────────────────────────────┐
│ User Interfaces │
├──────────────────────┬──────────────────────┬─────────────┤
│ │ │ │
│ CLI (Primary) │ Web UI (Rich) │ API (Dev) │
│ Typer + Rich │ HTMX + Jinja2 │ FastAPI │
│ │ │ │
└──────────┬───────────┴──────────┬───────────┴───────┘
│ │
│ │
│ HTTP/WebSocket │
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ FastAPI Backend │
│ ┌─────────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ Task API │ │ Chat API │ │ Notification │ │
│ │ (CRUD) │ │ (LLM) │ │ Service │ │
│ └──────┬──────┘ └────┬─────┘ └──────┬───────┘ │
│ │ │ │ │
│ ┌──────┴────────────────┴─────────────────┴───────┐ │
│ │ SQLAlchemy ORM │ │
│ └────────────────────────┬───────────────────────────────┘ │
└───────────────────────────────┼───────────────────────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌──────────────┐ ┌──────────────┐
│ SQLite DB │ │ ChromaDB │ │ Scheduler │
│ (Tasks, │ │ (Vectors) │ │ (APScheduler)│
│ Attachments) │ │ │ │ │
└───────────────┘ └──────────────┘ └──────────────┘
│
│
┌───────────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌──────────────┐ ┌──────────────┐
│ Gmail API │ │ GitHub API │ │ Desktop │
│ (Python) │ │ (PyGithub) │ │ Notify │
│ │ │ │ │ (plyer) │
└───────────────┘ └──────────────┘ └──────────────┘
- Interactive TUI-first - Primary UX is interactive mode (entered via
tgenie) with chat as main capability - CLI subcommands for scripting - Non-interactive commands (
tgenie add,tgenie list, etc.) for automation - AI-native - Chat as primary interface within TUI, not bolted on
- Simple architecture - One language (Python), minimal services
- Local-first - All data stored locally, sync optional later
- Extensible - Easy to add new integrations/LLM providers
- Interactive TUI mode (default): Entered via
tgenie, chat-first interface - Subcommands (for scripting):
tgenie add,tgenie list,tgenie show,tgenie edit,tgenie delete,tgenie attach - Output: formatted text (Rich library)
- Input: command-line arguments, interactive prompts
- State: Session state for interactive mode (stateless for subcommands, calls API)
- Pages: chat, tasks, task details, settings
- Tech: HTMX + Jinja2 + Tailwind CSS
- Updates: WebSocket for real-time chat
- Auth: None (local, single-user)
- Endpoints: REST for CRUD, WebSocket for chat
- Format: JSON
- Auth: API key (optional for local use)
- Docs: OpenAPI/Swagger auto-generated
- CRUD operations on tasks
- Status management
- Search (keyword + RAG)
- Multi-provider: OpenRouter, OpenAI, Anthropic, local
- Chat completion
- Prompt management
- Streaming responses
- Desktop notifications (plyer)
- Scheduling: 24hr, 6hr before ETA
- History tracking
- Click actions (open task, mark done)
- Gmail: OAuth, fetch, parse, attach
- GitHub: OAuth (optional), fetch, parse, attach
- Provider Protocol: Common interface for all integrations (
match_url,fetch_content) - Auto-Discovery: Link detection service to auto-attach URLs
- Extensible: Add new integrations by implementing the Provider Protocol
- Parses task content (title, description) for URLs
- Matches URLs against registered Integration Providers
- Auto-triggers attachment creation for matched links
- Embedding generation
- Vector storage (ChromaDB)
- Semantic search
- Context retrieval for chat