MASTERPLAN.md — Membership One Software
Autonomous Execution Guide for Claude Code
User-controlled: The user triggers each phase individually, e.g., with: "Execute Phase 1 as per masterplan." Claude Code reads this document, works through the specified phase completely and independently, and reports completion.
Existing Infrastructure
| Component | Status |
|---|---|
| Claude Code | CLI available |
| Docker Desktop Personal | Windows 11 |
| JDK 25 (Temurin) | Installed (used by Cash360) |
| Flutter 3.41.2 | Installed (upgraded from 3.38.9) |
| Python 3.x | Installed (used by Cash360 intranet) |
| Cash360 Platform | Running, API available at localhost:8080/api |
Project Metrics
- New project (greenfield development)
- Design documents: 17 chapters in
doc/design/ - Target: Multi-tenant SaaS for sports clubs and fitness studios
- Team: 4 people (PM, Frontend Developer, Backend Developer, QA)
- Integration dependency: Cash360 for payment processing (via My Factura Public API)
- Localization: 32 languages (24 EU official + 8 non-EU priority, including RTL)
Phase Status
| Phase | Title | Status | Completed |
|---|---|---|---|
| Phase 0 | Project Setup | COMPLETED | 2026-02-22 |
| Phase 1 | Core Backend v1.0 | COMPLETED | 2026-02-22 |
| Phase 2 | Payment & Billing | COMPLETED | 2026-02-22 |
| Phase 3 | Consumer Mobile App | COMPLETED | 2026-02-22 |
| Phase 4 | Admin Web App | COMPLETED | 2026-02-22 |
| Phase 5 | Access Control & Resources | COMPLETED | 2026-02-22 |
| Phase 6 | Communication & Events | COMPLETED | 2026-02-22 |
| Phase 7 | Document Management & Data Import | COMPLETED | 2026-02-22 |
| Phase 8 | CRM, Support & Accounting | COMPLETED | 2026-02-23 |
| Phase 9 | Trainer, Shop & Franchise | COMPLETED | 2026-02-23 |
| Phase 10 | Testing & Quality | COMPLETED | 2026-02-23 |
| Phase 11 | Launch Preparation | COMPLETED | 2026-02-23 |
| Phase 12 | Startup Operations | COMPLETED | 2026-02-23 |
| Phase 13 | Customer Onboarding | COMPLETED | 2026-02-23 |
Global Working Rules for Claude Code
These rules apply to EVERY phase and EVERY step:
-
Read CLAUDE.md first. At the start of every phase and after every
/clear: Read CLAUDE.md in the membership project root for the current project context. -
Use design documents for requirements. The design documents in
doc/design/define the data model, API contracts, security requirements, and integration architecture. Reference them instead of inventing specifications. -
Work module by module. Each service/module is developed independently. Write results to files immediately, do not keep them in chat.
-
Update CLAUDE.md at the end of each step. Add to the changelog: date, phase/step, what was completed, which files were created/modified.
-
Validate results. After each step: compile the code, run tests, verify that generated files exist and contain meaningful content. Report problems immediately.
-
Language: All documentation, comments, code, variable names, SQL, and technical identifiers in English.
-
Use parallelization. For independent tasks (e.g., creating multiple entity classes simultaneously), use parallel execution to save time.
-
Security from day one. Every feature must implement the security requirements from Chapter 13 (security-and-compliance.md). No hardcoded secrets, no wildcard CORS, @Version on every entity, BigDecimal for money.
-
Cash360 integration via API only. Membership is an independent codebase. No code-level dependency on Cash360. Communication exclusively via REST API.
-
Test alongside implementation. Every service class gets a corresponding test class in the same step. Minimum: happy path + one error case per public method.
-
Internationalization (i18n). All user-facing strings must use translation keys (never hardcoded UI text). Backend: Spring MessageSource keys. Frontend: Flutter ARB keys. All 32 languages must be supported: 24 EU official languages plus 8 non-EU priority languages (Turkish, Arabic, Russian, Ukrainian, Serbian, Albanian, Chinese, Hebrew). RTL support (Arabic, Hebrew) is required from v1.0.
-
Documentation alongside implementation. Each phase has documentation deliverables listed at the end. Create or update the specified documentation files before marking a phase complete.
-
Intranet regeneration. At the end of every phase, regenerate the HTML documentation site by running the intranet build script. This ensures documentation is always up to date.
-
Quality requirements (Q42). Quality requirements should be structured according to Q42 from quality.arc42.org — this provides a systematic framework for defining and documenting quality attributes (performance, reliability, usability, security, maintainability, portability, etc.).
-
Technical conception before coding. Each phase begins with Step X.0 — a technical conception document (
doc/developer/conception/phase-{N}-conception.md) covering: scope, component design (Mermaid), interface contracts, data flow, error handling, edge cases, acceptance criteria, and design chapter references. No implementation begins until the conception is written. -
Flyway naming convention. All Flyway migrations follow
V{P}nn__{description}.sqlwherePis the phase number (single digit) andnnis a two-digit sequential number within that phase. Example:V100__create_organization.sql(Phase 1, migration 00),V201__create_transaction.sql(Phase 2, migration 01). Phase 0 seed data usesV000. -
Design document reference. Every step MUST reference the specific design chapter(s) that define its requirements. Format:
(reference: Chapter NN — Title). -
RTL verification. Every UI screen must be verified in both LTR and RTL layout. Arabic (
ar) and Hebrew (he) are the RTL test languages. Use Flutter'sDirectionalitywidget and test withflutter test --dart-define=FORCE_RTL=true. -
Step classification. Steps in Phases 12–13 are classified as:
[SOFTWARE]— Pure software/infrastructure task, executable by Claude Code[BUSINESS]— Business/legal task requiring human action[HYBRID]— Software task with business prerequisites or follow-up
---
Documentation Structure
All documentation lives in membership/doc/ and is maintained alongside code throughout all phases.
membership/doc/
+-- design/ <- Design document chapters (pre-existing, 17 chapters)
+-- index/ <- Index files
+-- api/ <- API documentation
+-- testing/ <- Test strategy, coverage, security audit, performance
+-- business/ <- Business documentation
| +-- executive-summary.md <- Phase 0
| +-- product-overview.md <- Phase 0
| +-- marketing-guide.md <- Phase 2
+-- developer/ <- Developer documentation
| +-- backend-guide.md <- Phase 1 (updated each phase)
| +-- frontend-guide.md <- Phase 3 (updated each phase)
| +-- api-reference.md <- Phase 1 (updated each phase)
| +-- database-guide.md <- Phase 1
| +-- conception/ <- Technical conceptions (Phase 1-11)
| +-- phase-1-conception.md
| +-- phase-2-conception.md
| +-- ... through phase-11-conception.md
+-- enduser/ <- End-user documentation
| +-- admin-manual.md <- Phase 4 (updated each phase)
| +-- trainer-manual.md <- Phase 9
| +-- consumer-manual.md <- Phase 3 (updated each phase)
| +-- faq.md <- Phase 10
+-- operations/ <- Operations documentation
| +-- deployment-guide.md <- Phase 11
| +-- monitoring-guide.md <- Phase 11
| +-- support-runbook.md <- Phase 11
| +-- itops-guide.md <- Phase 11
+-- intranet/ <- HTML documentation site (auto-generated)
+-- build.py <- Intranet build script (Phase 0)
Documentation Milestones by Phase
| Phase | Documentation Deliverables |
|---|---|
| Phase 0 | business/executive-summary, business/product-overview, intranet/build.py |
| Phase 1 | developer/backend-guide, developer/database-guide, developer/api-reference |
| Phase 2 | Update api-reference (My Factura), business/marketing-guide |
| Phase 3 | enduser/consumer-manual, developer/frontend-guide |
| Phase 4 | enduser/admin-manual, update frontend-guide |
| Phase 5 | Update all docs (check-in, resource, booking, course) |
| Phase 6 | Update all docs (communication, event, homepage) |
| Phase 7 | Update all docs (document management, data import) |
| Phase 8 | Update all docs (CRM, support, accounting, DATEV) |
| Phase 9 | enduser/trainer-manual, update all docs (shop, franchise) |
| Phase 10 | enduser/faq, testing/coverage-report, testing/security-audit, testing/performance-report |
| Phase 11 | operations/* (4 files), Helm charts |
| Phase 12 | Update operations/deployment (Hetzner), business/marketing (GTM) |
| Phase 13 | Update enduser/admin-manual (wizard), developer/api-reference (provisioning) |
Intranet Regeneration
The intranet site is regenerated at the end of every phase:
python doc/intranet/build.py