Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

MVP Limitations and Production Gate

Status: MVP skeleton codenot production ready. This document lists every limitation the user must address before flipping the production switch.

Per user instruction (2026-08-31): authorization, payment integration, and any other live-service dependency are placeholder. They are not blockers for the MVP skeleton because the business scope and architecture are locked; they are blockers for production traffic.

1. Architecture and persistence (locked by ADR 0089)

To deploy:
1. wrangler d1 create seraya-db → copy database_id into wrangler.toml.
2. wrangler d1 migrations apply seraya-db --remote.
3. wrangler deploy.

Migration is in app/migrations/0001_init.sql and references ADRs 0089–0095 (couple participant, capacity overlap, no-show timing, settlement uniqueness, intake schema, package cancellation).

2. Authorization (placeholder, per user instruction)

3. Payment integration (placeholder)

The FakePaymentAdapter for local dev/tests is not in this skeleton; add it under tests/integration/fake-adapter.ts before running integration tests.

4. Notification and email (placeholder)

5. Content/CMS (placeholder)

7. Couple booking (launch-deferred pending ADR 0090)

8. What is locked (do not re-open without a new ADR)

Decision ADR Authority
Stack: Cloudflare Worker + D1 ADR 0089 Locked
Cancellation/refund handled by Admin WhatsApp only Round 3 + ADR 0076/0077 Locked
Refund outcomes only full_refund / no_refund ADR 0077/0093 Locked
Capacity grid 30 min, symmetric TransitionBuffer ADR 0091 Locked
No-show early checkpoint T+15m, correction window 7×24h ADR 0092 Locked
At-most-one settled Payment per Booking ADR 0093 Locked
Intake: Nama + Email + optional Phone + Consent ADR 0094 Locked
Couple BookingParticipant/AppointmentParticipant ADR 0090 Locked
Package cancellation matrix R1–R4 ADR 0095 Locked
Launch gate G-1..G-14 with owners ADR 0096 Locked

9. What is operational (must be done before production, but not architecture changes)

  1. Staff bootstrap: record two Admin StaffMemberships per ADR 0081.
  2. Profile evidence: verify Fuja's STR/SILP and obtain publication consent.
  3. Real availability: replace anytime/anyplace placeholder with Fuja's recurring schedule and offline venue (TBC-SCHEDULE-01).
  4. Approved consent/privacy copy: clinical/ethics sign-off on the placeholder text in app/src/views/index.ts.
  5. Midtrans onboarding: production merchant + sandbox evidence + refund capability verification (TBC-PAY-01).
  6. Email provider: choose provider, set sender domain, and write template copy (TBC-NOTIFY-01).
  7. Backup/restore drill: pre-launch snapshot export via wrangler d1 export; restore drill.
  8. Runbook: cancellation handling, late payment reconciliation, refund failure recovery.

Each gate G-1..G-14 in ADR 0096 maps to one of the above.

10. Folder layout

seraya-psikologi-mvp/
├── package.json                # Worker + Hono + Vitest + wrangler
├── wrangler.toml               # CF Worker + D1 binding (PLACEHOLDER db_id)
├── tsconfig.json
├── README.md                   # (this file)
├── app/
│   ├── migrations/
│   │   └── 0001_init.sql       # D1 schema baseline (post ADR 0089–0095)
│   ├── public/
│   │   └── (placeholder, Worker serves inline CSS)
│   └── src/
│       ├── worker/index.ts     # Hono router; public + booking + admin + webhook
│       ├── modules/            # catalog, availability, booking, payment, admin
│       ├── adapters/           # MidtransSnapAdapter (placeholder)
│       ├── persistence/        # PersistenceAdapter + D1 driver
│       ├── domain/types.ts     # shared vocabulary
│       └── views/index.ts      # SSR HTML helpers
└── tests/
    ├── unit/                   # (empty; place pure-policy tests here)
    └── integration/            # (empty; place D1/Miniflare tests here)

11. How to run locally

  1. Install deps: pnpm install (or npm install).
  2. Apply migrations: pnpm migrate:local.
  3. Start Worker: pnpm dev. Open http://localhost:8787.
  4. Admin (placeholder): set ALLOW_PLACEHOLDER_ADMIN_AUTH=true in .dev.vars, then visit /admin.

Local DB is a fresh D1 binding. Seed data is not included; minimal seed script under scripts/seed.mjs is referenced in package.json but not implemented (TBC).

12. Verification artifacts (already produced)