Mindloop follows a clean architecture pattern, separating core business logic from interfaces and data storage.
Located in internal/core, this layer isolates the rules for each domain:
intent: Manages single-threaded work goals and lifecycles.quest: Handles ad-hoc "side quests" that shadow main intents.focus: Handles deep work session timers and tracking.habit: Logic for daily/weekly habit tracking and streaks.journal: Manages daily reflections and mood logging.summary: Aggregates data for productivity reporting.
- CLI (
cmd/cli): Built with Cobra, this interface interacts directly with the local database for low-latency command-line usage. Usemindloop --versionto check your current version. Check out the CLI Usage Guide for detailed command instructions. - Web Server (
cmd/server): A Go HTTP server exposing a REST API (api/v1). - Web UI: Server-Side Rendered (SSR) HTML templates (
web/templates) utilizing vanilla CSS/JS. "Vibe coded" with Gemini (backend-focused developer approach).
- Uses GORM for ORM capabilities.
- Default: Zero-config SQLite (
mindloop_local.db). - Universal Storage: By default, data is stored in
~/.mindloop/to ensure persistence across different working directories. It also checks for a localmindloop_local.dbin the current directory for project-specific overrides. - Optional: Supports PostgreSQL via configuration (BYODB mode).