Caremint Docs · 1.0.0 Also included as a PDF
Caremint · documentation · version 1.0.0

Install it, connect your services, run clinics on it

Caremint is clinic and doctor practice software that you run as your own software business. Clinics sign up and get a calendar with a column per doctor, patient records, visit notes with ICD-10 diagnoses, prescriptions as PDFs, invoices and payments, an online booking page, WhatsApp reminders through Meta's official WhatsApp Cloud API, video visits and a patient portal. You sell plans to them through your own Stripe account and run everything from the super-admin. You can also run it for one clinic of your own.

This guide is written for first-time installers: every command is shown in full, and every setting says where to find it. The chapter about Meta takes you through Meta's own screens click by click, because that is where most people get stuck.

Part 01

Get started

1Welcome

Thank you for choosing Caremint. This guide takes you from the download to a running clinic platform with your first clinic booking patients.

What you get

  • The clinic for your customers and their teams: an overview of the day; a calendar by day and week with a column per doctor, drag to move, walk-ins and a waiting list; patients with allergies, conditions, documents, consent records and CSV import; visits with vitals, notes in four parts, ICD-10 diagnosis search and signing; prescriptions as PDFs on the clinic's letterhead with the doctor's signature; invoices, desk payments, pay links and refunds; reports; reminders by WhatsApp and email; online booking; staff with roles and working hours; services and rooms; and settings with an audit log.
  • Pages for patients: the clinic's booking page (and a button for its website), a link to confirm, move or cancel, a page to pay a deposit or a bill, the patient portal, a public prescription check and a video waiting room.
  • The super-admin for you: monthly recurring revenue, clinics, people, plans, payments and subscriptions, platform settings (branding, Meta app, Stripe, email, AI providers, storage, sign-ups, legal pages, maintenance, email wording) and a setup check that tests every outside service live.
  • WhatsApp reminders on each clinic's own number through Meta's official WhatsApp Cloud API: the day before and 2 hours before, with Confirm, Reschedule and I can't come buttons that update the calendar. Caremint never uses WhatsApp Web, QR-code logins or "warm-up" tools, which break WhatsApp's terms and get numbers banned. Without a connected number, reminders go by email.
  • Payments to each clinic's own Stripe account for patients' deposits and bills, and to your Stripe account for the clinics' plans.
  • An install wizard and sample plans, so the app is ready the first time it opens.
  • One-command self-hosting with Docker: the app (one compiled Rust program that also serves the web app), PostgreSQL, MinIO file storage and optional automatic HTTPS with Caddy.

What is in the download

PathWhat it is
apps/backend/The server, written in Rust (Axum): the /api/v1 API, the WhatsApp and Stripe webhooks, the background jobs (reminders among them) and the built web app, compiled into one program called caremint.
apps/frontend/The web app: React 19, React Router 7, Vite, Tailwind CSS 4 and shadcn/ui components. Every screen your clinics, their patients and you see.
crates/wa/The WhatsApp Cloud API library: sending, webhooks and signature checks, templates, number details, Embedded Signup, throttling and the built-in simulator used by the demo and the tests.
migrations/The PostgreSQL database schema. The server applies it by itself when it starts.
docker/, compose.yamlThe Dockerfile, the Docker Compose stack and the Caddy HTTPS config.
.env.exampleEvery setting, explained. Copy it to .env.
docs/This documentation as one HTML file and as a PDF, plus the list of third-party licences.
README.md, CHANGELOG.md, LICENSE.txtA one-page overview, the version history and the licence notes.

AI disclosure

