10 KiB
10 KiB
🗺️ Armonía del Ser — Ecosystem Engineering Roadmap
This document is the authoritative cross-repository engineering roadmap for Armonía del Ser (armonia-del-ser). It reconciles the operational discovery baseline, current codebase state across armonia-api, armonia-dashboard, and armonia-landing, and the active deliverables tracked in todo.txt.
🎯 Governing Architectural & Operational Invariants
- Separated Booking & Payment Truth (
ADR-0002): Every booking tracks three orthogonal axes (booking_status,payment_arrangement,payment_status). Prepayment is the default (PREPAID_DEFAULT); delayed-payment exceptions (DELAYED_ALLOWED) are explicitly authorized and audited without falsifyingpayment_status. - Deliberate Slot Release & 48-Hour Visibility (
ADR-0002): Bookings never expire automatically on a background timer. At 48 hours prior toscheduled_at, unacknowledged bookings surface inGET /bookings/follow-up-queueso Jasmin's assistant can follow up via WhatsApp and either acknowledge payment, authorize delayed payment, or deliberately release the slot (RELEASED). - Mandatory 1-on-1 Buffer Times (
ADR-0003): Individual consultations enforce a post-session buffer interval (duration_minutes + buffer_minutes) to prevent appointment overruns. - Server-Enforced Google OAuth + Turso Allowlist (
ADR-0005): OAuth secrets and session signing keys live strictly inarmonia-api. Every administrative request verifies the operator's email against Turso'sadmin_allowlisttable and logs mutations inadmin_audit_log. - Infrastructure-Agnostic Layered Backend (
armonia-api#6): FastAPI routers (app/routers/) act as pure HTTP transport, delegating domain rules toapp/services/and persistence toapp/repositories/backed bySQLModel+sqlalchemy-libsql(sqlite:///local.dblocally,sqlite+libsql://on Turso Cloud). - Zero-Cost Infrastructure (
$0/month):armonia-apiruns scale-to-zero on Google Cloud Run with Turso free-tier edge SQLite;armonia-dashboardandarmonia-landingdeploy as static edge bundles on Cloudflare Pages.
📊 Milestone Overview
| Milestone | Title | Target Repo(s) | Gitea Issue(s) | Status | Summary |
|---|---|---|---|---|---|
| M0 | Discovery, Architecture & Governance | .profile, all repos |
armonia-api#1 |
✅ Completed | Operational discovery, SRS v1.1, ADRs 0001–0005, hierarchical AGENTS.md, per-repo Nix devShells (flake.nix), and .profile org repo. |
| M1 | Core API MVP & Working-Tree Convergence | armonia-api |
armonia-api#3 |
✅ Completed | Merged orthogonal state engine, 48h follow-up queue, delayed-payment exceptions, slot release, and Google OAuth + Turso allowlist (PR #7). |
| M2 | SQLModel + Repository Refactor & Mutation Audit | armonia-api |
armonia-api#6 |
🎯 Current / Up Next | Decouple routers from raw SQL via SQLModel (app/models/), app/repositories/, and app/services/; add pytest-mock I/O isolation, mutmut boundary audits, GET /availability, and Group Roster API (/rosters). |
| M3 | Google Calendar Pull + Push Coordination | armonia-api |
armonia-api#4 |
⏳ Planned | Complete live Google Calendar API adapter (app/services/calendar.py), on-demand pull reconciliation during availability/agenda reads, and recoverable push sync (POST /bookings/{id}/sync-calendar). |
| M4 | Admin Dashboard Control Surface | armonia-dashboard |
armonia-dashboard#1 |
⏳ Planned | Scaffold Vite+ + Tailwind + HTMX + Biome mobile-first operator UI (48h follow-up queue, 1-tap payment acknowledgment, delayed-payment authorization, slot release, package & roster views). |
| M5 | Public Landing & Self-Service Portal | armonia-landing |
armonia-landing#1 |
⏳ Planned | Scaffold public service catalog, conflict-free slot picker (GET /availability), SPEI ADS-XXXX instructions, and 1-tap wa.me receipt handoff. |
🔍 Issue Alignment Audit (Gitea Issues vs. Code Reality)
During our workspace audit on 2026-10-18, we identified three areas where original issue descriptions or working trees drifted from current reality:
- Uncommitted Working-Tree Accumulation (
M0/M1):armonia-api(feat/operational-truth-mvp) currently holds 1,249+ lines of verified, passing code (orthogonal state engine, 48h follow-up queue, Google OAuth + Turso allowlist,CalendarServicepush/retry scaffold, and ADR-0005) alongside the newAGENTS.mdandflake.nix.armonia-dashboard(chore/operational-truth-docs) andarmonia-landing(chore/agents-and-devshell) hold uncommittedAGENTS.md,README.md, andflake.nixupdates.- Resolution: Before writing any new feature code, slice and commit the pending changes in all three repositories via
/git-commitand open/merge their PRs.
- Stale Original Issue Bodies vs. Revised Comments (
armonia-api#3,armonia-dashboard#1):- The original issue bodies still mention the superseded
PENDING_PAYMENT2-hour auto-expiration and staticX-Admin-Keyauth, whereas the2026-10-18 15:10comments specify the approved orthogonal model (RESERVED/RELEASED,PREPAID_DEFAULT/DELAYED_ALLOWED,AWAITING_ACKNOWLEDGMENT/ACKNOWLEDGED) and Tursoadmin_allowlist. - Remaining unimplemented items in
armonia-api#3:GET /availabilityendpoint (returning open slots factoring induration_minutes + buffer_minutes).- Group Workshop Roster API (
GET /rosters,POST /rosters/quick-checkin+attendedtracking for $50 MXN workshops).
- The original issue bodies still mention the superseded
- Architecture Ordering (
M2beforeM3):- Extracting
app/models/(SQLModel),app/repositories/, andapp/services/(armonia-api#6) before expandingarmonia-apiwithGET /availability,/rosters, and live Google Calendar pull-on-read (armonia-api#4) prevents writing more raw SQL in routers only to rewrite it later.
- Extracting
🛠️ Detailed Milestone Breakdown
Milestone M0: Discovery, Architecture & Workspace Governance
- Conduct operational discovery with Jasmin and assistant (
armonia-api#1). - Author SRS v1.1, system architecture, and ADRs
0001–0005. - Restructure
AGENTS.mdhierarchy across workspace root and sub-repositories. - Provision per-repository NixOS
devShells (flake.nix+.envrc+flake.lock). - Track workspace root as
armonia-del-ser/.profileon Gitea. - Commit and open PRs for
AGENTS.md+flake.nixinarmonia-dashboard(PR #3) andarmonia-landing(PR #3).
Milestone M1: Core API MVP Convergence (armonia-api#3)
- Implement orthogonal booking & payment state engine (
booking_status,payment_arrangement,payment_status). - Implement 48-hour follow-up visibility queue (
GET /bookings/follow-up-queue), delayed-payment authorization, and deliberate slot release (RELEASED). - Implement Google OAuth2 login/callback + Turso
admin_allowlist&admin_audit_log. - Slice, commit (
git-commit), and open PR forfeat/operational-truth-mvpinarmonia-api(PR #7).
Milestone M2: SQLModel + Repository Refactor & Mutation Testing (armonia-api#6)
- Add
sqlmodel,sqlalchemy-libsql,pytest-mock, andmutmuttoarmonia-api/pyproject.toml. - Define
SQLModeltable entities inapp/models/and configureapp/db/database.pyfor Turso/SQLite portability. - Extract all SQL queries from
app/routers/intoapp/repositories/and pure business logic intoapp/services/. - Isolate external I/O in tests using
pytest-mockand runmutmutaudit againstapp/services/(100% kill score, ADR 0006). - Implement
GET /availabilityand Group Roster API (GET /rosters,POST /rosters/quick-checkin) cleanly on top of the new service/repository layers (armonia-api#3).
Milestone M3: Google Calendar Pull + Push Coordination (armonia-api#4)
- Implement real Google Calendar REST integration in
app/services/calendar.py(withpytest-mocktest coverage). - Implement Pull-on-Read schedule reconciliation during
GET /availabilityand agenda reads. - Verify end-to-end Push-on-Write status transitions (
[PAGO PENDIENTE],[PAGO DIFERIDO],[CONFIRMADO], event deletion onRELEASED/CANCELLED) and manual retry (POST /bookings/{id}/sync-calendar).
Milestone M4: Mobile-First Admin Dashboard (armonia-dashboard#1)
- Initialize
Vite+(vp),Tailwind CSS,HTMX, andBiomeinarmonia-dashboard. - Delegate to Anne Droid (
feat/anne/*) to implement the 5-state resilient operator views (>= 44x44pxtouch targets):- Google OAuth login & session guard.
- 48-Hour Payment Follow-Up Queue with 1-tap
wa.melinks, Acknowledge Payment, Authorize Delayed Payment, and Release Slot actions. - Agenda & Google Calendar sync health indicator (
SYNCEDvsFAILEDretry). - Multi-session package counter (
8 de 10) & Group Workshop Roster check-in.
Milestone M5: Public Landing & Self-Service Portal (armonia-landing#1)
- Initialize
Vite+(vp),Tailwind CSS,HTMX, andBiomeinarmonia-landing. - Delegate to Anne Droid (
feat/anne/*) to implement the holistic landing page & self-service booking flow:- Service catalog cards (
PRESENCIAL&ONLINE). - Live conflict-free slot picker consuming
GET /availability. - Reservation confirmation with
ADS-XXXXfolio, SPEI CLABE instructions, and 1-tap WhatsApp receipt handoff.
- Service catalog cards (