Files
lifeos-dev/project-docs/lifeos-conversation-context-convo4.md

3.2 KiB

Life OS - Conversation Context (Convo 4)

What This Is

Life OS is my personal productivity web application, live at https://lifeos-dev.invixiom.com on my self-hosted Hetzner server (defiant-01, 46.225.166.142). Convo 1 built the foundation (9 entity routers). Convo 2 added 7 more routers (search, trash, lists, files, meetings, decisions, weblinks). Convo 3 began Tier 3 (Time & Process subsystems), completing Appointments CRUD and Time Tracking with topbar timer pill. Convo 4 completed the time tracking UX by adding timer play/stop buttons to task list rows and task detail pages.

How to Use the Project Documents

lifeos-development-status-convo4.md - START HERE. Source of truth for what's built, what's remaining, exact deploy state, file locations, and patterns to follow. Read this before doing any work.

lifeos-architecture.docx - Full system specification. 50 tables, all subsystems, UI patterns, component library, frontend design tokens, search architecture, time management logic, AI/MCP design (Phase 2). Reference when building new features.

lifeos_r1_full_schema.sql - The complete intended R1 schema including all tables, indexes, triggers. Verify against the live database when in doubt: docker exec lifeos-db psql -U postgres -d lifeos_dev -c "\d table_name"

life-os-server-config.docx - Server infrastructure: containers, ports, Docker networks, Nginx, SSL. Key detail: lifeos Nginx blocks use cert path kasm.invixiom.com-0001 (not kasm.invixiom.com).

Previous conversation docs - Convo 3 and earlier docs are superseded by Convo 4 docs but provide historical context if needed.

Current Tech Stack

  • Python 3.12 / FastAPI / SQLAlchemy 2.0 async (raw SQL via text(), no ORM models) / asyncpg
  • Jinja2 server-rendered templates, vanilla HTML/CSS/JS, no build pipeline
  • PostgreSQL 16 in Docker, full-text search via tsvector
  • Dark/light theme via CSS custom properties
  • Container runs with hot reload (code mounted as volume)
  • GitHub repo: mdombaugh/lifeos-dev (main branch)

Key Patterns

  • BaseRepository handles all CRUD with soft deletes (is_deleted filtering automatic)
  • Every route calls get_sidebar_data(db) for the nav tree
  • Forms use standard HTML POST with 303 redirect (PRG pattern)
  • Templates extend base.html
  • New routers: create file in routers/, add import + include_router in main.py, add nav link in base.html sidebar, create list/form/detail templates
  • Search: add entity config to SEARCH_ENTITIES in routers/search.py
  • Trash: add entity config to TRASH_ENTITIES in routers/admin.py
  • Nullable fields for BaseRepository.update(): add to nullable_fields set in core/base_repository.py
  • Exception: time_entries has no updated_at column, so use direct SQL for deletes instead of BaseRepository.soft_delete()
  • Timer state: get_running_task_id() helper in routers/tasks.py queries time_entries WHERE end_at IS NULL

Deploy Cycle

Code lives at /opt/lifeos/dev/ on the server. The container mounts this directory and uvicorn --reload picks up changes. No rebuild needed for code changes. Claude creates deploy scripts with heredocs that are uploaded via SCP and run with bash. GitHub repo is mdombaugh/lifeos-dev. Push with PAT (personal access token) as password.

What I Need Help With

[State your current task here]