Developer Home
How to set up, run, and contribute to the RestartiX platform.
Looking for project status?
See the Project Status Dashboard for current phase progress, blockers, and what's being built next.
Prerequisites
- Go 1.22+
- Node.js 20+ with pnpm 10.x
- Docker (for PostgreSQL and Redis)
Running Locally
bash
# Start databases
cd services/api && make docker-up
# Apply migrations
make migrate-up
# Start the API (hot reload)
make dev
# In another terminal — start frontend apps
cd ../.. && pnpm install && pnpm devSee the Local Development guide for full details (env vars, ports, troubleshooting).
Repository Structure
restartix-platform/
├── apps/
│ ├── clinic/ # Staff-facing Next.js app (port 9100)
│ ├── portal/ # Patient-facing Next.js app (port 9200)
│ ├── console/ # Superadmin Next.js app (port 9300)
│ └── docs/ # This documentation (VitePress)
├── services/
│ └── api/ # Go Core API backend (port 9000)
├── packages/
│ ├── ui/ # Shared shadcn/ui component library
│ ├── eslint-config/ # Shared ESLint config
│ └── typescript-config/ # Shared TypeScript config
└── CLAUDE.md # Project conventions for AI-assisted developmentNaming Convention
| Term | Meaning | In Code |
|---|---|---|
| RestartiX | Brand/company only | -- |
| Platform | The entire system | -- |
| Core API | Go backend | services/api/, core-api |
| Clinic app | Staff frontend | apps/clinic/ |
| Patient Portal | Patient frontend | apps/portal/ |
| Console | Superadmin frontend | apps/console/ |
Never use "desk" or "Desk" -- that was the old naming.
Key Patterns
- Repository pattern -- each domain package owns its SQL
- Constructor-based DI -- no DI framework
- Thin handlers -- parse, call service, render. No business logic in handlers.
- Typed errors --
*AppErrorwithNewNotFoundError(),NewBadRequestError(), etc. - RLS via context -- repos use
ConnFromContext(ctx)for tenant-scoped connections - Middleware order -- RequestID, Recovery, Logging, Auth, Org Context
Quick Links
| Section | What's There |
|---|---|
| Project Status | Phase progress, blockers, recent completions |
| Implementation Plan | Full phased build plan with detailed todos |
| Architecture | System overview, decisions, AWS infrastructure |
| Feature Specs | All 18 features with schemas, APIs, and implementation details |
| Technical Reference | Endpoints, database, RLS, RBAC |