About this software
About ClinVexa
ClinVexa is a self-hosted clinic management system built with Next.js 15, TypeScript, Prisma and PostgreSQL. It is designed for a single clinic or a small multi-doctor polyclinic.
The application has 13 pages (dashboard, patients, doctors, appointments, live queue, consultation, pharmacy, laboratory, billing, reports, settings, help and login) plus printable invoice, prescription and lab report pages. Access is controlled by a permission matrix across 7 roles: administrator, doctor, receptionist, nurse, pharmacist, lab technician and accountant. Every protected API route goes through one permission wrapper, doctors only reach patients they have booked or treated, and docs/SECURITY.md maps each route to its permission. The interface ships in English, Bangla and Arabic, including a right-to-left layout.
A consultation saves vitals, diagnosis, prescription and lab orders in one step and creates the invoice when the visit closes. Pharmacy dispensing is all-or-nothing and deducts stock, and billing supports discounts, tax, partial payments and voiding unpaid invoices.
It deploys with Docker Compose or on a VPS. The archive includes the SQL schema, Prisma migrations, a committed package-lock.json, optional demo seed data, a CI workflow, setup and upgrade instructions, and 55 automated tests in 13 Vitest files.
The live demo is a static mock that runs in the browser with fictional data; it is not the real application. Not included: a mobile app, an online payment gateway and multi-branch support.
Why ClinVexa
What makes it better
than the alternatives
- 01
Three languages with RTL
English, Bangla and Arabic message files, with an Arabic right-to-left layout shown in the screenshots.
- 02
Role-enforced API
Every protected REST route runs through an api('<permission>') wrapper across 7 roles, the user is reloaded from the database on each request, and tests check that every route uses the wrapper.
- 03
Consultation to invoice flow
One save captures vitals, diagnosis, prescription and lab orders, and closing the visit creates the invoice.
- 04
Safe handling of money and stock
Dispensing is all-or-nothing and deducts stock, and invoices are voided rather than deleted.
- 05
Ready to deploy and extend
Docker Compose with a migrate profile, a first-admin bootstrap from environment variables, a committed package-lock.json, a CI workflow, and layered code (routes, services, validators) with a CLAUDE.md guide.
Patients
- Registration and search by name or phone
- Unique patient code
- blood group
- allergies and status (active
- follow-up
- inactive)
- Profile with visits
- prescriptions
- lab results and invoices
- Soft delete that preserves history
Appointments
- Booking by doctor
- service and time slot
- Check-in
- edit and cancel
- Statuses: scheduled
- checked-in
- in consult
- completed
- cancelled
- no-show
- Per-day and per-doctor filters
Live Queue
- Ticket numbers issued on check-in
- One lane per doctor
- Call next
- finish and send back actions
- Full-screen display board
- Lanes refresh automatically every 10 seconds
Consultation / EMR
- Vitals
- complaint
- diagnosis and notes
- Prescription builder and lab orders saved in one transaction
- Saving closes the visit and creates the invoice
- Doctors see only patients they have booked or treated
- and only their own prescriptions and lab reports
- Printable prescription
Pharmacy
- Medicine catalogue with low-stock and expiring-soon (within 60 days) alerts
- Restock with stock movement history
- Prescription dispense queue that deducts stock all-or-nothing
Laboratory
- Orders created from consultations
- Result entry with
normal/high/lowflags - Printable lab reports
Billing
- Invoices with discount and tax
- Partial payments and balance tracking
- Payment methods: cash
- card
- mobile banking
- insurance
- Unpaid invoices without payments can be voided instead of deleted
- Printable invoices
Reports & Dashboard
- Revenue
- appointments per doctor
- top services and patients by gender (7 or 14 days)
- CSV export of invoices and patients with formula-injection protection
- Dashboard with SVG charts and notifications
Team, Settings & Security
- Admin
- Doctor
- Receptionist
- Nurse
- Pharmacist
- Lab technician and Accountant roles
- User management that protects the last administrator
- bcrypt passwords
- signed httpOnly session cookies
- login rate limiting (8 attempts per 15 minutes
- in-memory)
- Audit log
- dark mode and command palette (Ctrl+K)
| Language | Version | Framework | Used for | Share of code |
|---|---|---|---|---|
| TypeScript | — | — | Front-end | 37.8% |
| TypeScript (React) | — | — | Front-end | 31.8% |
| SQL | — | — | Database | 21.7% |
| HTML | — | — | Front-end | 5% |
| CSS | — | — | Styling | 2.9% |
| Shell | — | — | Scripts | 0.9% |
- Primary language
- TypeScript 5.9 on Node.js 22.12+
- Framework
- Next.js 15.5.29 (App Router) + React 19.1.10
- Database
- PostgreSQL 16 (postgres:16-alpine image) via Prisma 6.19.3
- Authentication
- Signed JWT session cookie (jose), httpOnly, bcrypt password hashes, role-based permissions per API route
- Licence
- Single-site
- Screens
- 18
- Database tables
- 18
- Supported languages
- English, Bangla, Arabic; Arabic is right-to-left
- Browser support
- Modern evergreen browsers; no browser test matrix is included in the digest
| Minimum | Recommended | |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 2 GB | 4 GB |
| OS | Linux with Docker (node:22-alpine, postgres:16-alpine) or Node.js 22.12+ on a VPS, PostgreSQL 16 | Linux with Docker (node:22-alpine, postgres:16-alpine) or Node.js 22.12+ on a VPS, PostgreSQL 16 |
| Est. monthly hosting | $15 | $15 |
``` cp .env.example .env # set POSTGRES_PASSWORD, AUTH_SECRET, ADMIN_EMAIL, ADMIN_PASSWORD in .env docker compose up -d --build ``` Open http://SERVER-IP:3000 and sign in with the admin you chose, then remove ADMIN_PASSWORD from .env. Upgrade an existing database: ``` docker compose --profile tools run --rm migrate ```
``` cd "Node Project" cp .env.example .env # set DATABASE_URL, AUTH_SECRET, ADMIN_EMAIL, ADMIN_PASSWORD, COOKIE_SECURE psql -U clinvexa clinvexa -f ../database/schema.sql bash scripts/install-clean.sh npm run build npm start ``` Put Nginx with HTTPS in front and set COOKIE_SECURE="true". Full steps, upgrade baseline and backups: HowToSetup.md.
Quality report
Manually reviewedHow to read the quality report
What this is. Every project on Vibe96 goes through an automated audit of its source code before a reviewer in Dubai checks it by hand. The score is out of 100; 75 is the minimum to be listed, and any single failing check blocks a listing regardless of the score.
- Security
- No real credentials in the code, every data-changing route protected, admin areas role-gated, no SQL built from user input.
- Code structure
- A developer can navigate and extend it: clear module boundaries, no giant files, little copy-paste.
- Docs & completeness
- The setup guide, example config, schema and required files the builder committed to are actually in the archive.
- Dependency health
- Packages pinned, no known critical vulnerabilities, no abandoned libraries in production paths.
- Build & deploy
- A clean machine can restore, build and start it by following the shipped instructions.
Warnings are problems that didn't block the listing; they stay visible here until a later version clears them. The audit reads the code — it does not run it — so always try the live demo before you buy. Lines of code are counted from the same audited archive.
Reviewer notes (3 minor)
No real credentials found; demo logins and seed data ship known weak passwords; no lockfile shipped; caret ranges only; dependency versions look current with no known critical cves; mostly reproducible; lockfile absent, config split across two env files, setup doc unverified; prisma-only access with scoped deletes; schema partly unverified and has fk index gaps; auth design looks sound, but route handlers were not visible so per-route guards and ownership cannot be verified. None of these stop the software from working; the developer has been told and improvements come in a future update.
Versions & updates
No updates yet. New versions appear here with a changelog.
Buyers receive updates free for 1 year.
What you get
- </>Full source codeThe complete audited source, delivered as a download from your account. No obfuscation.
- ▤DocumentationSetup guide, architecture notes, CLAUDE.md and AGENTS.md.
- ↻One year of updatesEvery new version the builder publishes, free for 12 months.
- ♧30 days of supportInstallation and defect support through Vibe96 tickets.