Skip to content

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 dev

See 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 development

Naming Convention

TermMeaningIn Code
RestartiXBrand/company only--
PlatformThe entire system--
Core APIGo backendservices/api/, core-api
Clinic appStaff frontendapps/clinic/
Patient PortalPatient frontendapps/portal/
ConsoleSuperadmin frontendapps/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 -- *AppError with NewNotFoundError(), NewBadRequestError(), etc.
  • RLS via context -- repos use ConnFromContext(ctx) for tenant-scoped connections
  • Middleware order -- RequestID, Recovery, Logging, Auth, Org Context
SectionWhat's There
Project StatusPhase progress, blockers, recent completions
Implementation PlanFull phased build plan with detailed todos
ArchitectureSystem overview, decisions, AWS infrastructure
Feature SpecsAll 18 features with schemas, APIs, and implementation details
Technical ReferenceEndpoints, database, RLS, RBAC