Clinica runs entirely via Docker Compose — a single command starts the PostgreSQL database, the Node.js API on port 3000, and the React frontend on port 5173. Before you make your first booking, you’ll register a patient account, log in to receive a JWT, and confirm the API is healthy. The steps below take you through the full flow.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bentlyy/Clinica/llms.txt
Use this file to discover all available pages before exploring further.
Configure environment variables
Clinica reads its configuration from a
See Environment variables and configuration for a full reference.
.env file in the project root. A working default is already checked in, but you should review and update the values before running in any shared environment.| Variable | Purpose |
|---|---|
DATABASE_URL | Full PostgreSQL connection string. In Docker Compose this points to the db service. |
PORT | Port the API listens on. Defaults to 3000. |
JWT_SECRET | Secret used to sign JWT tokens. Change this to a long random string. |
EMAIL_USER | Gmail address used to send appointment reminders. |
EMAIL_PASS | Password or App Password for the Gmail account above. |
Start with Docker Compose
From the project root, build and start all three services — the database, API, and frontend — with a single command:Docker Compose starts the
db service first. The API waits until PostgreSQL is ready, then seeds the admin account and begins accepting requests. On first run, the build step may take a few minutes to pull base images and install dependencies.Verify the API health endpoint
Once the containers are running, confirm the API is up and connected to the database:You should receive:If you see
"db": "down", the API container started before the database was ready — wait a few seconds and try again.Register a patient account
New users register with an email address and password. The default role is A successful registration returns the new user’s
patient.id and email:Log in to get a JWT token
Log in with the same credentials to receive a signed JWT. You’ll include this token in the The response contains your token:Tokens expire after 24 hours.
Authorization header for all protected endpoints.Browse available doctors
The You’ll see an empty array until an admin creates doctor accounts. To do that, log in as the seeded admin (
/api/doctors/public endpoint is open — no token required. It returns the list of doctors patients can book with.admin@clinic.com / admin123) and call POST /api/doctors.What was seeded automatically
On first startup, Clinica creates a default admin account if no admin user exists:| Field | Value |
|---|---|
admin@clinic.com | |
| Password | admin123 |
| Role | admin |
Frontend
The React frontend is available at http://localhost:5173 once the containers are running. It provides a full UI for patients to browse doctors and book appointments, and for admins to manage the platform.Next steps
- Read Environment variables and configuration to understand every setting Clinica reads at startup.
- See Authentication for details on roles, JWT claims, and protected routes.
- See Roles & Permissions to understand what admins, doctors, and patients can do.