AI tools used to create this item: Yes

  • Source code: Yes. Written with Claude by Anthropic as an AI coding assistant, then reviewed, tested (server tests against a real PostgreSQL, WhatsApp library tests against Meta's own webhook examples, and browser tests) and integrated by us.
  • Documentation: Yes. Drafted with Claude by Anthropic and checked against the running app and the providers' own setup screens.
  • Graphics: No. No image was made with an AI image generator. The Caremint logo is a leaf icon from the Lucide icon set on a coloured square, the demo clinic's logo is a simple drawing made for the demo, the doctors' demo signatures are set in an open-licence handwriting font, and every screenshot in this guide and the item's previews is a capture of the running app.
  • Demo text: Yes. The made-up clinics, staff, patients, visit notes, prescriptions and messages of the demo were written with Claude by Anthropic and edited by us. Every name, phone number and email in the demo is invented.

AI-powered features: Yes

  • Writing help for visit notes: the doctor types bullet points, and the AI turns them into the four parts of a visit note (subjective, objective, assessment, plan) for the doctor to check. Nothing is saved until the doctor chooses Use these notes.
  • Provider: OpenAI, Anthropic (Claude) or Google Gemini, chosen in the super-admin, with your own API key. The provider bills you directly for every draft; the chapter Extra costs you pay gives today's prices.
  • No AI diagnosis. The helper only rewrites what the doctor wrote. It is told never to add a finding, a diagnosis or a medicine, and it gives no medical advice. AI text can still be wrong, so the doctor reads every line before using it.
  • Without a key the helper is off and hidden, and nothing is sent to an AI provider. On the public demo a simple rule-based writer (not an AI model, no cost) stands in and says so.
Not affiliated

Caremint is not affiliated with, endorsed by or sponsored by Meta or WhatsApp. WhatsApp and Meta are trademarks of their owners. Caremint also works with your own accounts at Stripe, OpenAI, Anthropic, Google and Jitsi, and is not made, endorsed or sponsored by any of them.

Not medical advice, no compliance claim

Caremint is practice management software: it keeps a clinic's calendar, records and bills. It does not diagnose, give medical advice or replace a doctor's judgement. It is built with privacy controls (chapter 32), but whether a clinic meets HIPAA, GDPR or its local health-data law depends on where and how you run it, the agreements you sign and the clinic's own practices. Caremint makes no compliance claim.

Screenshots

The main screens of the clinic, the patients' pages, the super-admin and the phone layout. Every chapter in parts 03 to 05 has more.

The clinic's overview: today's appointments, the waiting room, tomorrow's confirmations, money taken and what needs attention
The clinic's overview: today's appointments, the waiting room, tomorrow's confirmations, money taken and what needs attention
The calendar: a column per doctor, appointments by status, walk-ins and blocked time
The calendar: a column per doctor, appointments by status, walk-ins and blocked time
A visit: vitals, notes in four parts, ICD-10 diagnoses and the prescription
A visit: vitals, notes in four parts, ICD-10 diagnoses and the prescription
A patient's record: allergies, conditions, visits, prescriptions, bills and documents
A patient's record: allergies, conditions, visits, prescriptions, bills and documents
Reminder rules: what goes out, when, and by WhatsApp or email
Reminder rules: what goes out, when, and by WhatsApp or email
The super-admin: revenue, clinics, appointments and what needs attention
The super-admin: revenue, clinics, appointments and what needs attention
The clinic's booking page on a phone
The clinic's booking page on a phone
The patient portal on a phone
The patient portal on a phone
The calendar on a phone
The calendar on a phone
The overview on a phone
The overview on a phone

2Requirements

To run it (recommended: Docker)

  • A 64-bit Linux server (Intel/AMD or ARM) with Docker Engine 24 or newer and Docker Compose 2.20 or newer (the stack uses Compose's include feature). Docker Desktop on macOS or Windows works for trying it on your own computer.
  • For the first build (Docker compiles the Rust server from source): 2 processor cores and 4 GB of memory (or 2 GB plus swap). Plan for a few minutes on such a server; a 16-core server built this release in about a minute and a half. More cores build faster but use more memory at once. Leave about 6 GB of free disk for Docker's build cache; docker builder prune gives that space back once the app runs.
  • To run it the server needs far less: the app image is about 110 MB and the app uses only a few MB of memory when idle. PostgreSQL and MinIO run beside it, so plan at least 1 GB of memory for a small install. You can also build on another computer and run the result on a smaller server; see Put it online.
  • A domain name and HTTPS for a public launch. Meta sends WhatsApp events only to a public https:// address with a valid certificate, and patients open their links on their phones; the bundled Caddy gets a free certificate for you.
  • A current version of Chrome, Edge, Firefox or Safari for you, the clinics and their patients.

To build or change it without Docker

  • Rust 1.90 or newer (stable) from rustup.rs.
  • Node.js 24 (22.12 or newer also works) and pnpm 11 (corepack enable installs the pnpm version the project asks for).
  • PostgreSQL 15 or newer (the Docker stack ships PostgreSQL 17).
  • Optional: any S3-compatible storage (MinIO, AWS S3, Cloudflare R2, Backblaze B2…). Without it, files are kept in a local folder.

Accounts you need

AccountWhat it is forNeeded
Stripe (yours)Selling plans to clinics. Each clinic that takes patient payments online connects its own Stripe account in the app.To charge clinics
An SMTP email providerReminders by email, booking confirmations, portal sign-in codes, password resets, invites and notices. Without it, each email is written to the app's log.For a public launch
Meta developer account and a business portfolio (Meta Business Suite)Your Meta app, the WhatsApp webhook, and Embedded Signup for clinics. Each clinic needs its own WhatsApp Business Account (Meta creates it during sign-up).For WhatsApp reminders
OpenAI, Anthropic or Google AIThe writing helper for visit notes. Without a key it is off.Optional
S3-compatible storagePatient documents, imports, logos and signatures. The bundled MinIO does this on the same server.Optional
A Jitsi Meet serverVideo visits. The free public server meet.jit.si is used when you set nothing.Optional

3Extra costs you pay

Caremint has no monthly fee of its own. What you and your clinics pay each month depends on the outside services you turn on. Each of them is run by another company with its own pricing, and you, the buyer, are responsible for every one of these costs (or for passing them on to your clinics). The prices below are the providers' published list prices in November 2026; they change, so check each provider's own pricing page before you set the prices of your plans.

WhatsApp reminders (Meta)

Meta charges for WhatsApp Business Platform messages per delivered template message, by the template's category and the country code of the patient who receives it. Messages patients send in are free.

MessageExample price (USA and Canada)When it applies
Utility templateabout $0.0034Every reminder, booking confirmation, "starts soon" message, missed-visit note, documents message, pay link and waitlist offer. Since 1 October 2026, utility templates are charged even inside the 24-hour customer service window.
Authentication templateabout $0.0034The patient portal's sign-in code, when the clinic has an approved login_code template. Some countries have a higher "authentication-international" rate. Without it the code goes by email.
Service message1,000 free a month per number, then about $0.0034A free-form reply to a patient inside the 24-hour window, for example from the patient's record.

Prices differ by country, from a fraction of a cent to a few cents per utility message. An example: a clinic with 400 visits a month sends about four utility templates per visit (the booking confirmation, the reminder the day before, the 2-hour message and the visit's documents), so about 1,600 messages, or roughly $5.40 a month at the US rate.

Who Meta bills

Meta bills the owner of the WhatsApp Business Account that sent each message (Meta now calls it the "Messaging account"), using the payment method saved on that account in Meta Business Suite. Each clinic connects its own number, so Meta bills the clinic directly, and Caremint never collects or passes on Meta's fees. Without a payment method on file, Meta stops delivering paid messages, and Caremint sends the reminder by email where the rule allows it.

Meta publishes the current prices for every country and the dates of upcoming changes on its WhatsApp pricing page, where the full rate card can be downloaded. Meta changes its rates several times a year.

Everything else

ServicePriceWhat that means for you
Writing help off (no AI provider)FreeDoctors type their notes themselves; nothing is sent to an AI provider.
OpenAI, default model gpt-5-mini$0.25 / $2.00Per million input / output tokens. About 0.1 to 0.2¢ per note draft.
Anthropic, default model Claude Sonnet 5.5 (claude-sonnet-5-5)$2 / $10Per million input / output tokens. About 0.5 to 1¢ per note draft. Claude Haiku 5.5 ($0.10 / $0.50) costs much less; Claude Opus 5.5 ($4 / $20) costs more.
Google Gemini, default model gemini-2.5-flash$0.30 / $2.50Per million input / output tokens. About 0.1 to 0.2¢ per note draft.
Stripe for your plans2.9% + 30¢Per successful US card payment, plus 0.7% of subscription volume for Stripe Billing. On a $79 plan that is about $3.15 a month. Other countries and cards have their own rates.
Stripe for patient payments2.9% + 30¢Per successful US card payment, paid by each clinic on its own Stripe account (deposits and bills).
Email (for example Amazon SES)$0.10 per 1,000Per email sent. Other SMTP providers sell monthly plans with a free tier.
Video visits (Jitsi Meet)Free, or your plan with a providerThe public meet.jit.si server costs nothing. Your own Jitsi server costs only its hosting. Hosted services such as 8x8 JaaS have a small free tier and then charge per monthly active user.
File storage$0 to $0.015 per GBThe bundled MinIO or the server's own disk costs nothing extra. Cloudflare R2, for example, charges $0.015 per GB a month with the first 10 GB free and no fee for downloads.
Server (VPS)about $10 to $40 a monthOne server with 2 cores and 4 GB of memory runs the whole Docker stack for many clinics.
Domain nameabout $10 to $20 a yearThe address of your platform, for example clinic.example.com.
How the AI estimates are made

A draft sends the helper's instructions and the doctor's bullet points (together about 500 to 1,000 tokens) and gets back the four note parts (about 300 to 600 tokens). Long bullet lists and models that reason before answering use more. Check your provider's usage page after the first real drafts.

You control the AI spend

Every plan has a number of AI note drafts a month (Super-admin → Plans). A draft counts only when a real AI provider wrote it. A clinic that has used its drafts keeps writing notes by hand until the next month or an upgrade, so the AI bill can never run past what your plans allow.

4Quick start with Docker

This runs Caremint on your own computer or on a server. The first build compiles the server from source, so it takes longer than later starts.

  1. Unzip the download and open a terminal in the caremint/ folder (the one with compose.yaml in it).
  2. Create your settings file:
    cp .env.example .env
  3. Open .env in any text editor and fill in these values:
    APP_URL=http://localhost:8080                 # your public https:// address on a server
    APP_SECRET=paste-a-random-string-here         # make one with: openssl rand -hex 32
    POSTGRES_PASSWORD=pick-a-long-password        # letters and digits only
    S3_SECRET_ACCESS_KEY=pick-another-password    # at least 8 characters
    Change both passwords: the example values are public. Keep APP_SECRET safe and never change it after the install, because it encrypts the WhatsApp tokens, Stripe keys and other secrets you save. Leave DATABASE_URL empty: Docker builds the database address from the values above, and that key is only for running the server without Docker.
  4. Build and start everything:
    docker compose up -d --build
    The first build takes a few minutes, mostly for compiling the Rust server. Later builds reuse Docker's cache. Docker then starts PostgreSQL and MinIO (file storage), creates the storage bucket and starts the app, which applies the database migrations by itself.
  5. Find the install token in the app's log (if the app has restarted, use the last one):
    docker compose logs app | grep -i "install token"
    The line reads Install token: cm-install-… (open /install and paste it).
  6. Open http://localhost:8080. The install wizard opens: paste the token, check the server, create your super-admin account and name your product.
Good to know

See what the app is doing with docker compose logs -f app. Stop it with docker compose down; your data stays in Docker volumes. Use another port by setting APP_PORT=8090 in .env and running docker compose up -d. The app port is open on this computer only (APP_BIND=127.0.0.1); on a server, visitors come in through HTTPS as the next chapter shows.

Disk space after the build

Docker keeps a few GB of build cache so that later builds are fast. If disk is tight, run docker builder prune once the app is running: it frees that space without touching your data, and the next build simply starts from scratch again.

Out of memory during the build

If the build stops with "signal: 9" or "killed", the server ran out of memory while compiling. Add swap (for example 4 GB) and run the same command again, or build on a bigger computer and copy the result, as the next chapter explains.

5Put it online

For real patients, Caremint must be reachable at a public https:// address: patients open booking, payment and portal links on their phones, and Meta delivers every WhatsApp event to a webhook on your server.

1. Pick a server

SizeGood for
2 cores, 4 GB memory, 40 GB diskBuilding on the server and running a growing platform (dozens of clinics).
1 to 2 cores, 1 to 2 GB memoryRunning a build made on another computer (see "Build on another computer" below), or building with swap added.
4+ cores, 8+ GB memoryHundreds of clinics, or many server copies. Sending speed on WhatsApp is set by Meta's limits for each number, not by the server.

Any provider that sells Linux servers with Docker works. Disk use grows mainly with patient documents, so move files to outside storage once it grows (see File storage). Choose the server's country with care: it is where patient records live (chapter 32).

2. DNS

At your domain registrar, add an A record for the address you want (for example clinic for clinic.example.com) pointing at your server's IP address. Wait until ping clinic.example.com shows that IP.

3. Settings

In .env:

APP_URL=https://clinic.example.com
APP_DOMAIN=clinic.example.com
TRUSTED_PROXY_HOPS=1

4. Start with HTTPS

When nothing else on the server uses ports 80 and 443, the bundled Caddy does it all. Open both ports in your server's firewall, then:

docker compose --profile https up -d --build

The https profile adds Caddy, a web server that gets and renews a free certificate for APP_DOMAIN by itself. Open https://clinic.example.com; the first visit takes a few seconds while the certificate is issued. Caddy passes the live update stream through unbuffered, so the calendar and the waiting room update at once.

Already running a proxy?

Caddy needs ports 80 and 443 for itself. If Traefik, Nginx Proxy Manager, an Nginx or Apache already owns them, leave out --profile https, start with docker compose up -d --build and let your proxy pass visitors on to Caremint, as the next part shows.

Behind a proxy you already run

Where the proxy runs decides how it reaches the app:

  • Installed on the server itself (Nginx or Apache from the system's packages): point it at http://127.0.0.1:8080 (APP_PORT), the port the app opens on this server only.
  • In a Docker container (Traefik, Nginx Proxy Manager, an Nginx container): it cannot use 127.0.0.1:8080, because inside a container that address is the container itself. Put the app on the proxy's Docker network instead, with a compose.override.yaml file next to compose.yaml. Docker Compose reads it by itself on every docker compose command. docker network ls shows the proxy's network name; the examples call it proxy.

Traefik: the labels tell Traefik the address, the entrypoint and the certificate resolver. Use the entrypoint and resolver names from your own Traefik setup (websecure and letsencrypt are common).

# compose.override.yaml: Caremint behind a Traefik that runs in Docker
services:
  app:
    networks: [default, proxy]    # default: the app's own database and storage
    labels:
      - traefik.enable=true
      - traefik.docker.network=proxy   # the same network name
      - traefik.http.routers.caremint.rule=Host(`clinic.example.com`)
      - traefik.http.routers.caremint.entrypoints=websecure
      - traefik.http.routers.caremint.tls.certresolver=letsencrypt
      - traefik.http.services.caremint.loadbalancer.server.port=8080

networks:
  proxy:
    external: true
    name: proxy                   # your proxy's network, as docker network ls shows it

Nginx in a container, or Nginx Proxy Manager: join the network the same way and give the app a name there that no other container uses.

# compose.override.yaml: Caremint on the network of an Nginx container
services:
  app:
    networks:
      default:
      proxy:
        aliases: [caremint]

networks:
  proxy:
    external: true
    name: proxy                   # your proxy's network, as docker network ls shows it

Then send the traffic to http://caremint:8080 (http://app:8080 also works while no other container on that network is called app). In Nginx:

location / {
    proxy_pass http://caremint:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_buffering off;              # the live updates are a stream
    client_max_body_size 101m;        # patient documents go up to 100 MB
}

In Nginx Proxy Manager, add a Proxy Host with scheme http, forward hostname caremint and port 8080, request its SSL certificate, and paste the last two lines above into the Advanced tab.

Then start the app with docker compose up -d --build and keep TRUSTED_PROXY_HOPS=1: Traefik, Nginx and Nginx Proxy Manager each add one address, as the next section explains.

5. Visitor addresses and rate limits

Caremint limits sign-ins, sign-ups, password resets and online bookings per visitor address, so nobody can guess passwords or flood a clinic's calendar at speed. It reads the visitor's address from the X-Forwarded-For header only behind the number of proxies you trust, set with TRUSTED_PROXY_HOPS. A visitor can type any X-Forwarded-For they like, so trusting it without a proxy would let them make up a new address for every try.

Your setupSetting
The bundled Caddy (--profile https)TRUSTED_PROXY_HOPS=1 (the Docker default). The app port is published on 127.0.0.1 only, so Caddy is the only way in, and Caddy replaces any X-Forwarded-For a visitor sends with the real address.
Your own Nginx, Apache or Traefik on the same server, on the host or in Docker (above)TRUSTED_PROXY_HOPS=1 and keep APP_BIND=127.0.0.1. Caremint counts the address your proxy adds last, so a header a visitor makes up is never used; replacing the header is still tidiest (Nginx: proxy_set_header X-Forwarded-For $remote_addr;). Turn off response buffering for /api/v1/events (Nginx: proxy_buffering off;) so live updates work, and allow uploads up to 101 MB (Nginx: client_max_body_size 101m;).
A load balancer or CDN in front of your proxy (for example Cloudflare, then Caddy)TRUSTED_PROXY_HOPS=2: one hop for each proxy that adds an address. Never set a higher number than the proxies really in front of the app.
No proxy at all (app port open to the internet)TRUSTED_PROXY_HOPS=0 and APP_BIND=0.0.0.0. No header is trusted, every visitor counts as one address for the per-address limits, and the per-account limits still apply. Without HTTPS this suits only testing.

Super-admin → Setup check shows the current setting in its "Visitor addresses" row. The full list of limits is in Security notes.

Build on another computer

If your server is small, build the program on a bigger computer with Docker and copy it over. The packed program is one file that already holds the web app.

# on the bigger computer, in the caremint folder (add --platform linux/arm64 for an ARM server)
docker build -f docker/Dockerfile --target pack -t caremint-pack --platform linux/amd64 .
docker create --name caremint-pack-copy caremint-pack
mkdir -p prebuilt
docker cp caremint-pack-copy:/caremint prebuilt/caremint
docker rm caremint-pack-copy

# copy prebuilt/caremint into the same folder on the server, then on the server:
BUILD_TARGET=prebuilt docker compose --profile https up -d --build

Set BUILD_TARGET=prebuilt in .env to keep it for later starts. The program must match the server's processor type (Intel/AMD = linux/amd64, ARM = linux/arm64).

Without Docker

Build the web app, then the server, and run the server behind your own HTTPS proxy:

cd apps/frontend && corepack enable && pnpm install && pnpm build && cd ../..
cargo build --release -p caremint-server
./target/release/caremint pack apps/frontend/dist/client ./caremint
# .env next to where you start it: DATABASE_URL, APP_URL, APP_SECRET; STORAGE_DRIVER=local or your S3 bucket
BIND=127.0.0.1:8080 ./caremint serve

Keep it running with a service manager such as systemd. The server applies the migrations when it starts; ./caremint migrate applies them on their own.

Two copies on one server

To run a staging copy next to the live one, unzip Caremint into a second folder and give each copy its own .env:

# .env of the live copy
COMPOSE_PROJECT_NAME=caremint
APP_PORT=8080
APP_URL=https://clinic.example.com

# .env of the staging copy
COMPOSE_PROJECT_NAME=caremint-staging
APP_PORT=8081
APP_URL=https://staging.example.com
SEARCH_INDEXING=off

COMPOSE_PROJECT_NAME keeps each copy's containers, database, files, network, image and build cache apart, so a docker compose command in one folder never touches the other. Left empty, it is the folder's name, so two folders with the same name (for example /srv/live/caremint and /srv/staging/caremint) would share everything: always set it when you run two copies. Give each copy its own passwords and its own APP_SECRET, and never copy real patient records into a staging copy. Only one copy can run the bundled Caddy, because it needs ports 80 and 443, so put both behind one proxy you run yourself (Behind a proxy you already run) with a different router name or network alias for each, for example caremint-staging. SEARCH_INDEXING=off keeps search engines away from the staging copy (Search engines).

6Install wizard

The first visit to a new install opens the wizard at /install. It runs once; afterwards the page is locked.

  1. Setup token. Paste the token from the app's log (docker compose logs app | grep -i "install token" shows Install token: cm-install-… (open /install and paste it)) and press Check token. The app prints it at every start until the install is finished, and a restart makes a new one, so use the last line. Lost it? Set INSTALL_TOKEN in .env to a value of your choice and restart the app with docker compose up -d.
  2. Server check. The database, file storage, the app address, email, Stripe, the Meta app, the WhatsApp webhook, the writing helper and the other settings from .env, each marked Ready or Later. Lines marked required must work before you go on; a red one blocks Continue until you change .env, restart the app and press Check again. Everything marked Later can be set up afterwards in Super-admin → Settings.
  3. Create the super-admin. Your name, email and password (at least 10 characters) and the name of your product, which you can change any time. The app address is shown from APP_URL. Add the sample plans (on by default) adds four plans with monthly and yearly prices (chapter 11); untick it to make your own.
  4. Done. You are signed in as the super-admin and the wizard is locked. It lists what it created and the things to set up before you invite clinics: email, Stripe and, optionally, the Meta app. Open setup check or Go to the admin.
Step 1: paste the setup token from the server log
Step 1: paste the setup token from the server log
Step 2: the server check
Step 2: the server check

7Setup check

Super-admin → Setup check lists everything a running platform depends on, with a plain-words status, what to do about it and, where possible, a Test button that calls the service for real.

RowWhat the test does
DatabaseReads the PostgreSQL version and the number of migrations applied.
File storageWrites, reads and deletes a small test file in your bucket or folder.
Email (SMTP)Connects to your mail server and sends a test email to the address you type.
Stripe and Stripe webhookReads your Stripe balance; warns about paid plans without a Stripe price ID and a missing webhook secret.
Meta appGets an app token from Meta with your app ID and secret; warns when Embedded Signup is not set up.
WhatsApp webhookCalls your own webhook address the way Meta does, with the verify token, and shows when Meta last sent an event.
AI writing helpLists the provider's models with your key, or says the helper is off.
App addressChecks that APP_URL is https and that the app answers there.
Visitor addressesShows the TRUSTED_PROXY_HOPS setting.
Background jobsShows queued, running and failed jobs (reminders, sending, webhook processing, template reviews, imports), with the reason a job failed and a Retry button.
InstallShows when the install wizard ran.
Setup check: each service with a status, a fix and a live test, and the background jobs below
Setup check: each service with a status, a fix and a live test, and the background jobs below
Part 02

Connect services

Every outside service you run for the whole platform can be set in .env or in Super-admin → Settings. Values saved in the super-admin take precedence over .env, are stored encrypted with your APP_SECRET, and are never shown again once saved (only their last four characters). Change a value by typing a new one. Two things belong to each clinic instead and are set inside the clinic: its WhatsApp number (Reminders → WhatsApp) and its Stripe account for patient payments (Settings → Payments).

8WhatsApp reminders: Meta setup, step by step

Caremint sends reminders and receives the patients' answers through Meta's WhatsApp Cloud API, from each clinic's own WhatsApp number. This chapter sets up your Meta app, a test number and the webhook, connects the number to a clinic, and then takes the number live. Allow about an hour the first time. Meta's screens change now and then; the names below are the ones Meta used in November 2026.

WhatsApp is optional

Without any of this, every reminder goes by email. A clinic can start with email and connect WhatsApp later; nothing else changes.

Two ways to connect a number

Enter IDs and a token (this chapter): a phone number ID, the account ID and a permanent token from a Meta app. It works at once and needs no Meta review, so it is how you connect your own test number and how a clinic with its own Meta app connects its number. Quick sign-up (Meta's Embedded Signup, next chapter): the clinic clicks Quick sign-up and picks its number in Meta's own window. It needs the Meta app from this chapter plus Meta's approval of your app.

Messaging account or WhatsApp account?

In 2026 Meta's Business settings show two separate items where older guides say "WhatsApp Business Account (WABA)". Caremint needs the first one:

Meta showsWhereWhat it is
Messaging accountBusiness settings → Accounts → Messaging accounts; in the App Dashboard's API Setup it is the "Messaging account ID"The real WhatsApp Business Account: it holds the message templates, the phone numbers and the payment method. Its ID is the WhatsApp Business Account ID Caremint asks for.
WhatsApp accountBusiness settings → Accounts → WhatsApp accountsThe phone number's business presence (profile, display name). It has a different ID. Do not paste this ID into Caremint, and do not give your system user only this one.

Step 1. A Meta developer account

  1. Sign in to Facebook with the account that will own the app, and turn on two-factor authentication (Meta requires it for business tools).
  2. Open developers.facebook.com, choose Get started and register as a developer. Meta confirms your account with a phone number or a card; a phone number already used by another Meta developer account is refused, so use a card or another number in that case.

Step 2. A business portfolio

Open business.facebook.com and create a business portfolio for your company (name, your name, a business email). Everything WhatsApp lives inside it: the Messaging account, the numbers, the system user and later the business verification.

Step 3. A Meta app with the WhatsApp use case

  1. In the developer dashboard choose My Apps → Create app.
  2. Give it a name (your product's name), pick the use case Connect with customers through WhatsApp and connect it to your business portfolio.
  3. Create the app. Meta adds the WhatsApp product, a test Messaging account and a free test phone number.

Step 4. The test number and its five recipients

  1. In the App Dashboard open WhatsApp → API Setup. Note the Phone number ID and the Messaging account ID of the test number.
  2. Under To, choose Manage phone number list and add the phones you will test with. A test number can message at most five allow-listed numbers; any other number fails with error 131030.
  3. Each phone you add gets a 5-digit code on WhatsApp. Type it in to confirm the number.
  4. Send Meta's hello_world test message from that page once, to check that the number works.
The token on API Setup is temporary

The access token shown on API Setup stops working after about 24 hours. Use it only for this first test. Caremint needs a permanent token from a system user (next step).

Step 5. A system user and a permanent token

  1. Open Business settings (business.facebook.com → Settings) → Users → System users and choose Add.
  2. Name it with one word without spaces, for example ClinicServer (Meta refuses names with spaces), and give it the Employee role. Employee is enough.
  3. Choose Assign assets:
    • Apps → your app → turn on Manage app (full control).
    • Accounts → Messaging accounts → your Messaging account → turn on full control ("Everything").
    Assigning only the WhatsApp account is the most common mistake: the token then works for sending but every template call fails with error 100 ("Object … does not exist", subcode 33), so Caremint's reminder templates never reach Meta.
  4. Choose Generate token: pick your app, set the expiry to Never, tick whatsapp_business_management and whatsapp_business_messaging, and generate.
  5. Copy the token right away and keep it somewhere safe: Meta shows it only once. Anyone with this token can send messages as the business.

Step 6. The app secret

In the App Dashboard open App settings → Basic, find App secret and choose Show. Meta asks for your Facebook password again. Caremint uses the app secret to prove that every webhook really comes from Meta.

Step 7. Your Meta app in Caremint

  1. In Caremint open Super-admin → Settings → Meta app.
  2. Enter the App ID and the App secret, and press New verify token (or set META_VERIFY_TOKEN in .env). The verify token is any random string; it only proves to Meta that the webhook address is yours.
  3. Save. The page shows your callback URL: https://clinic.example.com/api/v1/webhooks/whatsapp (your APP_URL followed by /api/v1/webhooks/whatsapp).
Super-admin → Settings → Meta app: app ID, app secret, verify token, Embedded Signup configuration and the callback URL to paste into Meta
Super-admin → Settings → Meta app: app ID, app secret, verify token, Embedded Signup configuration and the callback URL to paste into Meta

Step 8. The webhook in Meta

  1. In the App Dashboard open Use cases, then Connect with customers through WhatsApp → Customize. Under Step 2. Production setup choose Configure Webhooks. (Dashboards from before 2026 had it under WhatsApp → Configuration → Webhook → Edit.)
  2. Paste the Callback URL and the Verify token from Caremint and choose Verify and save. Meta calls your server at once; this works only when Caremint is online at that https address.
  3. The Webhook fields table then appears below, with a Subscribe switch for each field. Check that these are on:
    • messages (required: the patients' answers and taps, and the sent, delivered, read and failed receipts),
    • message_template_status_update (template approvals and rejections arrive at once),
    • message_template_quality_update (a template's quality rating changed),
    • phone_number_quality_update (quality rating and messaging limit changes),
    • user_preferences (a patient stopped or resumed marketing messages inside WhatsApp).
  4. Each field has a Test link that sends a signed sample event to your server: a quick check that Meta reaches Caremint. If the app secret saved in Caremint is wrong, docker compose logs app shows "webhook refused: bad or missing signature"; otherwise the sample is accepted quietly (it is for a made-up number, so nothing appears in a clinic).

While the app is unpublished, this page warns that it receives only test webhooks. In practice the sent, delivered and read events of the test number arrive anyway; if real answers ever stop reaching Caremint while the Test link works, publish the app (see Troubleshooting).

Super-admin → Setup check → WhatsApp webhook shows the time of the last event from Meta.

Step 9. Connect the number to a clinic

  1. Sign in to a clinic as its owner or clinic admin. To make one, open the clinic menu at the top of the sidebar and choose Create a clinic, or use /signup while sign-ups are open (Super-admin → Settings → Sign-ups).
  2. Open Reminders → WhatsApp → Connect a WhatsApp number → Enter IDs and a token.
  3. Fill in the Phone number ID, the WhatsApp Business Account ID (the Messaging account ID), the permanent access token from step 5 and, if you like, a label the clinic's team sees, for example "Front desk line".
  4. When the token comes from your platform Meta app (the one in Super-admin → Settings → Meta app), turn on This number is on the platform's Meta app. When the number belongs to another Meta app, such as a clinic's own app, enter that app's secret instead: without it Caremint cannot check the signature of that app's webhooks and refuses them, so no answer would arrive.
  5. Press Connect. Caremint checks everything with Meta before saving: it reads the display number, the verified name, the quality rating and the messaging limit, and subscribes the app to the account's webhooks.
  6. For a number on another Meta app, the next screen shows a Callback URL and a Verify token for that number. Paste them into that app's Configure Webhooks page as in step 8. Numbers on your platform app use the webhook you already set up.

Right after connecting, Caremint sends its reminder templates to Meta for review (chapter 10). Templates at Meta on the same page shows each one's status. A reminder goes by WhatsApp once its template is approved, usually within minutes; until then it goes by email.

Connect a WhatsApp number: IDs and a token, checked with Meta before saving
Connect a WhatsApp number: IDs and a token, checked with Meta before saving

Step 10. Test it

In the clinic, add a test patient whose mobile is one of the allow-listed phones and who agreed to WhatsApp, and book them an appointment. The booking confirmation arrives on that phone within a second or two, and the message log (Reminders → Message log) shows it sent, then delivered, then read. Book one for tomorrow and tap Confirm on the reminder: the appointment turns confirmed in the calendar. Meta delivers to the test number's five recipients only, so use them for every test until the number is live.

Step 11. Go live with a real number

  1. Add the clinic's number. In the App Dashboard's API Setup (or WhatsApp Manager → Phone numbers) choose Add phone number. Enter the display name patients will see (the clinic's name), the business category and the number, then confirm it with the code Meta sends by SMS or voice call. The number must be able to receive that code and must not be in use on the WhatsApp or WhatsApp Business app (delete that account first).
  2. Display name. Meta reviews the display name against its display name rules (it should match the clinic, with no extra words such as slogans). Until it is approved, messages may show the number instead.
  3. Payment method. In Business settings → Billing and payments, add a card to the Messaging account. Meta bills that account for every reminder; without a payment method, paid messages stop.
  4. Business verification. In Business settings → Security center, choose Start verification and send the business documents. It raises the sending limit and is required before you can offer Quick sign-up to clinics.
  5. Connect the new number in the clinic as in step 9, with the same permanent token (the system user already has the Messaging account).
  6. Register it for sending. Meta sends only from a number registered for the Cloud API. Caremint reads this from Meta: a number that is not registered yet shows Register for sending under Reminders → WhatsApp, and sends from it fail with error 133010. As the owner or a clinic admin, choose Register for sending, type the 6-digit PIN and choose Register.
    • The PIN becomes the number's two-step verification PIN. Keep it safe: Meta asks for it if the number is moved. If the number already has a two-step verification PIN, enter that one. Caremint passes the PIN to Meta and does not keep it.
    • "Wrong PIN" means the number already has another PIN: use that one, or change it in WhatsApp Manager → Phone numbers → Two-step verification.
    • "Too many tries. Try again in N minutes." means Meta blocks new tries for a while (it allows 10 registrations in 72 hours). Any other refusal shows Meta's own text.
    You can also register the number without Caremint, with the same PIN rules, through the Graph API:
    curl -X POST "https://graph.facebook.com/v27.0/PHONE_NUMBER_ID/register" \
      -H "Authorization: Bearer YOUR_PERMANENT_TOKEN" -H "Content-Type: application/json" \
      -d '{"messaging_product":"whatsapp","pin":"123456"}'
    Caremint reads the new state with its next daily refresh of the number.

Messaging limits

Meta limits how many different people a business can start conversations with in a moving 24 hours, counted for the whole business portfolio (all its numbers share it). New portfolios start at 250 people a day; business verification, or 2,000 delivered messages within 30 days with good quality, raises it to 2,000, and Meta then raises it further by itself (10,000, 100,000, unlimited) when quality is high and at least half of the limit was used in the last 7 days. A clinic with 250 or fewer visits a day stays inside the first limit. The WhatsApp tab shows each number's quality rating and its daily limit.

9Embedded Signup for clinics

With Embedded Signup, a clinic connects its own WhatsApp number in a few clicks: Reminders → WhatsApp → Connect a WhatsApp number → Quick sign-up opens Meta's own window, where the clinic chooses or creates its business portfolio, Messaging account and phone number. Meta then returns a short-lived code and the account and number IDs; Caremint exchanges the code server to server for a business token, subscribes your app to the clinic's account webhooks, registers the number with a new random two-step PIN, reads the number's details, saves the token encrypted and sends the reminder templates for review.

Meta reviews this, not us

Quick sign-up only works once Meta has approved your business and your app as a Tech Provider. Meta reviews your business documents, your app and two screen recordings, and it can ask for changes. That can take from a few days to a few weeks, and Caremint cannot speed it up or guarantee the result. Until then, clinics connect with IDs and a token, and Quick sign-up says it is not set up on this platform yet.

What Meta asks for

  1. Business verification of your business portfolio (Business settings → Security center). Meta requires it before App Review.
  2. Complete app settings (App settings → Basic): app icon, category, contact email, a privacy policy URL and a terms of service URL. You can use Caremint's own legal pages, for example https://clinic.example.com/legal/privacy and /legal/terms, once you have written them in Super-admin → Settings → Legal pages.
  3. Tech Provider onboarding. In the App Dashboard open Use cases, choose Customize on the WhatsApp use case and open Tech Provider onboarding. Accept the terms there.
  4. App Review for advanced access to whatsapp_business_messaging (send messages for your clinics) and whatsapp_business_management (manage their accounts and templates). Meta asks for two screen recordings:
    • a message sent from your app and received in WhatsApp: record a booking in Caremint, with the phone showing the confirmation arrive;
    • your app creating a message template: record a clinic connecting a number and Templates at Meta showing the templates sent for review.
  5. Access verification if Meta asks for it after App Review (Meta checks that you really act for other businesses).
  6. An Embedded Signup configuration. Add the Facebook Login for Business product to your app, open Configurations → Create configuration, choose the login variation WhatsApp Embedded Signup and Embedded Signup version 4, add the WhatsApp asset and the two permissions above, and save. Copy the Configuration ID. Versions 2 and 3 were retired by Meta on 15 October 2026, so use version 4.
  7. Login settings. In Facebook Login for Business → Settings, turn on Login with the JavaScript SDK and add your domain (for example clinic.example.com) to Allowed domains for the JavaScript SDK and your APP_URL to Valid OAuth redirect URIs.
  8. In Caremint, paste the Configuration ID into Super-admin → Settings → Meta app (or META_CONFIG_ID in .env). Once the app ID, the app secret and the configuration ID are all set, every clinic can use Quick sign-up.

Limits and billing

  • Meta lets a Tech Provider onboard 10 new customer accounts in a rolling 7 days until business verification, App Review and access verification are all done, then 200.
  • Each clinic adds a payment method to its own Messaging account in Meta; Meta bills the clinic for its reminders. See Extra costs you pay.
  • The webhooks of every number connected this way reach your platform app's webhook (chapter 8, step 8), so nothing else has to be set up per clinic.

Meta's own guides: Embedded Signup overview and the Tech Provider get-started guide, both on Meta's developer site.

10WhatsApp rules Caremint follows

Meta's rules for the WhatsApp Business Platform protect the people who receive messages. Caremint builds them in, so clinics stay within them without having to know them by heart. They still apply to you and your clinics: read Meta's WhatsApp Business Messaging Policy and make your own terms of service point to it.

Utility templates only, approved by Meta

Every message Caremint starts is an approved template. When a clinic connects a number, Caremint sends its own templates to that clinic's WhatsApp account for review, in English (en_US): booking_confirmed, appointment_reminder, appointment_soon, missed_visit, visit_documents, repeat_due, feedback_request, payment_link and waitlist_offer (all utility) and login_code (authentication, for the patient portal). Caremint sends no marketing templates. Meta usually reviews a template within minutes and at most 24 hours, and may pause or turn off a template with poor quality; Reminders → WhatsApp → Templates at Meta shows each status and Meta's reason for a rejection, with Send for review again. A message whose template is not approved goes by email instead, where the rule allows it.

The 24-hour customer service window

A free-form message (for example a reply to a patient from their record) may only be sent within 24 hours of the patient's last message. After that the server refuses it (window_closed), and the reply goes by email or the next reminder starts the conversation again.

Consent

  • Each patient record holds the patient's consent for WhatsApp, email and marketing, with the date it last changed. Caremint sends WhatsApp only to patients who agreed to it, and email only to patients who agreed to email.
  • A patient who replies STOP (or UNSUBSCRIBE) gets a short confirmation and no more WhatsApp from that clinic; their record shows WhatsApp turned off. A patient can also stop messages inside WhatsApp itself; Meta tells Caremint (the user_preferences webhook) and the record follows.
  • The booking page asks patients whether they want their confirmation and a reminder on WhatsApp, and the clinic records consent given at the desk on the patient's record. Clinics should keep their own proof of consent as their local law asks.

Patients' answers act on the calendar

Reminder templates carry quick-reply buttons: Confirm marks the appointment confirmed, Reschedule sends the patient their link to pick a new time and tells the front desk, and I can't come cancels it and offers the time to the waiting list. Anything else the patient writes appears under Reminders → Message log for the front desk to answer.

Usernames and business-scoped user IDs

Since 2026 WhatsApp users can have a username and hide their phone number. Meta then identifies them to each business with a business-scoped user ID. Caremint matches an answer to its patient by this ID or by the phone number, and keeps the ID on the patient's record once Meta sends it.

Quality rating and messaging limits

Meta rates each number High, Medium or Low from how people react (blocks, reports, reads), and limits how many people a portfolio can reach in 24 hours (chapter 8). The WhatsApp tab shows both. Reminders that patients asked for rarely hurt quality; never use a clinic's number for anything else.

Official API only

Caremint never logs in to WhatsApp Web, never scans QR codes and never "warms up" numbers. Those tools break WhatsApp's terms and get numbers banned. Every message goes through Meta's Cloud API with the clinic's own number.

11Plans and billing for clinics (Stripe)

You sell plans to clinics. Caremint works with your own Stripe account: Stripe Checkout for new subscriptions, Stripe's customer portal for card changes and cancellations, and signed webhooks that switch plans on and off. (Patients pay the clinic, not you: that is chapter 12.)

Stripe's fees

Stripe is a third-party payment service with its own pricing, and you pay its fees: in the USA 2.9% + 30¢ per successful card payment plus 0.7% of subscription volume for Stripe Billing. Other countries, cards and currencies have their own rates on Stripe's pricing page.

1. Plans

Super-admin → Plans. Each plan has a name, a description, a monthly price and an optional yearly price, the currency, a free trial (days), a list of features shown on the pricing page, whether it is public, whether it is the default plan new clinics get, and an optional "Most popular" badge. Its limits are enforced on the server:

LimitWhat happens when it is reached
Doctors (people who see patients)Adding another one is refused with an upgrade prompt.
BranchesAdding another branch is refused.
Appointments a monthBooking keeps working, so no patient is turned away; the owner gets a banner and an email at 80% and 100%.
WhatsApp reminders a monthPast the limit, reminders go by email until the next month or an upgrade.
AI note drafts a monthThe writing helper pauses; doctors still write and save notes.
File storageAn upload past the limit is refused.
Online paymentsWhether the clinic may take deposits and pay links online (chapter 12).

An empty limit means unlimited. Archiving a plan hides it from new clinics; existing subscribers keep it. The install wizard's sample plans (a year costs ten months; each has a 14-day free trial; edit them freely):

PlanMonth / yearDoctorsBranchesAppointments a monthWhatsApp reminders a monthAI note drafts a monthStorage
Solo (default)$29 / $29011400400502 GB
Practice (most popular)$79 / $790522,5002,50030020 GB
Group$199 / $1,990201012,00012,0001,500100 GB
Enterprise$399 / $3,990No limits, priority support

Free trials

A new clinic on a paid plan gets that plan's trial days. When the trial runs out, or a paid plan is cancelled and its period ends, the clinic turns read-only: everything can still be read, and Settings → Plan and billing still works, but nothing new can be booked, written or sent. A banner says so and the owner gets one email a day until a plan is picked. Checkout lifts it at once, and Stripe is told how many trial days are left.

2. Stripe keys

  1. In the Stripe Dashboard, switch to Test mode first. Under Developers → API keys, copy the Secret key (sk_test_…) and the Publishable key.
  2. Paste them into Super-admin → Settings → Stripe (or STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY in .env).

3. Prices

  1. In Stripe, open Product catalog → Add product for each paid plan, with a recurring monthly price and, if you sell yearly, a recurring yearly price.
  2. Copy each price's ID (price_…) into the plan in Super-admin → Plans. Press Check price: Caremint reads the price from Stripe and shows its amount and interval, so a wrong ID is caught before a clinic sees it.

4. The webhook

  1. In Stripe, open Developers → Webhooks → Add endpoint with the URL https://clinic.example.com/api/v1/webhooks/stripe.
  2. Select these events: checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.paid, invoice.payment_succeeded, invoice.payment_failed, charge.refunded, charge.dispute.created and charge.dispute.closed.
  3. Copy the endpoint's Signing secret (whsec_…) into Super-admin → Settings → Stripe (or STRIPE_WEBHOOK_SECRET). Without it, paid plans would never switch on, and the setup check says so.

5. The customer portal

In Stripe, open Settings → Billing → Customer portal and activate it, with payment method updates, invoice history and cancellation turned on. Clinic owners reach it from Settings → Plan and billing → Manage in Stripe.

6. Go live

Test a full upgrade with Stripe's test card 4242 4242 4242 4242, then repeat steps 2 to 4 in live mode with your live keys and live price IDs.

Test checkout without Stripe

DEMO_PAYMENTS="true" in .env turns on a test checkout that switches plans without any card, and lets clinics try patient pay links with test cards. It is "false" in the shipped file. It only works while no Stripe secret key is set: once you add one, plan changes go to Stripe Checkout. Keep it off on a live site.

How payments stay right

Plans switch on only from Stripe's signed webhooks. Each Stripe event is applied once, in the same database transaction as its changes, so Stripe's retries never double anything. Payments and subscriptions are never deleted with a clinic: a clinic with money records is soft-deleted, so refunds and chargebacks still find their invoices.

Licence

Charging clinics through Caremint (selling plans or subscriptions) requires the Envato Extended Licence. The Regular Licence covers a single product whose end users are not charged.

Super-admin → Plans: prices, Stripe price IDs and limits for each plan
Super-admin → Plans: prices, Stripe price IDs and limits for each plan

When a card payment fails

  • While Stripe retries the card (on the retry schedule in your Stripe billing settings), the clinic is past due, not suspended: it keeps working and still counts in the monthly recurring revenue, the owner gets a "payment failed" email, and the failed payment shows under needs attention in the super-admin.
  • After Stripe's last retry (the final invoice fails, or Stripe marks the subscription unpaid), the subscription is unpaid and the clinic suspended with the reason "Payment failed: the card was declined on every retry.". The owner gets an email. The clinic's records stay; an unpaid subscription leaves the monthly recurring revenue and counts as lost revenue that month.
  • When the clinic pays (Stripe's invoice.paid), the subscription and the clinic are both active again. This lifts only the suspension for non-payment: one a super-admin set stays until a super-admin lifts it.

12Patient payments (each clinic's own Stripe)

Patients pay deposits and bills straight into the clinic's own Stripe account. You never hold the clinic's money, and each clinic sees its payments in its own Stripe Dashboard. The clinic's plan must allow online payments (chapter 11).

  1. The clinic's owner or admin opens Settings → Payments and copies the Webhook address shown there (https://clinic.example.com/api/v1/webhooks/stripe/clinics/<clinic id>).
  2. In the clinic's Stripe Dashboard, Developers → Webhooks → Add endpoint with that address and the events checkout.session.completed, checkout.session.async_payment_succeeded and checkout.session.async_payment_failed. Copy its Signing secret (whsec_…).
  3. Under Developers → API keys, copy the Secret key (sk_live_…, or sk_test_… to try it first) and, if you like, the Publishable key.
  4. Back in Settings → Payments, paste the secret key and the webhook signing secret and press Connect Stripe. Caremint checks the key with Stripe and shows the account's name.
The webhook secret is required

Caremint records an online payment only when the clinic's signed Stripe webhook confirms it. Until the signing secret is saved, pay links and booking deposits stay off and the page says Webhook missing, so no patient can pay for something Caremint would never record.

What patients can pay online

  • Deposits on the booking page, for services that ask for one (Online booking → Deposits). The time is held while the patient pays; an unpaid hold is released by itself.
  • Bills: Billing → an invoice → Send payment link. The link (/pay/<token>) lasts 7 days and opens a fresh Stripe Checkout page each time. It can go by WhatsApp (the payment_link template) or email, and the patient portal shows a Pay button for every open bill.
  • Refunds of online payments go back through the clinic's Stripe account (Billing → the payment → Refund). Desk payments (cash, card machine, bank, insurance) are recorded by hand.
Stripe's fees for clinics

Stripe charges the clinic its own fees on each patient payment (in the USA 2.9% + 30¢ per card payment). Caremint adds nothing.

A clinic's Settings → Payments: its own Stripe account and the webhook address
A clinic's Settings → Payments: its own Stripe account and the webhook address

13Email (SMTP)

Caremint sends two kinds of email through one SMTP account: messages to patients (reminders that go by email, booking confirmations, documents, pay links and portal sign-in codes, sent with the clinic's name), and platform emails (password resets, team invites and notices: a payment failed, a plan limit was reached, a clinic was suspended, a trial ended, support asks for access). Each notice goes out at most once per event, never from demo clinics.

  1. Get SMTP details from any email provider (Amazon SES, Postmark, Brevo, Mailgun, your own mail server…): host, port, username, password and a sender address on a domain you have verified with that provider.
  2. Enter them in Super-admin → Settings → Email (or the SMTP_* keys in .env). Use starttls on port 587, tls on port 465.
  3. Press Send test email in Super-admin → Setup check.

Without SMTP, each email is written to the app's log with its link (docker compose logs app), which is enough for testing. The wording of every platform email is editable in Super-admin → Settings → Email; each clinic edits the wording of its own reminder emails under Reminders → Rules.

Email costs

Email providers are third-party services with their own pricing, and you pay them: Amazon SES, for example, charges $0.10 per 1,000 emails, and most other providers sell monthly plans with a small free tier.

Patient data in email

Reminder emails name the clinic, the doctor, the time and the service. If your clinics' law treats that as health data, choose a provider that signs the agreement your law asks for (for example a business associate agreement under HIPAA), and let clinics name services neutrally (chapter 32).

14Writing help for visit notes (AI)

On a visit, the doctor chooses Write from bullet points, types short notes and presses Write the draft: the AI turns them into the four note parts for the doctor to check, change and then use. It uses the provider you choose, with your own key, for every clinic. Without a key it is off and hidden.

  1. Create an API key at OpenAI, Anthropic or Google AI Studio, and add a payment method there.
  2. In Super-admin → Settings → AI providers, pick the provider, paste the key and, if you like, change the model (defaults: gpt-5-mini, claude-sonnet-5-5, gemini-2.5-flash). The same values can go in .env (AI_PROVIDER, OPENAI_API_KEY and so on). Off turns the helper off for everyone.
  3. Set each plan's AI note drafts a month in Super-admin → Plans.
  4. Press Test on the AI row of the setup check.

What the helper does and doesn't do

  • It only rewrites the doctor's own bullet points into subjective, objective, assessment and plan, spelling out shorthand. It is told never to add a finding, a diagnosis or a medicine that is not in the bullet points.
  • Nothing is saved until the doctor chooses Use these notes, and the notes stay a draft until the doctor signs them.
  • A draft counts against the clinic's plan only when the AI provider wrote it; if the provider declines or can't be reached, nothing is counted.
Patient data goes to the provider

The bullet points the doctor types are sent to the AI provider you pick. Check its data terms before you turn the helper on, for example whether it signs a business associate agreement under HIPAA or a data processing agreement under GDPR, and whether it keeps or trains on the text. Tell your clinics which provider you use.

AI provider costs

OpenAI, Anthropic and Google are third-party services with their own pricing, and they bill you, the buyer, for every draft: roughly 0.1 to 1¢ per draft with the default models, as the chapter Extra costs you pay explains. Your plans' AI note drafts cap that spend for each clinic.

Super-admin → Settings → AI providers: which AI writes the drafts, keys and models, and drafts per plan
Super-admin → Settings → AI providers: which AI writes the drafts, keys and models, and drafts per plan

15Video visits

A service marked as a video visit gives each appointment its own Jitsi Meet room. The patient opens it from their booking link or the reminder: a waiting room checks the camera, the microphone and the sound first, then opens the call. The doctor joins from the appointment. A doctor can instead have their own fixed meeting link (Zoom, Google Meet or Jitsi) for all their video visits: Staff and hours → the doctor → Own meeting link.

  • Default: the free public server https://meet.jit.si. On it, the first person in a room may be asked to sign in with Google, GitHub or Facebook.
  • Your own Jitsi server (free and open source) or a hosted one such as 8x8 JaaS avoids that sign-in and keeps the calls on servers you choose. Set its address in VIDEO_BASE_URL (for example https://meet.example.com) and restart the app.

Caremint does not record calls and stores nothing from them. The video and sound go between the browsers and the Jitsi server; check that server's terms if your clinics' law has rules for video consultations.

16File storage

Patient documents (uploaded by the clinic or shared with the patient), CSV imports, clinic logos and doctors' signatures are stored in an S3-compatible bucket. The Docker stack includes MinIO with a private bucket on the same server, so this works out of the box.

  • Another bucket (AWS S3, Cloudflare R2, Backblaze B2, Wasabi, DigitalOcean Spaces…): set S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY in .env, or enter them in Super-admin → Settings → Storage. Keep the bucket private, and choose its region with the same care as the server's.
  • A local folder: STORAGE_DRIVER=local keeps files in the app-storage Docker volume. Fine for one server.

Files are never public: the app serves each one only to signed-in staff of its clinic, or to the patient it was shared with in the portal. Uploads are checked by their content, not their name: images (JPEG, PNG, WebP up to 5 MB), audio and video (up to 16 MB) and documents (PDF, Word, Excel, PowerPoint, text and CSV up to 100 MB). Each plan has a storage limit, and Super-admin → Settings → Storage shows how much space is used.

Storage costs

The bundled MinIO and the server's own disk cost nothing extra. Outside storage providers are third-party services with their own pricing, and you pay them for space and sometimes for downloads: Cloudflare R2, for example, charges $0.015 per GB a month after the first 10 GB, with no download fees.

Part 03

The clinic (your customers)

Each of your customers works in their own clinic: its staff, patients, calendar, records, money and settings, kept apart from every other clinic. A person can belong to several clinics and switch between them from the clinic menu. What each person sees depends on their role (chapter 17).

17Overview and roles

The overview

The first page after signing in is the clinic's day: its numbers (today's appointments, tomorrow confirmed, revenue today, notes to sign, the no-show rate), now and next, tomorrow's confirmations, the waiting room, who is working, what needs attention (unsigned notes, patients' messages to answer, unpaid bills, plan limits) and quick actions. It updates live as the day goes on. A doctor sees their own day first; the front desk sees arrivals and payments first. A new clinic sees a first-day checklist: services, staff, opening hours, WhatsApp, payments, the first patient and the first booking.

The overview: the day's numbers, now and next, the waiting room and what needs attention
The overview: the day's numbers, now and next, the waiting room and what needs attention

Roles

Every person has one of four roles: Owner, Clinic admin, Doctor or Receptionist. Separately, a person can see patients: they then get a column in the calendar and count towards the plan's doctors (an owner who is also a doctor turns this on for themselves). What each role may do is checked by the server on every request; the screens only hide what a role cannot use.

PermissionOwnerClinic adminDoctorReceptionist
See the calendar and book appointmentsYesYesYesYes
Open visit notes and prescriptionsYesNo*YesNo*
Write and sign visit notesOnly people who see patients
Take payments and make invoicesYesYes*No*Yes*
See reports and revenueYesYes*No*No*
Change settings and staffYesYes*NoNo
Change the plan and delete patientsYesNoNoNo

* The owner can switch these for the clinic under Staff and hours → Edit roles; the rest are fixed for safety. A person who opens a page their role can't use sees what it is and can ask the owner for access in one tap.

18Calendar and appointments

  • Day view with a column per person who sees patients, or one doctor's week. Working hours are white, the rest shaded, blocked time hatched; appointments are coloured by where they are in the day.
  • Book: click an empty slot, or New appointment: find the patient (or add them in one line), pick the service, doctor, room, date and one of the doctor's free times, a reason, and whether WhatsApp confirms it now.
  • No double booking. The database itself refuses two appointments for the same doctor at the same time (for services that don't allow overlaps), so two people booking at once can never both win. The one who lost sees the nearest free times.
  • Drag an appointment to move it, and choose whether the patient is told of the new time by WhatsApp or email.
  • The day's steps: confirm, check in (the waiting room counts the minutes), start the visit, finish; or no-show. The appointment sheet shows the patient (age, phone, allergies, balance), the reminder and the patient's reply, the history and the next step.
  • Walk-ins join the doctor's queue without holding a time.
  • Block time for one doctor (an admin hour) or everyone (a staff meeting), and leave under Staff and hours.
  • Waiting list: patients who want an earlier time. When a time is cancelled, it is offered on WhatsApp to the first person on the list it fits (doctor, service, dates); if they turn it down, the next one gets the offer.
  • Appointments (the list): today, coming up, not confirmed and cancelled this month, with filters, search, CSV export and the same actions.
One doctor's week
One doctor's week
An appointment: the patient, the reminder and their reply, and the next step
An appointment: the patient, the reminder and their reply, and the next step

19Patients

  • The list: all, seen this year, owes money and archived, with doctor and tag filters and a search by name, phone or patient number.
  • Add a patient: name, birth date, sex, mobile for WhatsApp, email, what they agreed to be sent (WhatsApp, email, marketing), main doctor, allergies (or "None known"), insurance and a parent for a child. A likely duplicate is shown with a link to the existing record.
  • The record: the next appointment, visits, the last blood pressure and the balance on top; visits, the medicines they take now and documents; the health summary (allergies, conditions), contact details, consent and staff notes. Opening a record is written to the audit log.
  • Documents: upload files to the record (chapter 16) and share chosen ones with the patient's portal.
  • Import: upload a CSV, match its columns, check every row (nothing is saved yet), then import in the background with live progress. Rows that need a fix can be downloaded; a whole import can be undone for 24 hours.
  • Export: every patient as CSV (people who may change settings). The export is written to the audit log.
  • Archive hides a patient and keeps everything. Delete (the owner only) removes the record 30 days later; until then it can be restored.
Patients with tags, balance and filters
Patients with tags, balance and filters
Import a CSV: match each column, then check every row before anything is saved
Import a CSV: match each column, then check every row before anything is saved

20Visits and notes

  • Start visit (from the overview, the calendar, the list or the record) opens the visit: vitals on top (with a warning when blood pressure was up on the last two visits), the notes in four parts (subjective, objective, assessment, plan), and the diagnoses.
  • Diagnoses: search a bundled list of common ICD-10-CM codes (published by the US National Center for Health Statistics, public domain) or type free text.
  • Writing help (when the platform turned it on, chapter 14): Write from bullet points turns the doctor's short notes into a draft to check; nothing is saved until Use these notes.
  • On the right: the patient at a glance, this visit's prescriptions, the follow-up (with the first free time to book) and the bill.
  • Notes save on their own as a draft. Finish visit signs them and sends the bill to the front desk. A signed visit is locked: later changes are dated notes (addenda) added below it, with who wrote them.
  • Visits (the list): today's visits, every draft still to sign and every signed visit, with filters, search and CSV export.
A visit: vitals, notes, ICD-10 diagnoses, prescriptions and the bill
A visit: vitals, notes, ICD-10 diagnoses, prescriptions and the bill
Writing help: bullet points in, a draft to check, nothing saved until Use these notes
Writing help: bullet points in, a draft to check, nothing saved until Use these notes

21Prescriptions

  • New prescription (from a visit or the list): the patient's allergies on top, then one block per medicine (name, dose, how often, for how long, quantity, refills and a note for the label). Saving shows any allergy warning and opens the preview.
  • Sign (people who see patients) prints the doctor's name, registration number and signature (uploaded in Your profile) on the clinic's letterhead, with a check code.
  • Print, Download PDF or Send it to the patient by WhatsApp and email. A signed prescription can be voided, and a doctor can stop one medicine on it later.
  • The check: a pharmacy opens /rx and types the code from the paper. It shows whether the prescription is real and still valid, the clinic, the doctor, the patient's initials and the medicines, and nothing else about the patient.
  • Repeats: the list shows the repeats due in the next 30 days, and the repeat-prescription reminder (chapter 23) asks the patient to book.
A signed prescription on the clinic's letterhead, with the doctor's signature and the check code
A signed prescription on the clinic's letterhead, with the doctor's signature and the check code

22Billing (patients' invoices and payments)

  • This month at a glance: money taken, unpaid, paid online and refunds; then every invoice (all, unpaid, paid, refunded) with filters, search and CSV export.
  • Invoices are made from the visit (the lines the doctor and the front desk add) or on their own (New invoice): lines from the price list or typed in, a discount, the clinic's tax (Settings → Letterhead and documents) and a note. Totals are always worked out on the server.
  • Payments: at the desk (cash, card machine, bank transfer or insurance; part payments add up), or online with a payment link by WhatsApp or email (chapter 12). A deposit paid when booking is taken off the visit's invoice. A finished visit with nothing to pay gets no bill.
  • Refunds: online payments go back through Stripe; desk refunds are recorded.
  • PDFs of every invoice and receipt on the clinic's letterhead; Send the receipt by WhatsApp and email.
An invoice paid by link, with its history and the card payment's details
An invoice paid by link, with its history and the card payment's details

23Reminders and WhatsApp

Reminders has three tabs: Rules, Message log and WhatsApp. The top of Rules shows what reminders did this month: sent, confirmed, rescheduled by patients and the no-show rate.

The rules every clinic starts with

RuleWhenHowOn at first
Booking confirmationAs soon as a visit is booked or movedWhatsApp, else emailYes
Reminder the day before09:00 the day before (Confirm, Reschedule, I can't come)WhatsApp, else emailYes
Visit starts soon2 hours before, with directionsWhatsAppYes
We missed you1 hour after a no-show, with a link to book againWhatsApp, else emailYes
Receipt and documentsWhen the visit is finishedWhatsApp and emailYes
Prescription can be renewed09:00, shortly before a medicine runs outWhatsApp, else emailYes
How was your visit?10:00 the day afterWhatsApp, else emailNo

Each rule can be turned on or off, and its time, channel and email words changed. Times are the clinic's own time zone. Each message is sent once, never twice, and only to patients who agreed to that channel (chapter 10). "WhatsApp, else email" uses email when the patient has no WhatsApp, the template is not approved yet, the plan's WhatsApp reminders for the month are used up, or WhatsApp fails.

Message log

Every WhatsApp and email the clinic sent and every message patients wrote: all, replies and failed, for the last 7, 30 or 90 days. Each row says how far it got (sent, delivered, read, failed, and the email sent instead) and what the patient answered. Replies that need a person are counted on the overview until the front desk answers them. Messages are kept for 12 months.

WhatsApp

The clinic's number (name shown, quality, daily limit), Connect a WhatsApp number (chapters 8 and 9), Register for sending when Meta needs it, and Templates at Meta with each template's review state.

The message log: delivery ticks, patients' answers and the email sent instead
The message log: delivery ticks, patients' answers and the email sent instead
The clinic's WhatsApp number and its templates at Meta
The clinic's WhatsApp number and its templates at Meta

24Online booking

Each clinic has its own booking page at https://clinic.example.com/book/<clinic> (the address is set under Online booking). Online booking sets its rules:

  • Patients can book online on or off. When it is off, the page shows the clinic's phone number instead.
  • Earliest booking and furthest ahead, free cancelling until (how long before the visit a patient can still move or cancel online), and when times start (every 15 minutes, 30 minutes…).
  • Deposits for the services that ask for one (chapter 12), and whether a reason for the visit is required.
  • Who patients can book, with each person's next free time and a switch, and which services (Services and rooms).
  • Book a visit button for the clinic's own website: one line of code to paste, with the clinic's colour.
  • A live preview of the page, and how many visits patients booked online this month.
Online booking: the rules, who patients can book, the website button and a live preview
Online booking: the rules, who patients can book, the website button and a live preview

25Staff, services and rooms

Staff and hours

  • Everyone and the invites waiting, with role, speciality, working hours, bookings this week and leave.
  • Invite a person by email: name, role, whether they see patients, title, speciality and the day they start. They set their own password from the email.
  • A person's sheet: working hours (split shifts allowed), leave (with how many patients are booked then and a way to move them), the services they offer, whether patients can book them online, the usual room, their title, speciality and registration number for prescriptions, and their own video meeting link.
  • What each role can do, and Edit roles for the owner (chapter 17).

Services and rooms

  • Services: name and a line for the booking page, length, price, deposit, who offers it, whether it is a video visit, whether patients can book it online, and its calendar colour.
  • Rooms in each branch, with what is on in each now (in a visit, free until the next booking). One room can be the video room for telehealth visits.
  • Branches (Settings → Clinic): each with its address and rooms; the plan sets how many.
Staff and hours: roles, working hours, bookings this week and what each role can do
Staff and hours: roles, working hours, bookings this week and what each role can do

26Reports

For a period and one doctor or all: appointments, the no-show rate, money taken and new patients, each against the period before; appointments and no-shows over time (with the weeks before WhatsApp reminders shaded), what each doctor and service billed, and where bookings came from (the online booking page, the front desk, a phone call, a visit, a walk-in, or the patient moving their own booking). The days export as CSV. A change against the period before shows only when the clinic has records for the whole earlier period.

Reports: appointments, no-shows, money taken and new patients against the period before
Reports: appointments, no-shows, money taken and new patients against the period before

27Clinic settings

SectionWhat it sets
ClinicLogo, name, short name, address and contact details, time zone, currency and country, the clinic colour (one colour for the app, the booking page and the letterhead) and the branches.
Opening hoursThe clinic's week (split shifts and closed days, holidays) and what patients read before a visit (come early, how to find the clinic, a map link). The booking page offers times only inside these hours.
Letterhead and documentsWhat tops every invoice, receipt and prescription (the logo, an extra line such as a licence number), the footer, the note under invoices and the tax, with a preview.
PaymentsThe clinic's own Stripe account (chapter 12).
WhatsApp and emailA summary of the number, the rules that are on and what went out this month; managed under Reminders.
Privacy and dataHow records are kept (who may open them, signed notes, keeping, export and delete), the sample patients a new clinic starts with (remove or bring back), support access requests (below), deleting the clinic (the owner, typing its name) and the latest audit rows.
Audit logWho opened or changed what, when and from which device, in plain words: search, filter by kind, CSV export.
Plan and billingThe owner only: the plan, this month's use of every limit, changing the plan (Stripe Checkout, monthly or yearly), Manage in Stripe, cancelling, and the invoices for the platform's plan.
Your profileEveryone: name and picture, password, notifications (email and browser, per event) and, for people who see patients, the signature their prescriptions print.

Support access

Patient records belong to the clinic. When you (the platform owner) need to look inside a clinic to help it, you ask from the clinic's sheet in the super-admin with a reason (chapter 29). The clinic's owner gets an email and a note in their bell, and decides under Privacy and data: Approve lets support open the clinic for 30 minutes; Refuse ends the request. Every look is in the audit log.

Privacy and data: how records are kept, support access and the audit log
Privacy and data: how records are kept, support access and the audit log
Part 04

Patients' pages

28Booking, payments, portal and video

Patients never sign up for anything. Their pages carry the clinic's own name, logo, address, phone and colour, so they see their clinic and not the software, and they work on any phone.

The booking page (/book/<clinic>)

  1. What for: the services the clinic offers online.
  2. Who and when: the first free doctor or one person, a week of days and that day's free times by part of the day, in the clinic's time. A full day offers the next day with a free time.
  3. Your details: who the visit is for, how to reach them, why they come, whether to send the confirmation and a reminder on WhatsApp, and the clinic's rules. If someone else took the time a moment before, the details stay and the nearest free times are offered.
  4. Booked: when, where, when to arrive, how to pay and until when it can be changed for free; add to calendar, directions, the change-or-cancel link and the portal. A deposit first goes to the payment page.

The Book a visit button (chapter 24) opens the same page from the clinic's own website.

Change or cancel (/manage/<link>)

The link in every confirmation and reminder: what and when, I'll be there, move it (the next days' free times with the same person; the old time is freed only when the move is confirmed) or cancel it. Past the free-change window it says to call the clinic.

Pay (/pay/<link>)

A bill or a deposit, paid on the clinic's own Stripe Checkout. The page waits for Stripe to confirm the payment, then shows it paid.

The patient portal (/portal/<clinic>)

The patient types their mobile or email and gets a 6-digit code (by WhatsApp when the clinic has an approved sign-in template and the patient agreed to WhatsApp, otherwise by email). A code works for 10 minutes and 5 tries; the page never says whether someone is a patient; no password. Inside: the next visit (directions, change or cancel, the video room), past visits with the doctor's summary, prescriptions as PDF, bills (receipt, or pay online) and the documents the clinic shared. A sign-in lasts 30 days on that device.

Video waiting room

For a video visit, the patient's link opens a waiting room: their own camera, a microphone level and a test sound, the connection, a countdown and Join (open from 10 minutes before the start), with what to do if the video drops. The call runs on Jitsi Meet or the doctor's own link (chapter 15).

Prescription check (/rx)

For pharmacies: the code from a prescription shows whether it is real and valid (chapter 21).

Picking a time
Picking a time
Booked
Booked
Paying a bill
Paying a bill
The video waiting room
The video waiting room
Part 05

Run the platform

29Super-admin

The super-admin is your side of the platform, under /platform. The install wizard makes you its first admin. Give a colleague the admin role (everything) or the viewer role (sees everything, changes nothing) in Users.

Overview

Monthly recurring revenue (a yearly plan counts as a twelfth), new and lost revenue this month, clinics (active, suspended), paying and trialing clinics (paying means an active subscription to a paid plan: trials and past-due subscriptions don't count), messages across all clinics, revenue by month or week, customers by plan, the newest clinics and a needs attention list (failed payments, numbers that need reconnecting, clinics at a limit).

Clinics

Every clinic with its owner, plan, size, revenue and the one status that matters most; filter by paying, free or suspended, plan and number status; export CSV. The detail sheet shows the owner, the subscription, money paid, this month's usage, the WhatsApp numbers, the members and the payments, and lets you:

  • Change the plan by hand (a manual grant: Stripe is not charged);
  • Suspend with a reason (the owner gets an email, the clinic turns read-only with a banner) or reactivate. A suspension for a failed payment lifts itself when the clinic pays; one you set stays until you lift it;
  • Delete: the clinic is soft-deleted, its Stripe subscription cancelled and its number tokens wiped, and its payment records are kept;
  • Ask for access, then Open as owner once the clinic's owner approves (chapter 27). You type why you need to look; the owner has 30 minutes from their approval. The borrowed session ends with the approval, shows a banner with an Exit button and is written to the clinic's audit log; inside it you cannot see tokens, keys or PINs, change the plan, delete the clinic or open the super-admin.

Users, plans, payments

  • Users: everyone who can sign in, across all clinics; platform staff and suspended people have their own tabs. Suspend a person (which signs them out everywhere) or make them staff. You cannot change your own role or suspend yourself.
  • Plans: chapter 11.
  • Payments and subscriptions: every payment (paid, failed, refunded) with this month's totals and why a payment failed, and every subscription with its status, interval and what ends or fails soon.

Settings

SectionWhat it sets
BrandingProduct name, logo, brand colour, support email, Documentation URL and Support URL (chapter 30).
Meta appApp ID, app secret, verify token, Embedded Signup configuration ID and Graph API version (chapters 8 and 9).
StripeSecret key, publishable key and webhook signing secret for the clinics' plans (chapter 11).
EmailSMTP server (chapter 13) and the wording of the seven platform emails, with placeholders such as the link and the clinic's name.
AI providersWhich AI writes the note drafts (or Off), keys and models (chapter 14).
StorageBucket or local folder, with the space used (chapter 16).
Sign-upsOpen to everyone, by invite only, or closed; the plan new clinics get.
Legal pagesTerms of service, privacy policy and refund policy in Markdown, shown at /legal/terms, /legal/privacy and /legal/refunds and linked from the public pages. Write your own; they are your agreement with your clinics, and your privacy policy must say how you handle patient data.
MaintenanceMaintenance mode with your message (clinics see a maintenance page; super-admins keep working), the background job counts and the Remove demo data button.
Clinics with plan, owner, size and revenue
Clinics with plan, owner, size and revenue
A clinic's details: usage, numbers, payments, support access and actions
A clinic's details: usage, numbers, payments, support access and actions
Payments and subscriptions
Payments and subscriptions
Platform settings
Platform settings

30Rebrand

Super-admin → Settings → Branding changes the product name, the logo, the brand colour and the support email without touching code. They show in the sidebar, the sign-in and sign-up pages, the public landing and pricing pages, the platform emails and the browser tab. The logo must be a square PNG, SVG or WebP of at most 1 MB; SVG files with scripts are refused. Each clinic also has its own logo and colour (Settings → Clinic), which the patients' pages, the clinic's documents and the clinic's own screens use.

Help links

Caremint never links to an address of ours. Two fields in Branding decide where its help links go:

FieldWhere it showsWhen it is empty
Documentation URLThe address where you published this guide (docs/index.html from your download), for example https://help.example.com/docs. The super-admin menu shows Help and docs, and the install wizard and the Meta settings link straight to the right chapter.No docs link in the menu; the setup pages name the file and the chapter to read instead.
Support URLYour own help or contact page, for your clinics. Every clinic's menu shows Help and docs, which opens it.The link opens an email to the support email instead, or is hidden when that is empty too.

Both must be full addresses starting with https:// (or http://). Your clinics never see this guide: it is written for you, so the clinic's help link goes to your own support page.

To change the text of the public landing page, the pricing page wording or anything else beyond these settings, edit the React pages (chapter 36) and rebuild.

Search engines

Caremint answers /robots.txt itself: search engines may index the public pages (landing, pricing, legal pages, sign-in and sign-up) and the clinics' booking pages, while the clinics, the super-admin, the install wizard, invitations, password resets, the API and every patient link (changing a booking, paying, the portal, prescription checks) stay closed. With SEARCH_INDEXING=off in .env, for a staging copy, /robots.txt closes every page and every answer also carries X-Robots-Tag: noindex, nofollow. Restart the app after changing it (docker compose up -d).

31Demo mode and the seed commands

Demo mode

DEMO_MODE=true turns an install into a public demo, like the item's live preview. Never turn it on for a real platform. It is not in .env.example and is off unless you add it. With it on:

  • The sign-in page shows one-click sign-ins: the clinic's owner, a doctor, the front desk and a read-only super-admin, and the portal shows the demo patient's page in one click. They work inside the marketplace's preview frame too (the session cookie is then SameSite=None; Secure; Partitioned). One address can use them a limited number of times an hour; after that the page says how many minutes to wait.
  • The demo data is added on start: "Lakeside Family Clinic" (made up) with its team, patients, 24 weeks of history and two weeks ahead, visit notes, prescriptions, invoices and reminders, and other made-up clinics for the super-admin screens. Every name, phone number and email is invented (phone numbers use the 555 range).
  • The clinic's WhatsApp number is a simulated number that talks to Caremint's built-in WhatsApp simulator instead of Meta: reminders get sent, delivered and read receipts over a few seconds, and patients' taps are simulated.
  • Nothing outside is called: no AI provider (a rule-based writer drafts notes, free), plan changes and patient payments are test checkouts (card 4000 0000 0000 0002 is declined, to show what a patient sees), the install wizard is off, imports are off, and passwords, secrets, tokens and other risky settings are locked.
  • The demo data is removed and added again every night at 03:00 UTC.

Seed commands

CommandWhat it does
docker compose exec app caremint seed-demoAdds the demo data, every row marked as demo. It only adds rows and never deletes anything. It refuses to run on a database that has any real account, clinic, payment or subscription; --confirm adds the demo clinic next to real data anyway (for a staging copy).
docker compose exec app caremint reset-demoRemoves the demo rows and adds them again. It refuses to run when the database holds any real account, clinic, payment or subscription, with no way round it. Restart the app afterwards so its WhatsApp simulator loads the new numbers.
Super-admin → Settings → Maintenance → Remove demo dataDeletes only rows marked as demo. A demo clinic that has a real payment or subscription is kept.
docker compose exec app caremint migrateApplies the database migrations and stops (the server also does this on every start).

Real accounts, clinics, payments and subscriptions are never marked as demo, so no seed or reset command can touch them. Every new clinic also starts with a few sample patients marked as samples, so its screens are not empty; the owner removes them under Settings → Privacy and data.

The public demo's sign-in page with its one-click sign-ins
The public demo's sign-in page with its one-click sign-ins
Part 06

Privacy and security

32Health data and privacy

Clinics keep health records in Caremint, and many countries have strict laws for them (HIPAA in the USA, GDPR in Europe, and local health-data laws elsewhere). Caremint gives you and your clinics the controls those laws usually ask for. Whether a clinic complies depends on where and how you run it, the agreements you sign and the clinic's own practices, so Caremint makes no compliance claim. Get advice for the countries you sell in.

What Caremint does

  • Each clinic's records are kept apart from every other clinic's (chapter 33), and only the clinic's own staff can open them.
  • Roles decide who opens what: by default the front desk and clinic admins cannot open visit notes or prescriptions (chapter 17).
  • An audit log of every record opened, every change, every export and every support look, with who, when and from which device (Settings → Privacy and data → Audit log, exportable as CSV).
  • Signed notes are locked; later changes are dated addenda, so the record shows what was known when.
  • Support can't look without permission: you open a clinic only after its owner approves, for 30 minutes, logged (chapter 27).
  • Consent records for WhatsApp, email and marketing, and STOP honoured at once (chapter 10).
  • Export and delete: patients export as CSV; the owner deletes a patient, who is removed 30 days later.
  • Kept only as long as needed: the message log is cleared after 12 months, notifications after 90 days, stored webhook bodies and finished jobs after 14 days, and expired sessions and sign-in codes within the hour.
  • Secrets are encrypted in the database (chapter 33), and nothing is sent to an AI provider unless you turn the writing helper on.
  • No AI diagnosis and no medical advice (chapter 14).

What you and your clinics must do

  • Choose where the data lives. The server, its backups and the file storage hold the records; pick their country and provider to fit your clinics' law, and turn on disk encryption where the provider offers it. Caremint encrypts secrets, not every patient field; the database itself relies on your server's protection.
  • Sign the agreements the law asks for with the services that touch patient data: your server and storage host, your email provider (reminders name the doctor, the time and the service), your AI provider (if the writing helper is on) and your video service. Under HIPAA that is a business associate agreement; under GDPR a data processing agreement. Meta's WhatsApp terms apply to the reminders; check whether they are enough for your market.
  • Keep messages lean. Reminders carry the service's name. If a service's name would reveal something sensitive, name it neutrally (for example "Consultation" instead of a condition).
  • Write your legal pages (Super-admin → Settings → Legal pages): your terms with clinics, and a privacy policy that says what you store, where, for how long and who you share it with. Each clinic is responsible for its own notice to its patients.
  • Back up, and test the restore (chapter 39). Keep backups encrypted and as private as the live data.
  • Use strong sign-ins: long unique passwords for staff, and two-factor sign-in on your server, Meta, Stripe, email and storage accounts.
  • Deleting a clinic closes it at once and cancels its plan; its records stay in your database (and its payment records must stay for tax). To erase a closed clinic's records for good when it asks, remove them from the database yourself after it has its export.
Your responsibility

You run the platform, so you are the one who decides where it runs and which providers it uses. Caremint gives you the controls; how you use them decides whether your clinics can meet their law.

33Security notes

What the server checks and limits, so you can answer your clinics' questions and know what to keep safe.

Clinics are kept apart

  • The current clinic always comes from the signed-in session, never from the request. Every query is filtered by it, and links between a clinic's rows are composite database keys, so a row cannot point at another clinic's row even by mistake. Another clinic's id answers "not found".
  • Roles and permissions are checked by the server on every request; the screens only hide what a role cannot use.
  • The database refuses two appointments for one doctor at the same time, so no race can double-book.

Accounts and sessions

  • Passwords (at least 10 characters) are hashed with Argon2id. A password change or reset signs the person out on every other device.
  • The session cookie is HttpOnly, Secure on https and SameSite=Lax. A "keep me signed in" session is renewed while in use; any other ends with the browser session.
  • Every change made with the session cookie must carry the header x-caremint: 1, which browsers cannot add from another site, so other sites cannot make changes for a signed-in person.
  • Session tokens, password reset links, invites, portal sessions and sign-in codes are stored only as SHA-256 hashes.
  • WhatsApp tokens, app secrets, each clinic's Stripe keys and the secrets saved in the super-admin are encrypted with AES-256-GCM, with a key derived from APP_SECRET. Keep APP_SECRET and your backups safe, and never change it after the install.
  • Patients sign in to the portal with a 6-digit code (10 minutes, 5 tries) and never with a password; their booking and payment links carry long random tokens, and a pay link ends after 7 days.
  • "Open as owner" needs the clinic owner's approval, lasts at most 30 minutes, is audit-logged and cannot reveal secrets, change plans or reach the super-admin.

Webhooks

  • Meta: every WhatsApp webhook is checked against the X-Hub-Signature-256 signature over the raw body, with the app secret of the number's own app or your platform app; anything else is refused. Each delivery is stored once, so Meta's retries are never processed twice, and then handled by a background job.
  • Stripe: your platform webhook and each clinic's own webhook are checked against their signature and timestamp, each with its own secret, and every event is applied once.

Rate limits

These limits are kept in PostgreSQL, so they hold across restarts and several copies of the server. They are keyed by a keyed hash of the account or the visitor address (taken only from trusted proxies, chapter 5), never by a plain address:

LimitAllowedWhat it protects
Sign-in, per address20 per 15 minutesSign-in attempts from one address
Sign-in, per account5 per 15 minutesWrong passwords for one account; after five the account waits, even for the right password
Sign-up, per address5 per hourNew accounts from one address
Password reset, per address5 per hourPassword reset emails asked for from one address
Password reset, per account3 per hourPassword reset emails sent to one account
Reset and invite links, per address20 per hourTries at a reset or invite link from one address
Demo sign-in, per address60 per hourPublic demo sign-ins from one address
Online bookings, per address20 per hourOnline bookings from one address (the public booking page)
Invites, per clinic50 per hourInvites sent by one clinic

Every other API call takes from short-term allowances in memory: each signed-in person may make 240 calls at once and then 20 a second, and all calls from one visitor address together (counted only behind a trusted proxy) 1,200 at once and then 60 a second. Webhooks from Meta and Stripe are never limited. A refused call answers 429 with a Retry-After header.

Uploads and files

  • Uploads are checked by their content, not their name (chapter 16). The platform logo may be PNG, WebP or SVG; an SVG with scripts or event handlers is refused, and logos are served with a strict content policy.
  • Files are private: only signed-in staff of the clinic, or the patient a file was shared with, can open them.

Money

  • Plans switch on only from verified Stripe events; a clinic cannot give itself a plan. Patient payments count only from the clinic's signed Stripe webhook. Invoice totals are worked out on the server from the lines, never taken from the browser.
  • Plan limits and AI drafts are checked on the server and spent with one conditional database update, so parallel requests cannot go past them.
  • Payment and subscription records are never deleted with a clinic or a plan.
  • The demo seed and reset commands touch only rows marked as demo and refuse to run on a database with real data (chapter 31).

What loads from other servers

The web app loads nothing from other servers: its fonts and icons are part of the build. The exceptions are chosen by the person using them: Quick sign-up loads Meta's Facebook JavaScript SDK from connect.facebook.net; a video visit opens the Jitsi Meet server (or the doctor's own meeting link); and Stripe Checkout and the Stripe portal open on Stripe's own pages.

Keep it safe

  • Use https (chapter 5), long unique passwords and two-factor sign-in on your Meta, Stripe, email and server accounts.
  • Keep .env and your backups private; anyone with APP_SECRET and a backup can read the saved tokens and keys.
  • Install Caremint updates; security fixes are marked as such in the changelog.
Part 07

For developers

34Every key, explained

Every setting in .env. The outside-service keys can also be set in Super-admin → Settings, which takes precedence. This table is generated from .env.example and the server's own settings code when the release is built.

KeyRequiredWhat it does
Required
APP_URLYesThe public address of the app, without a trailing slash, for example https://clinic.example.com. Links in emails and WhatsApp messages, the patients' links, the webhook addresses and secure cookies come from it. Use https on a public server.
APP_SECRETYesA long random string of at least 32 characters (openssl rand -hex 32). It encrypts saved tokens and keys and keys the hashed visitor addresses of the rate limits. Never change it after the install: saved tokens could no longer be read.
POSTGRES_DBNoThe name of the database the stack creates. Default caremint.
POSTGRES_USERNoThe database user the stack creates. Default caremint.
POSTGRES_PASSWORDYesThe database password. Letters and digits only, because it goes into a connection address.
DATABASE_URLOutside DockerThe database address, only when you run the server without Docker. Leave it empty with Docker: the stack builds its own from the three keys above.
INSTALL_TOKENNoThe token the install wizard asks for. Empty: a new one is printed in the app's log on first start.
File storage (patient documents, imports, logos, signatures)
STORAGE_DRIVERNos3 (the bundled MinIO, AWS S3 or Cloudflare R2) or local (files in a Docker volume). Default in Docker s3.
S3_ENDPOINTWith s3The storage address. The bundled MinIO is http://minio:9000; for R2 use your account's S3 address; for AWS S3 leave it empty.
S3_REGIONNoThe bucket's region. Default us-east-1; R2 uses auto.
S3_BUCKETNoThe bucket name. Default caremint; the stack creates it in MinIO.
S3_ACCESS_KEY_IDWith s3The storage access key. With the bundled MinIO this is also its admin user.
S3_SECRET_ACCESS_KEYYesThe storage secret, at least 8 characters. With the bundled MinIO this is also its admin password, so Docker refuses to start without it.
WhatsApp (Meta WhatsApp Cloud API)
META_APP_IDFor Embedded SignupYour Meta app's ID (App Dashboard → App settings → Basic). Needed for Embedded Signup and the platform webhook (chapters 8 and 9).
META_APP_SECRETFor Embedded SignupYour Meta app's secret, from the same page. It checks the signature of every webhook Meta sends to your app.
META_CONFIG_IDFor Embedded SignupThe configuration ID of your Embedded Signup setup (Facebook Login for Business → Configurations).
META_VERIFY_TOKENFor the webhookAny random string. Paste the same value as the Verify token in the App Dashboard → Use cases → WhatsApp → Customize → Configure Webhooks (chapter 8, step 8).
META_GRAPH_VERSIONNoThe Graph API version Caremint calls. Empty: the version it was tested with (v27.0).
Payments (Stripe; empty = paid plans off)
STRIPE_SECRET_KEYFor paid plansYour own Stripe secret key, for selling plans to clinics (sk_live_…, or sk_test_… while testing). Empty: paid plans are off (chapter 11). Each clinic connects its own Stripe account for patient payments in the app (chapter 12).
STRIPE_WEBHOOK_SECRETFor paid plansThe signing secret of your Stripe webhook endpoint (whsec_…), chapter 11.
STRIPE_PUBLISHABLE_KEYNoYour Stripe publishable key (pk_…).
DEMO_PAYMENTSNo"true" turns on test checkouts without a card: plan changes while no Stripe secret key is set, and patient payments for clinics without their own Stripe. Keep "false" on a live site.
Email (SMTP; empty = emails are written to the app's log)
SMTP_HOSTFor emailYour email provider's SMTP server. Empty: emails are written to the app's log instead of being sent.
SMTP_PORTNoThe SMTP port. Default 587.
SMTP_USERNAMEFor emailThe SMTP user name.
SMTP_PASSWORDFor emailThe SMTP password or API key.
SMTP_SECURENostarttls (port 587, the default), tls (port 465) or none.
SMTP_FROMFor emailThe sender, for example Caremint <hello@example.com>. Use an address on a domain your provider has verified.
Writing help for visit notes (optional; builtin = no AI, no cost)
AI_PROVIDERNoopenai, anthropic, gemini or builtin (the default: the writing helper for visit notes is off, and nothing is sent to an AI provider). Chapter 14.
OPENAI_API_KEYWith openaiYour OpenAI API key.
OPENAI_MODELNoThe OpenAI model. Default gpt-5-mini.
ANTHROPIC_API_KEYWith anthropicYour Anthropic API key.
ANTHROPIC_MODELNoThe Anthropic model. Default claude-sonnet-5-5.
GEMINI_API_KEYWith geminiYour Google Gemini API key.
GEMINI_MODELNoThe Gemini model. Default gemini-2.5-flash.
Video visits
VIDEO_BASE_URLNoThe Jitsi Meet server for video visits, for example https://meet.example.com. Empty: the free public server https://meet.jit.si, where the first person in a room may be asked to sign in. Chapter 15.
Network
APP_PORTNoThe port on this server where the app answers. Default 8080.
APP_BINDNoWhich address the port is open on. Default 127.0.0.1: this server only, so visitors come in through Caddy or your own proxy. Use 0.0.0.0 only with TRUSTED_PROXY_HOPS=0 or a firewall that lets only your proxy reach the port.
APP_DOMAINWith CaddyThe domain Caddy gets an HTTPS certificate for: the host of APP_URL, for example clinic.example.com.
TRUSTED_PROXY_HOPSNoHow many reverse proxies in front of the app add the visitor's address to X-Forwarded-For. 1 = the bundled Caddy (the default in Docker); 0 = trust no proxy. Never set it higher than the proxies really in front of the app (chapter 5).
Advanced
COMPOSE_PROJECT_NAMENoOnly for a second copy on the same server (for example staging): give each copy its own name, so their containers, database, files, network, image and build cache stay apart. Empty = the name of the Caremint folder (chapter 5, Two copies on one server).
SEARCH_INDEXINGNoon (the default): search engines may index the public pages (landing, pricing, legal, sign-in and the clinics' booking pages), never the app, the API or a patient's own links. off, for a staging copy: /robots.txt closes every page and every answer carries X-Robots-Tag: noindex, nofollow.
JOB_WORKERSNoBackground job workers in this server, 1 to 32. Default 4.
RUST_LOGNoHow much the server logs: info (the default), warn or debug.
Set by Docker, or for development
ANTHROPIC_BASE_URLNoAnother address for the Anthropic API. Default https://api.anthropic.com.
ASSET_ARCHIVENoFor your own zero-downtime deploys: a folder that keeps older builds' files, so pages still open in a browser keep working.
BINDNoThe address the server listens on. Default 0.0.0.0: plus PORT.
BUILD_TARGETNoHow Docker gets the program: built (the default, built on this server) or prebuilt (uses prebuilt/caremint, built elsewhere; chapter 5).
DEMO_MODENoOnly for a public demo: true adds the sample clinics and one-click sign-ins, blocks everything that would reach the outside world and resets the data every night (chapter 31). Never on a live site.
DRAIN_SECSNoFor your own zero-downtime deploys: seconds a stopping server keeps answering while the health check reports it is stopping. Default 0.
GEMINI_BASE_URLNoAnother address for the Gemini API.
LOCAL_STORAGE_DIRSet by DockerThe folder for files with STORAGE_DRIVER=local (/app/storage in Docker, a volume).
META_GRAPH_URLNoFor tests only: another address for Meta's Graph API. Default https://graph.facebook.com.
OPENAI_BASE_URLNoAnother address for an OpenAI-compatible API. Default https://api.openai.com.
PORTSet by DockerThe port the server listens on inside its container (8080).
READY_FILENoFor your own zero-downtime deploys: the health check passes only once this file exists.
STRIPE_API_URLNoFor tests only: another address for Stripe's API.
WEB_DISTSet by DockerWhere the built web app is, when it is not packed into the program.

35File structure

caremint/
├── apps/
│   ├── backend/                 the Rust server (Axum): crate caremint-server, program "caremint"
│   │   ├── src/main.rs          the commands: serve, migrate, health, seed-demo, reset-demo, pack, export-assets
│   │   ├── src/lib.rs           the HTTP app: /api/health, /api/v1, the web app, middleware
│   │   ├── src/api/             one module per area: auth, clinic, calendar, patients, care (visits and
│   │   │                        prescriptions), money, messages, numbers, reports, overview, booking,
│   │   │                        portal, billing, media, events, admin, public (install, webhooks)
│   │   ├── src/appointments.rs  booking, the day's steps, moving and cancelling
│   │   ├── src/schedule.rs      working hours, leave, blocked time and free times
│   │   ├── src/care.rs          visits, signing, addenda, prescriptions and their PDF
│   │   ├── src/reminders.rs     the reminder rules, the waiting list and unpaid holds
│   │   ├── src/messaging.rs     WhatsApp and email to patients, and their answers
│   │   ├── src/invoices.rs      invoices, desk payments, deposits and refunds
│   │   ├── src/clinic_pay.rs    patient payments into each clinic's own Stripe
│   │   ├── src/billing.rs       the clinics' plans: Stripe checkout, portal and webhooks
│   │   ├── src/ai.rs            the writing helper for visit notes
│   │   ├── src/pdf.rs           the PDF writer for prescriptions, invoices and receipts
│   │   ├── src/jobs.rs          the background job queue (PostgreSQL, FOR UPDATE SKIP LOCKED)
│   │   ├── src/settings.rs      super-admin settings over .env
│   │   ├── src/setup_check.rs   the setup check rows and live tests
│   │   ├── src/demo.rs          sample plans, demo data and the nightly reset
│   │   ├── assets/              the demo clinic's logo and the demo doctors' signatures
│   │   ├── tests/               server tests (need a PostgreSQL, see chapter 36)
│   │   └── README.md            every module of the server, for developers
│   └── frontend/                the web app (React Router 7, Vite, Tailwind CSS 4)
│       ├── src/routes.ts        every page: URL → file
│       ├── src/pages/           clinic/, patient/ (booking, pay, portal), platform/ (super-admin),
│       │                        auth/, install/, public/
│       ├── src/components/ui/   shadcn/ui components
│       ├── src/ui/              tables, sheets, charts, toasts shared by the pages
│       ├── src/layout/          the app shell, sidebar and sign-in guard
│       ├── src/api/             the API client and types
│       ├── src/styles.css       colours, fonts and sizes (design tokens)
│       ├── e2e/                 browser tests (Playwright)
│       └── README.md            the web app's stack, scripts, folders and build
├── crates/wa/                   WhatsApp Cloud API library and simulator (crate caremint-wa, with a README)
├── migrations/                  the database schema (applied on start)
├── docker/                      Dockerfile, docker-compose.yml, Caddyfile
├── compose.yaml                 "docker compose up" from this folder
├── Cargo.toml, Cargo.lock       the Rust workspace
├── .env.example                 every setting
└── docs/                        this guide (HTML and PDF) and the third-party licences

36Customise and rebuild

Run it for development

  1. Start a PostgreSQL (for example docker compose up -d postgres, with ports: ["127.0.0.1:5432:5432"] added to the postgres service, or your own) and set DATABASE_URL in .env. For development set STORAGE_DRIVER=local.
  2. Start the server from apps/backend: cargo run (it reads .env from the folder or the ones above it and listens on port 8080).
  3. Start the web app from apps/frontend: pnpm install, then pnpm dev, and open http://localhost:5173. Calls to /api go to the server on port 8080 (API_ORIGIN changes that). Screens reload as you save.

Change the web app

  • apps/frontend/README.md explains the web app's stack, its scripts and folders, changing the brand and the production build.
  • Colours, fonts and sizes live in apps/frontend/src/styles.css as CSS variables (for example --brand). The brand colour set in Super-admin → Branding overrides --brand at run time, and each clinic's colour does the same inside that clinic.
  • Pages are in apps/frontend/src/pages/, one folder per area; src/routes.ts maps each URL to its file. The public landing and pricing pages are src/pages/public/Landing.tsx and Pricing.tsx.
  • Components are shadcn/ui (src/components/ui/) on the Base UI and Radix primitives, with Lucide icons.
  • Checks: pnpm typecheck, pnpm lint (Biome), pnpm test (Vitest) and pnpm e2e (Playwright).

Change the server

  • Each area of the API is one module in apps/backend/src/api/; its routes() function lists the addresses. The business rules (booking, reminders, money, limits) are in the modules named after them; apps/backend/README.md lists every module and what it does.
  • A database change is a new file in migrations/ named YYYYMMDDHHMMSS_what.sql. Never edit a migration that has already run: the server checks them.
  • Checks: cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace. The server tests need a PostgreSQL user that may create databases: TEST_DATABASE_URL=postgres://user:password@127.0.0.1:5432/postgres cargo test -p caremint-server --test api (each test gets a fresh database); without it they say so and pass. cargo deny check checks advisories and licences.

Worked example: add an API route

Say a clinic wants the number of a patient's visits that are still unsigned. In apps/backend/src/api/patients.rs, add the address to routes():

.route("/patients/{id}/unsigned-count", get(unsigned_count))

and the handler (add Care to the file's use crate::auth::{…} line). Taking Care makes it work only for staff who may open visit notes in the current clinic; the query filters by cx.id, so it can never read another clinic:

/// How many of a patient's visits are not signed yet.
async fn unsigned_count(
    State(state): State<AppState>,
    Care(cx): Care,
    Path(id): Path<Uuid>,
) -> ApiResult<Json<Value>> {
    let n: i64 = sqlx::query_scalar(
        "select count(*) from visits where clinic_id = $1 and patient_id = $2 and signed_at is null",
    )
    .bind(cx.id)
    .bind(id)
    .fetch_one(&state.db)
    .await?;
    Ok(Json(json!({ "unsigned": n })))
}

In the web app, call it with the shared client, which adds the session and the security header:

import { get } from "@/api/client";
const { unsigned } = await get<{ unsigned: number }>(`/patients/${patientId}/unsigned-count`);

Then rebuild (below). Add a test next to the others in apps/backend/tests/api/.

Rebuild and deploy your changes

docker compose up -d --build                    # or with --profile https on your server

Docker rebuilds only what changed, and a change to the web app alone reuses the compiled server. Keep your changes in a Git repository, so you can compare them with each new Caremint version.

37API reference

The web app uses the /api/v1 API below; you can call it from your own tools with a signed-in session. These 221 addresses are generated from the server code when the release is built.

  • JSON in and out with camelCase keys; times in ISO 8601 UTC; money in whole cents (…Cents).
  • Errors: {"error": {"code": "…", "message": "…", "details": {…}}}. Codes: bad_request (400); unauthorized (401); plan_limit (402, with the limit, the use and the plan); forbidden, csrf, demo_locked, no_permission, no_clinic, read_only, impersonating, suspended, clinic_suspended, support_access_needed (403); not_found (404); conflict, time_taken, possible_duplicate, stale, has_appointments, booking_off, too_late, window_closed, no_number, not_ready, whatsapp, ai_credits (409); rate_limited (429); internal (500); unavailable, maintenance (503). time_taken carries the nearest free times in details; WhatsApp refusals carry Meta's own code in details.metaCode.
  • Lists: ?page=1&size=50 (size up to 500) → {items, total, page, size}, with counts for the tabs where a page has them.
  • "Staff" means any member of the current clinic; "Notes", "Payments", "Settings" and "Reports" the staff whose role has that permission (chapter 17); "Owner" the clinic's owner; "Patient (portal)" a patient signed in to the portal; "The patient's link" the token in a patient's booking or payment link; "Super-admin (viewer reads)" lets the read-only viewer role read too.
  • Live events: GET /api/v1/events is a Server-Sent Events stream for the current clinic (appointments, visits, invoices, messages and notifications as they change, and a ping every 25 seconds).
MethodAddressWho may call itWhat it does
System
GET/api/healthAnyone200 while serving, 503 while handing over to a new copy (the proxy then moves people)
GET/api/app-versionAnyoneOpen pages compare it with their own to offer a reload after a deploy
GET/robots.txtAnyoneSee [web::robots_txt]
Public site, install and inbound webhooks
GET/api/v1/public/configAnyoneThe brand, sign-up mode, demo sign-ins and what the web app needs before sign-in
GET/api/v1/public/plansAnyoneThe public plans for the pricing page
GET/api/v1/public/legal/{slug}AnyoneOne legal page
GET/api/v1/install/statusAnyone, until the install is done (install token)Whether the install wizard has run
POST/api/v1/install/checkAnyone, until the install is done (install token)Checks the install token and the setup before the wizard's last step
POST/api/v1/install/completeAnyone, until the install is done (install token)Finishes the install: the super-admin, brand and sample plans (runs once)
GET/api/v1/webhooks/whatsappMeta (signed webhook)Meta's webhook check: answers the challenge for the platform or a number's verify token
POST/api/v1/webhooks/whatsappMeta (signed webhook)A WhatsApp webhook delivery (signature checked, stored once, applied by a job)
POST/api/v1/webhooks/stripeStripe (signed webhook)A Stripe webhook event (signature checked, applied once)
GET/api/v1/public/clinic-picture/{clinic}/{file}AnyoneNo sign-in (the name holds the file's hash), cached a year
GET/api/v1/public/logo/{file}AnyoneThe uploaded brand logo (no sign-in; long cache, the name changes with the file)
Sign-in and account
POST/api/v1/auth/registerAnyoneCreates an account and its first clinic (when sign-ups are open)
POST/api/v1/auth/loginAnyoneSigns in with email and password (wrong passwords count down, then the account waits)
POST/api/v1/auth/logoutSigned inSigns out of this browser
GET/api/v1/auth/meSigned inThe signed-in user, their clinics, role and capabilities
GET/api/v1/auth/sessionAnyone{ me } like /auth/me when signed in, { me: null } when not
POST/api/v1/auth/switch-clinicSigned inMakes another of the user's clinics the current one
POST/api/v1/auth/clinicsSigned inCreates another clinic owned by the user
POST/api/v1/auth/forgotAnyoneEmails a password reset link when the email belongs to an account
POST/api/v1/auth/resetAnyoneSets a new password with a reset link and signs in (each link works once)
GET/api/v1/auth/reset/{token}AnyoneWhose link this is (404 when it expired or was used)
POST/api/v1/auth/impersonation/exitSigned inEnds an "open as owner" session and goes back to the super-admin's own
GET/api/v1/auth/invites/{token}AnyoneWhat an invitation link is for (clinic, role, email)
POST/api/v1/auth/invites/acceptAnyoneAccepts an invitation, signing in or creating the account
PATCH/api/v1/auth/profileSigned inChanges the user's name, email or picture
POST/api/v1/auth/passwordSigned inChanges the password (the current one is asked for); other sessions end
POST/api/v1/auth/demoAnyone, public demo onlyOne-click demo sign-in as the owner, a doctor, the front desk or the read-only super-admin (DEMO_MODE only)
Visits, notes and prescriptions
GET/api/v1/visitsNotesVisits in a date range (newest first), with the tab counts and my drafts left to sign
GET/api/v1/visits/exportNotesThe list's visits (same filters, up to 10,000) as CSV
POST/api/v1/appointments/{id}/visitNotesStarts (or reopens) the visit of an appointment
GET/api/v1/visits/{id}NotesOne visit's notes (opening them is written to the audit log)
PUT/api/v1/visits/{id}NotesSaves the draft notes (409 stale when another tab saved first)
POST/api/v1/visits/{id}/signNotesSigns the notes (doctors who see patients)
POST/api/v1/visits/{id}/addendaNotesA dated note under signed notes
POST/api/v1/visits/{id}/draftNotesWriting help drafts the notes from bullet points (nothing is saved)
GET/api/v1/writing-helpNotesWhether writing help is on, and the credits left this month
GET/api/v1/icd10NotesCommon ICD-10-CM codes by code or words
GET/api/v1/prescriptionsNotesPrescriptions in a date range (newest first), with the tab counts
POST/api/v1/prescriptionsNotesA new draft prescription (with allergy warnings)
GET/api/v1/prescriptions/exportNotesThe list's prescriptions (same filters, up to 10,000) as CSV
GET/api/v1/prescriptions/{id}NotesOne prescription
PUT/api/v1/prescriptions/{id}NotesReplaces a draft's medicines
POST/api/v1/prescriptions/{id}/signNotesSigns it (it gets its check code)
POST/api/v1/prescriptions/{id}/voidNotesVoids it (it stays on file, marked void)
POST/api/v1/prescriptions/{id}/items/{item}/stopNotesStops one medicine
GET/api/v1/prescriptions/{id}/pdfNotesThe printable A4 prescription
POST/api/v1/prescriptions/{id}/sendNotesSends the signed PDF to the patient (WhatsApp document and/or email)
GET/api/v1/public/rx/{code}AnyoneA pharmacy checks a prescription by the code printed on it (no sign-in)
Clinic, staff and settings
GET/api/v1/clinicStaffThe current clinic
PATCH/api/v1/clinicSettingsThe profile (name, address, colour, slug, time zone, currency), opening hours or settings
DELETE/api/v1/clinicOwnerDeletes the clinic (owner only; type its name to confirm)
POST/api/v1/clinic/logoSettingsThe clinic logo (multipart file: PNG, JPEG or WebP up to 1 MB), shown in the app, the booking page and on prescriptions and invoices
DELETE/api/v1/clinic/logoSettingsRemoves the logo
GET/api/v1/clinic/me/signatureStaffThe signed-in doctor's signature picture, for the profile page's preview
POST/api/v1/clinic/me/signatureStaffThe signed-in doctor's signature, printed on their prescriptions (multipart file: PNG or JPEG up to 512 KB)
DELETE/api/v1/clinic/me/signatureStaffPrescriptions print without a signature picture again
POST/api/v1/clinic/sample-dataSettingsShows or removes the sample patients (the first-day overview)
GET/api/v1/teamStaffThe staff with their hours, services and leave, and open invitations
GET/api/v1/team/rolesStaffWhat each role can do in this clinic
PUT/api/v1/team/rolesOwnerThe owner changes what a role may do
POST/api/v1/team/ask-accessStaffA teammate refused a page asks the owner for access (a notification for the owner, at most once a day per person and page; sent is false when it was already asked today)
POST/api/v1/team/invitesSettingsInvites someone by email with a role (a doctor counts towards the plan)
POST/api/v1/team/invites/{id}/resendSettingsSends an invitation again with a new link
DELETE/api/v1/team/invites/{id}SettingsWithdraws an invitation
PATCH/api/v1/team/members/{id}StaffRole, calendar column, title, hours, room, services, online booking
DELETE/api/v1/team/members/{id}SettingsRemoves someone from the staff (their past visits keep their name)
POST/api/v1/team/members/{id}/leaveSettingsTime off (nobody can book that person then); says how many visits clash
DELETE/api/v1/team/leave/{id}SettingsRemoves time off
GET/api/v1/servicesStaffThe services (archived ones last)
POST/api/v1/servicesSettingsA new service
PATCH/api/v1/services/{id}SettingsChanges a service
DELETE/api/v1/services/{id}SettingsArchives a service (past appointments keep it)
GET/api/v1/roomsStaffThe branches and their rooms, each with what is on in it today
POST/api/v1/roomsSettingsA new room in a branch (the main branch when none is given)
PATCH/api/v1/rooms/{id}SettingsRenames or describes a room
DELETE/api/v1/rooms/{id}SettingsArchives a room
POST/api/v1/branchesSettingsAnother branch (counts towards the plan)
PATCH/api/v1/branches/{id}SettingsRenames a branch or changes its address
DELETE/api/v1/branches/{id}SettingsArchives a branch and its rooms (never the main branch)
GET/api/v1/auditSettingsWho did or opened what (Privacy and data), newest first
GET/api/v1/audit/exportSettingsThe filtered log as CSV (the newest 50,000 rows)
GET/api/v1/notificationsStaffMy notifications (newest first) and how many are unread
POST/api/v1/notifications/readStaffMarks every notification read
GET/api/v1/notifications/preferencesStaffMy notification choices in this clinic
PUT/api/v1/notifications/preferencesStaffSaves my choices (any part of { patientReplies: { email, browser }, … })
GET/api/v1/support-accessOwnerThe platform's requests to open this clinic (approved for 30 minutes at a time)
POST/api/v1/support-access/{id}OwnerThe owner approves (30 minutes) or denies a support request
GET/api/v1/eventsStaffready first, then every change in the clinic, a ping every 25 s; a tab that fell behind gets refetch
GET/api/v1/overviewStaffWhat each role needs first thing: today's day, tomorrow's confirmations, money, messages to answer, unsigned notes, the first-day checklist and the plan's usage
POST/api/v1/mediaStaffUploads a file for a message (type checked by content, size limits per kind)
GET/api/v1/media/{id}StaffA clinic file, to members of that clinic only
Calendar and appointments
GET/api/v1/calendarStaffThe people, their hours, the appointments and blocked time of one day (or up to 7), and the counts the header shows
GET/api/v1/calendar/freeStaffThe free start times that day, per person
GET/api/v1/appointmentsStaffThe list view by tab (today, upcoming, unconfirmed, cancelled, all), with filters, sorting, pages and the tab counts
POST/api/v1/appointmentsStaffBooks an appointment (a taken time answers 409 time_taken with nearby free times)
GET/api/v1/appointments/exportPaymentsThe list's rows (same tab and filters, up to 10,000) as CSV, for the front desk
GET/api/v1/appointments/{id}StaffOne appointment with the patient's card, its history and its messages
PATCH/api/v1/appointments/{id}StaffMoves an appointment (time or person; the patient is told) or changes its room, reason or note
POST/api/v1/appointments/{id}/stepStaffConfirm, check in (or undo it), start, finish or mark a no-show
POST/api/v1/appointments/{id}/cancelStaffCancels; the patient is told and the freed time goes to the waitlist
POST/api/v1/appointments/{id}/remindStaffSends the reminder now
POST/api/v1/time-blocksStaffBlocks time for one person (or the whole clinic) so nobody books it
DELETE/api/v1/time-blocks/{id}StaffFrees blocked time
GET/api/v1/waitlistStaffPatients waiting for an earlier time
POST/api/v1/waitlistStaffPuts a patient on the waitlist (a freed time is offered to them on WhatsApp)
DELETE/api/v1/waitlist/{id}StaffTakes a patient off the waitlist
Patients
GET/api/v1/patientsStaffSearch by name, number, phone or email; filter by tag, doctor or state
POST/api/v1/patientsStaffAdds a patient (409 possible_duplicate lists likely matches unless force)
GET/api/v1/patients/next-numberStaffThe number the next new patient gets
GET/api/v1/patients/tagsStaffThe tags in use, most used first
GET/api/v1/patients/exportSettingsEvery patient as CSV (managers; written to the audit log)
POST/api/v1/patients/importSettingsChecks a CSV (multipart file, optional mapping JSON); nothing is saved yet
GET/api/v1/patients/import/{id}SettingsAn import's state and counts
GET/api/v1/patients/import/{id}/fixSettingsThe rows that need a fix, as CSV
POST/api/v1/patients/import/{id}/startSettingsImports the checked rows in the background
POST/api/v1/patients/import/{id}/undoSettingsRemoves an import's new records (within 24 hours)
GET/api/v1/patients/{id}StaffThe record with its appointments, and (for people who may see them) visits, prescriptions, invoices, files, notes and messages
PATCH/api/v1/patients/{id}StaffSaves changes (409 possible_duplicate unless force)
DELETE/api/v1/patients/{id}OwnerThe owner deletes a record; it is removed for good after 30 days
POST/api/v1/patients/{id}/restoreOwnerBrings back a deleted record (within its 30 days)
POST/api/v1/patients/{id}/archiveSettingsHides a record from the lists (moved away, passed on); Restore brings it back
POST/api/v1/patients/{id}/notesStaffA staff note on the record (not a clinical note)
POST/api/v1/patients/{id}/documentsStaffFiles an uploaded file (from POST /media) on the record
DELETE/api/v1/patients/{id}/documents/{doc}StaffRemoves a file from the record
POST/api/v1/patients/{id}/messageStaffA WhatsApp answer, inside the 24 hours after the patient last wrote
Invoices and payments
GET/api/v1/invoicesPaymentsInvoices in a date range (default: the last 30 days), the tab counts, the money totals and this month's figures
POST/api/v1/invoicesPaymentsA new invoice for a patient (optionally for an appointment)
GET/api/v1/invoices/exportPaymentsThe list's invoices (same tab and filters, up to 10,000) as CSV
GET/api/v1/invoices/{id}StaffOne invoice with its lines, payments, link and history
PATCH/api/v1/invoices/{id}PaymentsDiscount, note, how it is paid, insurance claim number
POST/api/v1/invoices/{id}/linesStaffAdds a line (a service brings its name and price)
DELETE/api/v1/invoices/{id}/lines/{line}StaffRemoves a line
POST/api/v1/invoices/{id}/issueStaffA draft goes to the front desk to be paid
POST/api/v1/invoices/{id}/voidPaymentsCancels an invoice nobody has paid anything on
POST/api/v1/invoices/{id}/payPaymentsRecords a payment at the desk (cash, card machine, bank, insurance)
POST/api/v1/invoices/{id}/linkPaymentsSends a payment link to the patient (WhatsApp, else email)
GET/api/v1/invoices/{id}/pdfStaffThe invoice (or receipt, once paid) as a PDF
POST/api/v1/invoices/{id}/sendPaymentsSends the invoice PDF to the patient with the visit's documents
GET/api/v1/paymentsPaymentsPayments taken in a date range (default: today), newest first
POST/api/v1/payments/{id}/refundPaymentsRefunds part or all of a payment (a card payment at the clinic's Stripe)
GET/api/v1/settings/paymentsSettingsWhether the clinic's Stripe is connected, and its webhook address
PUT/api/v1/settings/paymentsSettingsSaves the clinic's Stripe keys (checked with Stripe first)
DELETE/api/v1/settings/paymentsSettingsRemoves the clinic's Stripe keys
GET/api/v1/public/pay/{token}The patient's linkThe payment page's data (no sign-in; the link is the key)
POST/api/v1/public/pay/{token}/checkoutThe patient's linkA fresh Stripe Checkout session for the link
POST/api/v1/public/pay/{token}/demoThe patient's linkThe demo's test checkout (only when demo payments are on)
POST/api/v1/webhooks/stripe/clinics/{id}Stripe, the clinic's own account (signed webhook)A clinic's Stripe event (checked with that clinic's secret)
Reminders, messages and WhatsApp
GET/api/v1/remindersStaffEvery rule, the templates' review state, the number and this month's reminders
PUT/api/v1/reminders/{kind}SettingsTurns a rule on or off and sets its channel, time and email words
POST/api/v1/templates/submitSettingsSends Caremint's templates that are missing to Meta for review
POST/api/v1/templates/{purpose}/resubmitSettingsSends one template for review again (after a refusal)
GET/api/v1/messagesStaffThe message log (default: the last 7 days), newest first, with the counts the tabs show
POST/api/v1/messages/{id}/answeredStaffMarks a patient's message as looked after
GET/api/v1/numbersStaffThe connected numbers with quality, limit and webhook counts
POST/api/v1/numbersSettingsConnects a number by hand (phone number id, WABA id, token)
POST/api/v1/numbers/embedded-signupSettingsConnects a number from Embedded Signup (the code is exchanged for a token)
GET/api/v1/numbers/{id}StaffOne number with its webhook address, verify token and health
PATCH/api/v1/numbers/{id}SettingsReplaces a number's access token or app secret
DELETE/api/v1/numbers/{id}SettingsDisconnects a number
POST/api/v1/numbers/{id}/refreshSettingsReads the number's quality and messaging limit from Meta again
POST/api/v1/numbers/{id}/registerSettingsRegisters the number for sending with its two-step PIN
GET/api/v1/numbers/{id}/profileStaffThe number's WhatsApp business profile, read from Meta
PATCH/api/v1/numbers/{id}/profileSettingsChanges the business profile at Meta (only the fields sent): about, address, description, email, websites (two at most), vertical
POST/api/v1/numbers/{id}/profile/pictureSettingsA new profile picture (multipart file, JPEG or PNG, square, 5 MB at most)
Reports
GET/api/v1/reportsReportsThe numbers for a date range (default: this month so far), with the same length of time before it for comparison
GET/api/v1/reports/exportReportsThe range day by day as CSV (appointments, no-shows, money taken)
Online booking and the patient portal
GET/api/v1/booking/summaryStaffVisits booked online this month against all bookings, and when each person who sees patients is next free online (their shortest online service, within two weeks)
GET/api/v1/public/book/{slug}AnyoneThe clinic, its online services and the people who take online bookings (or, while online booking is off, the clinic and off: how to book instead)
POST/api/v1/public/book/{slug}AnyoneBooks a time
GET/api/v1/public/book/{slug}/timesAnyoneFree times for a service on a date
GET/api/v1/public/manage/{token}The patient's linkThe patient's booking (and its video link for a video visit)
GET/api/v1/public/manage/{token}/timesThe patient's linkFree times to move to, with the same person and service
POST/api/v1/public/manage/{token}/confirmThe patient's linkThe patient confirms they are coming
POST/api/v1/public/manage/{token}/moveThe patient's linkThe patient moves the visit to another free time
POST/api/v1/public/manage/{token}/cancelThe patient's linkThe patient cancels; the front desk is told and the time is offered to the waitlist
GET/api/v1/public/embed.jsAnyoneThe "Book online" button for a clinic's own website (<script src=".../api/v1/public/embed.js" data-clinic="your-slug"></script>)
POST/api/v1/portal/{slug}/codeAnyoneSends a sign-in code (the answer never says whether someone is a patient)
POST/api/v1/portal/{slug}/verifyAnyoneChecks the code and opens the portal (sets the portal cookie)
POST/api/v1/portal/demoAnyone, public demo onlyThe public demo's one-click portal sign-in (Noah Patel at Lakeside)
POST/api/v1/portal/logoutAnyoneEnds the portal session
GET/api/v1/portal/mePatient (portal)The patient, their clinic, upcoming and past visits, prescriptions, invoices and files
GET/api/v1/portal/sessionAnyone{ me } like /portal/me when a patient is signed in, { me: null } when not
GET/api/v1/portal/prescriptions/{id}/pdfPatient (portal)One of the patient's signed prescriptions
GET/api/v1/portal/invoices/{id}/pdfPatient (portal)One of the patient's invoices or receipts
POST/api/v1/portal/invoices/{id}/payPatient (portal)A payment link for an unpaid invoice (the answer has its address)
GET/api/v1/portal/documents/{id}Patient (portal)One of the documents the clinic shared with the patient
Plan and billing
GET/api/v1/billingOwnerThe plan, subscription, usage, invoices and card on file
GET/api/v1/billing/plansOwnerThe plans a clinic can pick
POST/api/v1/billing/checkoutOwnerStarts a plan change (Stripe Checkout link, test checkout, or a switch to a free plan)
POST/api/v1/billing/portalOwnerA Stripe customer portal link (owner only)
POST/api/v1/billing/cancelOwnerCancels the paid plan at the end of the period (owner only)
Super-admin
GET/api/v1/admin/overviewSuper-admin (viewer reads)The platform dashboard: revenue, clinics, messages and what needs attention
GET/api/v1/admin/clinicsSuper-admin (viewer reads)The clinic list (search, status, plan and number filters, sorting, paging)
GET/api/v1/admin/clinics/{id}Super-admin (viewer reads)One clinic
PATCH/api/v1/admin/clinics/{id}Super-adminChanges a clinic's plan or status (a suspended clinic sends nothing to patients)
DELETE/api/v1/admin/clinics/{id}Super-adminCloses a clinic and cancels its paid subscriptions
POST/api/v1/admin/clinics/{id}/support-accessSuper-adminAsks the clinic's owner to let support open the clinic
POST/api/v1/admin/clinics/{id}/impersonateSuper-admin"Open as owner": a session as the clinic's owner while the owner's approval lasts (30 minutes at most)
GET/api/v1/admin/usersSuper-admin (viewer reads)The user list (search, platform role, status)
PATCH/api/v1/admin/users/{id}Super-adminChanges a user's platform role or status
GET/api/v1/admin/plansSuper-admin (viewer reads)Every plan, archived ones too
POST/api/v1/admin/plansSuper-adminAdds a plan
POST/api/v1/admin/plans/check-priceSuper-adminThe "Found in Stripe" badge: reads a price id from Stripe
PATCH/api/v1/admin/plans/{id}Super-adminChanges a plan (prices, Stripe ids, limits, features)
DELETE/api/v1/admin/plans/{id}Super-adminTakes a plan off sale; its subscribers keep it
POST/api/v1/admin/plans/{id}/restoreSuper-adminPuts an archived plan back on sale
GET/api/v1/admin/paymentsSuper-admin (viewer reads)Every payment (filters, paging)
GET/api/v1/admin/subscriptionsSuper-admin (viewer reads)Every subscription (filters, paging)
GET/api/v1/admin/settingsSuper-admin (viewer reads)The platform settings (secrets masked), server facts and storage stats
POST/api/v1/admin/settings/meta/verify-tokenSuper-adminMakes a new webhook verify token for the platform Meta app and shows it once
POST/api/v1/admin/settings/branding/logoSuper-adminThe brand logo (PNG, SVG or WebP up to 1 MB, checked by content), served publicly as the logo and favicon
PUT/api/v1/admin/settings/{section}Super-adminSaves one settings section (secrets are sealed; an empty secret keeps .env)
GET/api/v1/admin/emailsSuper-admin (viewer reads)The platform emails with their built-in and saved wording, for the email editor
GET/api/v1/admin/setup-checkSuper-admin (viewer reads)The setup check rows
POST/api/v1/admin/setup-check/{id}/testSuper-adminTests one setup check row against the real service
GET/api/v1/admin/jobsSuper-admin (viewer reads)Background jobs (status and kind filters) with counts per status
POST/api/v1/admin/jobs/{id}/retrySuper-adminQueues a failed job again
POST/api/v1/admin/demo-data/removeSuper-adminRemoves the demo data (demo-marked rows only)

38Database

PostgreSQL. The schema is in migrations/ and is applied by the server on start. Ids are UUIDs, times are UTC, money is in whole cents. Every clinic table carries clinic_id; payment and subscription rows are never deleted with their clinic. These 51 tables are generated from the migrations when the release is built.

TableWhat it holdsKeysPoints to
Accounts and sign-in
usersEvery person: platform staff and clinic staff, with their super-admin role (none, admin or viewer)primary key id; unique email (any case)–
sessionsSigned-in browsers (only a hash of the cookie is stored), including the super-admin's "open as owner" sessionsprimary key id; unique token_hashusers, clinics
password_resetsPassword reset links (hashed, valid for one hour, used once)primary key id; unique token_hashusers
invitesOpen invites to a clinic, with the role to join asprimary key id; unique token_hash; unique email (any case) per clinic, when accepted_at is nullclinics, users
rate_limitsFixed-window counters for sign-in, sign-up, reset and booking limits (keys hold a keyed hash, never a plain address)primary key key–
Clinics and staff
clinicsThe tenants: your customers' clinics, with their plan, trial, Stripe customer, time zone, booking page address, own Stripe keys (encrypted) and settingsprimary key id; unique slug; unique stripe_customer_idplans, users
clinic_membersWho works in a clinic: their role (owner, clinic admin, doctor or receptionist), whether they see patients, working hours and online bookingprimary key clinic_id + user_idclinics, users, rooms
clinic_countersRunning numbers per clinic: patients (CM-00001), invoices (INV-2026-00001), prescriptions (RX-2026-00001)primary key clinic_id + kind + yearclinics
branchesA clinic's locations, one of them the main branchprimary key id; unique per clinic, when is_main and archived_at is nullclinics
roomsConsulting rooms and video rooms in a branchprimary key idclinics, branches
servicesWhat a clinic offers: length, price, deposit, video or in person, and whether it can be booked onlineprimary key idclinics
service_staffWho offers each serviceprimary key service_id + user_idservices, clinic_members
staff_leaveLeave and days off: never bookable online; bookings already in that time show as "to move"primary key idusers, clinic_members
audit_logEvery look at and change to a record, and every admin actionprimary key idclinics, users
support_accessSupport's requests to open a clinic; the clinic owner approves each one for 30 minutesprimary key idclinics, users
notificationsWhat staff see under the bellprimary key idclinics, users
notification_readsUp to when each person has read their notificationsprimary key clinic_id + user_idclinics, users
Plans, billing and usage
plansThe plans you sell, with prices, Stripe price IDs, trial days, limits and featuresprimary key id–
subscriptionsA clinic's paid plan from Stripe; a money row, so a clinic that has one can only be soft-deletedprimary key id; unique provider_refclinics, plans
paymentsYour invoices to clinics (plan payments) paid, failed or refunded; money rows, never deleted with their clinicprimary key id; unique number; unique provider_refclinics, plans
stripe_eventsEvery Stripe event already applied (yours and each clinic's), so a repeated delivery changes nothingprimary key id–
usage_countersMonthly appointments, WhatsApp reminders and AI note drafts used per clinic (calendar month, UTC)primary key clinic_id + period_startclinics
email_noticesPlatform emails sent once per clinic and period (plan limit reached, …), so a busy day sends one emailprimary key clinic_id + kind + periodclinics
Platform
platform_settingsPlatform settings set from the super-admin (override .env)primary key keyusers
jobsThe durable job queue (claimed with FOR UPDATE SKIP LOCKED)primary key id; unique dedupe_key, when dedupe_key is not null and status in ('queued', 'running')clinics
Patients
patientsPatient records: details, contact consent, allergies, conditions, insurance, next of kin and tags; removed for good 30 days after the owner deletes oneprimary key id; unique number per clinicclinics, users, clinic_members
patient_notesStaff-only notes on a patient ("Prefers morning visits")primary key idusers, patients
patient_documentsFiles on a patient's record (uploaded by staff or the patient), and whether they are shared in the portalprimary key idusers, patients, media, visits
patient_importsA CSV import: checked first (rows and problems kept here), then imported on "Import", undoable for 24 hoursprimary key idclinics, users
mediaFiles in storage: patient documents, logos, signatures, imports, generated PDFsprimary key idclinics, users
Calendar
appointmentsVisits in the calendar: patient, person, service, room, time, status, deposit and the patient's own linkprimary key id; unique manage_token_hashclinics, users, patients, clinic_members, services, rooms
appointment_eventsAn appointment's history ("Booked on the online booking page", "Confirmed by tapping Confirm on WhatsApp")primary key idusers, appointments
time_blocksBlocked time (admin time, a meeting)primary key idclinics, users, clinic_members
waitlistPatients who want an earlier timeprimary key idusers, patients, services, clinic_members
Visits and prescriptions
visitsA visit's vitals, notes in four parts, diagnoses (ICD-10) and follow-up; locked once the doctor signsprimary key id; unique appointment_id, when appointment_id is not nullclinics, users, patients, appointments, clinic_members
visit_addendaDated notes added under signed visit notesprimary key idusers, visits
prescriptionsPrescriptions: draft, signed with a check code, or voidprimary key id; unique verify_code; unique number per clinicclinics, users, patients, visits, clinic_members
prescription_itemsThe medicines on a prescription, with dose, how often, how long, and when one was stoppedprimary key idusers, prescriptions
ai_eventsEvery use of the writing helperprimary key idclinics, users
Invoices and patient payments
invoicesPatients' invoices with totals worked out on the server, tax, discount and insurance claimprimary key id; unique number per clinic; unique visit_id, when visit_id is not null and status <> 'void'clinics, users, patients, appointments, visits, clinic_members
invoice_linesThe lines of an invoiceprimary key idusers, invoices, services
invoice_eventsAn invoice's history ("Payment link sent on WhatsApp", "Card declined by the bank")primary key idusers, invoices
clinic_paymentsPayments from patients: at the desk (cash, card machine, bank, insurance) or online through the clinic's own Stripe, with refundsprimary key id; unique provider_refclinics, users, patients, invoices, appointments
payment_linksA link the patient opens to pay (an invoice or a booking deposit)primary key id; unique token_hashclinics, users, invoices, appointments
Reminders and WhatsApp
reminder_rulesOne row per reminder kind and clinic (created with the clinic)primary key id; unique kind per clinicclinics
messagesEvery message the clinic sent or a patient wrote, on WhatsApp or by email (kept 12 months)primary key id; unique wamid per clinic, when wamid is not nullclinics, users, patients, appointments, invoices, media
templatesThe local copy of the clinic's message templates at Metaprimary key id; unique waba_id + name + language per clinicclinics, wa_numbers
wa_numbersEach clinic's WhatsApp number with its Meta IDs, encrypted token, quality rating and messaging limitprimary key id; unique phone_number_id; unique verify_token_hash; unique per clinic, when status <> 'disconnected'clinics
webhook_eventsRaw deliveries from Meta, stored before any processing (dedupe on the body hash)primary key id; unique body_sha256clinics
Patient portal
portal_codesA patient's sign-in to the portal: a 6-digit code by email or WhatsApp, 10 minutes, 5 triesprimary key idpatients
portal_sessionsSigned-in patient portal browsers (only a hash of the cookie is stored), 30 daysprimary key id; unique token_hashpatients
Part 08

Help

39Updating and backups

Back up

docker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > backup-$(date +%F).sql

Run it in the Caremint folder. It reads the database user and name from the postgres container, so it works whatever you set as POSTGRES_USER and POSTGRES_DB; -T keeps a terminal out of the dump. The dump holds patient records: store it encrypted and as privately as the live data, and run it every day (for example from cron).

Also keep a copy of .env (above all APP_SECRET, without which the saved tokens and keys cannot be read) and of your files: the minio-data Docker volume, your own bucket, or the app-storage volume. Restore a database backup into an empty database with docker compose exec -T postgres sh -c 'psql -U "$POSTGRES_USER" "$POSTGRES_DB"' < backup.sql, and try a restore on a test copy now and then.

Update

Upgrade in the same folder

Upgrade in the same folder (unzip the new version over it as below; your .env stays). Docker names the stack, and with it the database volume, after the folder unless COMPOSE_PROJECT_NAME is set. If you move or rename the folder, set COMPOSE_PROJECT_NAME to the old folder name first, or the app starts with an empty database. Your data isn't lost; it's under the old name. Docker writes that name in lower case without dots or spaces (a folder Caremint-1.0.0 becomes caremint-100); docker volume ls shows it before _postgres-data.

  1. Back up as above.
  2. From the folder that holds caremint/ (not inside it), run unzip -o caremint-x.y.z.zip with the new version's file name. The zip has a top-level caremint/ folder, so it unpacks over your install; unzipping inside the install would make caremint/caremint. -o replaces the old files without asking about each one. Your .env, compose.override.yaml and prebuilt/ are kept, because the zip doesn't contain them.
  3. Compare your .env with the new .env.example: new keys are listed there and in CHANGELOG.md. This lists the keys of .env.example that your .env doesn't have yet:
    cd caremint
    for k in $(grep -oE '^#? ?[A-Z][A-Z0-9_]*=' .env.example | tr -d '# ='); do grep -q "^$k=" .env || echo "$k"; done
    Copy the ones you need, with their comments, into .env; a key you leave out keeps its default.
  4. In the caremint folder, run docker compose up -d --build (with --profile https on your server). The new version applies any new migrations when it starts; your data stays.
  5. If disk is tight, run docker builder prune afterwards to free the build cache.

If you changed the code, compare your changes with the new version first. CHANGELOG.md lists what changed and marks security fixes.

40Troubleshooting

Reminders go by email instead of WhatsApp

  1. Reminders → WhatsApp: the clinic's number must be connected, and the template for that reminder Approved under Templates at Meta. A rejected template shows Meta's reason.
  2. The patient's record must have a mobile and WhatsApp ticked under what they agreed to.
  3. The plan's WhatsApp reminders for the month may be used up (Settings → Plan and billing).
  4. The message log shows each try: a failed WhatsApp shows Meta's reason in plain words and the email sent instead.

Patients' answers don't reach the calendar

  1. Super-admin → Setup check → WhatsApp webhook: press Test. It must show green, and "last event" should change when a patient answers.
  2. In the App Dashboard → Use cases → Connect with customers through WhatsApp → Customize → Configure Webhooks, check the callback URL (exactly https://your-domain/api/v1/webhooks/whatsapp) and that the messages field is subscribed. Its Test link sends a sample to your server.
  3. If real answers don't reach Caremint but Meta's Test link works, publish the app (App Dashboard → Publish), which needs a privacy policy URL. Meta promises unpublished apps only test webhooks.
  4. If the number belongs to another Meta app, that app needs the same webhook, with the number's own verify token, and its app secret must be entered on the number in Caremint. Without it the log shows webhook refused: bad or missing signature.
  5. Your server must answer on https with a valid certificate from the internet: curl -I https://your-domain/api/health from another computer.
  6. On a test number, the patient's phone must be one of its five allow-listed recipients.

Meta's error codes

When Meta refuses a message, the message log shows the reason in plain words and keeps the code. The most common ones:

CodeWhat it meansWhat to do
131030The patient is not on the test number's allow list.Add the phone under API Setup → To → Manage phone number list (at most five), or go live with a real number.
100 (subcode 33)"Object does not exist or missing permissions": usually the system user has the WhatsApp account instead of the Messaging account, or an ID is wrong.In Business settings → System users → Assign assets, give the system user the Messaging account with full control, generate a new token and connect the number again with it.
190The token expired or was revoked.Use a system-user token with expiry "Never" (chapter 8, step 5) and connect the number again with it.
131026The patient cannot receive the message (not on WhatsApp, an old app, or they blocked the clinic).Nothing to fix on your side; the email goes instead where the rule allows it.
131042A payment problem on the clinic's Messaging account.The clinic adds or fixes the payment method in Business settings → Billing and payments.
133010, 133006, 131045The number cannot send yet.Choose Register for sending under Reminders → WhatsApp (chapter 8, step 11). For 133006, first verify the number again in WhatsApp Manager.
132001The template does not exist in that language or is not approved yet.Wait for Meta's review, or send it for review again under Templates at Meta.

Every code Caremint knows, as the server groups them (generated from the code):

CodesMeaningWhat Caremint does, and what you can do
0, 190The access token expired, was revoked or is invalidMarks the message failed and the number as Error, so the clinic reconnects it. The email copy goes out when the reminder rule allows it. Create a new permanent token (chapter 8, step 5) and replace it on the clinic's number (Reminders → WhatsApp).
3, 10, 131005, 200–299The token lacks a permission, or the app was removedMarks the message failed and the number as Error, so the clinic reconnects it. The email copy goes out when the reminder rule allows it. Give the system user the Messaging account with Everything and the app with Manage app, then create a new token with both WhatsApp permissions.
4, 80007, 130429App, account or throughput rate limitTries again after the wait Meta asks for, then marks the message failed if it still cannot be sent. The email copy goes out when the reminder rule allows it. Nothing: it passes. Reminders are spread out by the job queue.
131056Too many messages to the same user in a short timeTries again after the wait Meta asks for, then marks the message failed if it still cannot be sent. The email copy goes out when the reminder rule allows it. Wait a little before messaging the same patient again.
131048, 131064Sending limited because of low quality or misclassified templatesMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Check the number's quality rating in WhatsApp Manager. Reminders are utility messages, so this is rare.
368, 131031, 130497The WhatsApp account is restricted or disabled by policyMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Read the notice in WhatsApp Manager → Account quality, and appeal there if it is a mistake.
131030Test number: the recipient is not one of its allow-listed phonesMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Add the phone to the test number's recipient list in the App Dashboard, or connect a real number.
131047The 24-hour customer service window is closedMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Nothing to fix: more than 24 hours after the patient's last message only an approved template can reach them, and every reminder is one.
131026The recipient cannot receive the message (not on WhatsApp, old app, …)Marks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Check the patient's mobile number. They may not use WhatsApp, or may have an old app.
130403The business blocked this userMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Unblock the patient in WhatsApp Manager if you want to message them again.
131049Marketing message held back to protect user experienceMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Meta limits how many marketing messages each person receives. Caremint's templates are utility, so this is rare.
131050The user stopped marketing messages from this businessMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. The patient stopped marketing from this clinic in WhatsApp. Reminders are utility messages and still go.
131062This message type cannot be sent to a business-scoped user ID: send to the phoneMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Add the patient's mobile number to their record.
132001Template missing in that language or not approvedMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Press Sync now under Reminders → WhatsApp → Templates at Meta, and check that the template is approved.
132015Template paused for low qualityMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Meta pauses a template with poor feedback for a few hours. It is used again once Meta lifts the pause.
132016Template permanently disabledMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Send the template for review again under Reminders → WhatsApp.
132000, 132012, 132018Template parameters don't match the templateMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Rare: a reminder was missing a value (a doctor or a time). Check the appointment and send it again.
132005, 132007, 131063Template content refused, too long once translated, or marketing disabledMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Read Meta's reason under Reminders → WhatsApp → Templates at Meta, then send the template for review again.
2388xxxTemplate could not be created or editedMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Read Meta's reason under Reminders → WhatsApp, then send the template for review again.
132068, 132069The Flow is blocked or throttledMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Caremint sends no WhatsApp Flows. If you added one yourself, check it in WhatsApp Manager.
131051Unsupported message typeMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Rare: update Caremint.
131052The user's media could not be downloadedMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Ask the patient to send the file again, or upload it to their record.
131053Our media could not be uploaded or fetchedMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Check storage in Super-admin → Setup check, and the file's type and size (chapter 16).
33, 100, 131008, 131009, 131021, 135000A parameter is missing or invalidMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Usually a wrong ID, or a token whose system user lacks the Messaging account: check the IDs on the number and the system user's assets (chapter 8).
131059Template list cursor no longer validMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Nothing: press Sync now under Reminders → WhatsApp again.
131045, 133006, 133010The business number is not registered with Cloud APIMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Choose Register for sending on the number under Reminders → WhatsApp (chapter 8, step 11). For 133006, verify the number again in WhatsApp Manager first.
133000, 133005, 133008, 133009, 133015, 133016Register, deregister or two-step PIN failureMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Check the number's two-step verification PIN in WhatsApp Manager, then connect it again.
131042Payment method problem on the WhatsApp accountMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Add or fix the payment method on the Messaging account in Meta's Business settings.
131057, 2494100Account or number in maintenance mode, e.gTries again after the wait Meta asks for, then marks the message failed if it still cannot be sent. The email copy goes out when the reminder rule allows it. Nothing: it passes.
1, 2, 131000, 131016, 133004Temporary error or downtime on Meta's sideTries again after the wait Meta asks for, then marks the message failed if it still cannot be sent. The email copy goes out when the reminder rule allows it. Nothing: it passes. If it lasts, check Meta's status page.
No codeThe request never got an answer (connect error, timeout)Tries again after the wait Meta asks for, then marks the message failed if it still cannot be sent. The email copy goes out when the reminder rule allows it. Check that the server can reach graph.facebook.com.
No codeThe answer could not be readMarks the message failed with the reason. The email copy goes out when the reminder rule allows it. Rare. If it keeps happening, update Caremint.
No codeRejected before sending: the input breaks a WhatsApp ruleMarks the message failed with the reason. The email copy goes out when the reminder rule allows it. Rare: a reminder's text was too long or a variable was missing. Shorten the clinic's name or address.
Any other codeAnything elseMarks the message failed and shows the code and Meta's reason in the message log. The email copy goes out when the reminder rule allows it. Look the code up in Meta's list of WhatsApp error codes.

A template was rejected

Templates at Meta shows Meta's reason. Meta sometimes rejects or re-categorises a template by itself; send it for review again, and if Meta keeps refusing, ask for a review of the decision in WhatsApp Manager. Until it is approved, that reminder goes by email.

Online payments don't switch on

Settings → Payments must show Connected, not Webhook missing: add the webhook in the clinic's Stripe account and paste its signing secret (chapter 12). The clinic's plan must also allow online payments. A payment that Stripe shows as paid but Caremint doesn't: check the webhook's deliveries in Stripe → Developers → Webhooks.

The install wizard asks for a token I don't have

The app prints it in its log at every start until the install is finished, and each restart makes a new one, so use the last line of docker compose logs app | grep -i "install token" (it reads Install token: cm-install-… (open /install and paste it)). Or set INSTALL_TOKEN in .env and run docker compose up -d.

After an upgrade everything is empty

The install wizard appears again, or the clinics are gone, because the folder was moved or renamed: Docker names the stack and its database volume after the folder unless COMPOSE_PROJECT_NAME is set, so it started a new, empty one. Your data isn't lost; it's under the old name. docker volume ls shows it as <old name>_postgres-data. Stop the app with docker compose down, set COMPOSE_PROJECT_NAME in .env to the part before _postgres-data and run docker compose up -d again (chapter 39).

The app does not start

docker compose logs app names the problem, for example "APP_SECRET must be at least 32 characters" or "DATABASE_URL is not set". docker compose ps shows whether PostgreSQL and MinIO are healthy.

The build stops with "killed" or "signal: 9"

The server ran out of memory while compiling. Add swap or build on another computer (chapter 5).

Paid plans don't switch on

Setup check → Stripe webhook must be green. In Stripe → Developers → Webhooks, the endpoint must point to /api/v1/webhooks/stripe and list the events in chapter 11; Stripe shows every delivery and its answer there.

Emails don't arrive

Without SMTP, emails are written to docker compose logs app. With SMTP, press Send test email in the setup check; check the sender domain is verified with your provider.

The calendar doesn't update by itself

A proxy is buffering the live stream. With the bundled Caddy it works as is; with Nginx add proxy_buffering off; for /api/v1/events.

Times are an hour off

Each clinic's time zone is set under Settings → Clinic. Reminders, the calendar and the booking page all use it.

Too many sign-in attempts from everyone at once

TRUSTED_PROXY_HOPS is 0 behind a proxy, so every visitor shares one address. Set it to the number of proxies in front of the app (chapter 5).

41FAQ

Can I run it for one clinic only?

Yes. Install it, close sign-ups (Super-admin → Settings → Sign-ups), create your clinic and give it a plan by hand (Super-admin → Clinics → the clinic → Change the plan; Stripe is not charged). You then need only the Regular Licence, as long as you don't charge anyone for the software (chapter 44).

Do clinics need their own Meta and Stripe accounts?

For WhatsApp, each clinic needs its own WhatsApp Business Account, which Meta bills; with Quick sign-up Meta creates it in its own window. For online payments, each clinic connects its own Stripe account. Both are optional: without them, reminders go by email and payments are taken at the desk.

Does it work with the WhatsApp Business app or WhatsApp Web?

No. Caremint uses only Meta's official WhatsApp Cloud API. A number used in the WhatsApp or WhatsApp Business app has to be moved to the Cloud API first.

Is it HIPAA or GDPR compliant?

Caremint is built with the privacy controls those laws usually ask for, but compliance depends on how and where you run it and the agreements you sign; Caremint makes no compliance claim (chapter 32).

Does the AI diagnose patients?

No. The writing helper only rewrites the doctor's own bullet points into notes for the doctor to check, and it is off unless you add an AI key (chapter 14).

Can patients book without an account?

Yes. The booking page asks only for their details; the portal signs them in with a code sent to their phone or email.

Can I try it without Meta?

Yes: the live demo, or your own install with DEMO_MODE=true on a test copy, uses the built-in WhatsApp simulator. Real messages need Meta (chapter 8); Meta's free test number reaches five phones.

Do I need to know Rust?

No, not to install, rebrand or run it: Docker builds everything. Changing the screens needs React; changing server rules needs Rust (chapter 36).

Can I use another database or host it without Docker?

PostgreSQL 15 or newer is required. Without Docker, run the one caremint program behind your own HTTPS proxy (chapter 5). Managed PostgreSQL services work through DATABASE_URL.

Which licence do I need?

To charge clinics (sell plans), the Envato Extended Licence. See chapter 44.

42Credits and licences

Caremint is built with these open-source projects, each under its own licence:

Every dependency

The Rust crates (from Cargo.lock) and the web app's npm packages, counted by licence when the release is built. docs/third-party-licenses.txt lists every package by name, version and licence.

LicenceRust cratesnpm packages
MIT53270
Apache-2.0 OR MIT2132
Unicode-3.018–
ISC210
Apache-2.0110
MIT OR Unlicense5–
(MIT OR Apache-2.0) AND Unicode-3.03–
Apache-2.0 OR MIT OR Zlib3–
Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT3–
BSD-3-Clause12
0BSD11
Apache-2.0 OR BSD-2-Clause OR MIT2–
Apache-2.0 OR BSL-1.0 OR MIT2–
Apache-2.0 OR ISC OR MIT2–
Apache-2.0 OR LGPL-2.1-or-later OR MIT2–
BSD-2-Clause–2
CDLA-Permissive-2.02–
MPL-2.0–2
OFL-1.1–2
Zlib2–
(Apache-2.0 OR MIT) AND BSD-3-Clause1–
0BSD OR Apache-2.0 OR MIT1–
Apache-2.0 AND ISC1–
Apache-2.0 OR BSL-1.01–
BlueOak-1.0.0–1
CC-BY-4.0–1
MIT AND BSD-3-Clause1–
MIT-0–1
Unlicense–1
Total320305

Every licence above allows use in a commercial product. cargo deny check licenses checks the Rust crates against this list.

Images

Caremint ships no stock photos. The Caremint logo is the Lucide leaf on a coloured square; the demo clinic's logo is a simple drawing made for the demo; the demo doctors' signatures are text set in an open-licence handwriting font; and every image in this guide is a screenshot of the running app with made-up data.

43Changelog

1.0.0 (2026-11-25)

First release.

  • Calendar: day and week views with a column per doctor, drag to move, click to book, walk-ins that join the

queue, blocked time and leave, rooms, a waiting list that is offered freed times, and clashes answered with the

nearest free times.

  • Online booking: each clinic's own booking page and a button for its website; patients pick a service, a doctor

and a free time; deposits for chosen services; change and cancel online up to the clinic's cut-off; the phone

number shown when online booking is off.

  • WhatsApp reminders: on the clinic's own number through Meta's official WhatsApp Cloud API, the day before and

2 hours before, with Confirm, Reschedule and I can't come buttons that update the calendar; booking and change

confirmations; email instead while no number is connected; message log and template status from Meta.

  • Patients: records with allergies, conditions, insurance and next of kin, tags, documents, CSV import with

column matching and undo, CSV export, archive and delete after 30 days, and consent records for WhatsApp, email

and marketing.

  • Visits: vitals, notes in four parts, ICD-10 diagnosis search, a writing helper that turns the doctor's bullet

points into notes (OpenAI, Anthropic or Google Gemini with your own key, or none), signing that locks the notes,

and dated notes added later.

  • Prescriptions: a PDF on the clinic's letterhead with the doctor's signature, allergy warnings, and a check

code anyone can verify on a public page.

  • Billing: invoices made from the visit, payment links by WhatsApp, deposits, cash and bank payments, refunds,

receipts as PDF, and payments straight to each clinic's own Stripe account.

  • Patient portal and video visits: sign-in with a code, the next visit, prescriptions, bills to pay and shared

documents; a video waiting room with a camera and sound check (Jitsi Meet).

  • Clinic settings: clinic details and colour, opening hours and holidays, letterhead and tax, staff with roles

and working hours, services and rooms, reports, privacy and data, and an audit log of every look and change.

  • Billing for you: plans with limits and a free trial, Stripe Checkout and the customer portal, a read-only

clinic when a trial or plan ends, and a test checkout while Stripe is not set.

  • Super-admin: revenue, clinics, people, plans, payments and subscriptions, platform settings that take

precedence over .env, branding, legal pages, maintenance mode, email wording, and a setup check that tests every

outside service live.

  • Security: argon2id passwords, saved tokens encrypted at rest, CSRF protection, rate limits kept in the

database, signed webhooks checked, and every clinic row tied to its clinic so it can never point at another.

  • Install and hosting: an install wizard, sample plans, a public demo mode with nightly reset, and one Docker

Compose stack (the app as one compiled Rust program, PostgreSQL, MinIO and optional HTTPS with Caddy).

  • Settings (.env.example): each later release lists the keys it adds here.

44Support and licence

Questions, bug reports and help with installation: use the Support tab on the item's page on the marketplace. Please include your Caremint version (shown in the account menu), how you host it, and what you see (a screenshot, or the lines from docker compose logs app). Never send us your .env, API keys, tokens, passwords or any patient data.

Support covers questions about the item's features, help with bugs and help with installing it as described here. It does not cover custom changes to the code, legal or compliance advice, or the setup and review of your accounts at Meta, Stripe and other outside services, which are handled by those companies.

Licence

The Regular Licence lets you use Caremint for one product whose end users are not charged, for example one clinic's own system. To charge clinics (sell plans or subscriptions), you need the Envato Extended Licence. One licence covers one platform (one brand on one installation). The licences page at codecanyon.net/licenses/standard explains both licences in full.

Caremint is not affiliated with, endorsed by or sponsored by Meta or WhatsApp.