Mirobody
The canonical registry of human health — roughly two thousand standardized indicators, clinical and lifestyle, resolved into one language.
Plateforme médicale intelligente et gestion de cabinet au Maroc (CNDP Loi 09-08)
Translation pending
HealthTypeScript · PythonGitHub @fahdalliti-dotOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Status: draft for review Scope: repo scaffolding + Prisma schema for slice 1 (clinics, users, roles, audit log) with tenant isolation Companion: CLAUDE.md — project guide, non-negotiable rules, roadmap
Section files live under docs/design/.
A runnable monorepo skeleton and a reviewed Prisma schema covering the first roadmap step: Auth, clinics, users and roles. It establishes the tenant model, the role/permission surface, session and refresh-token storage, the audit-log table, and the API/UI scaffolding that later slices build on. No patient data, appointments or billing yet — those are later slices.
| File | Covers |
|---|---|
| 01-architecture.md | Monorepo layout, stack choices, dev workflow, where each package lives |
| decisions.md | All approved decisions from the consistency review, with IDs matching the open-questions list |
| [02 - Data model.md](docs/design/02 - Data model.md) | Prisma schema: clinics, users, roles, invites, sessions, audit log, money/date conventions |
| 03-auth-and-sessions.md | Email+password, TOTP 2FA, recovery codes, session table, cookie strategy, lockout |
| [04 - API.md](docs/design/04 - API.md) | NestJS module layout, endpoint inventory for slice 1, permission model, validation, error shape |
| 05-ui.md | Next.js app structure, i18n routing, auth flows, layout, accessibility and empty/loading states |
These were answered in the planning conversation and are binding for the builder. They are restated here so the sections don't drift.
Subscription table only (clinic_id, plan,
status, trial_ends_at). No payment integration, no feature gating yet.admin and doctor at slice 1, with
recovery codes. Optional for secretary, plus a clinic-level setting
to require it for all users.Session table holding hashed refresh tokens, device
info, last_used_at, revoked_at, with rotation and reuse detection.
Deactivating a user revokes all their sessions. Short-lived access
tokens, httpOnly cookies.locale (default fr) and timezone (default
Africa/Casablanca) stored on Clinic; nullable locale override on
User. Text direction is derived from locale at render time — never
stored.clinic_id; every query
is scoped by the authenticated user's clinic_id, enforced centrally
(Prisma middleware), never ad hoc in controllers..env or keys.deleted_at); hard delete only through an
audited retention process.Africa/Casablanca. Money as integer
centimes (MAD), never floats.Health data is sensitive under Law 09-08 and falls under CNDP oversight. Any feature that collects, shares, exports or transfers patient data is legally sensitive and must be flagged in the implementation summary. Data must be hosted in Morocco or with a provider acceptable to CNDP — confirm before deploy. Medical confidentiality limits access to the care team of the clinic. This document is a development guide, not legal advice; compliance decisions are reviewed by a qualified lawyer.
These are settled in conversation or by sensible defaults and marked as "my call" where the builder may override.
packages/db/prisma/) and Turbo vs plain pnpm scripts
— my call: packages/db/prisma/, plain pnpm scripts for slice 1.SameSite and environment (dev vs prod) — my call:
SameSite=lax, with a flag to switch to strict in production.