A comprehensive, AI-powered dental hospital management system built with Next.js 16, designed for dental clinics and multi-branch hospital chains in India. Includes GST-compliant billing, Razorpay/PhonePe/Paytm payments, patient portal, tele-dentistry, 16 AI skills, and more — completely free and open source.
Looking for dental practice management software in India? DentalERP is a free alternative to expensive proprietary dental software. Self-host it on your own server with full control over your patient data.
- Patient Management — Records, medical history, dental charting, document uploads
- Appointment Scheduling — Calendar view, slot management, reminders, no-show prediction
- Treatment Plans — Treatment tracking, procedure catalog, AI-assisted treatment advice
- Billing & Invoicing — GST-compliant invoicing, payment tracking, payment plans (EMI)
- Prescriptions — Digital prescriptions, medication database, print/PDF export
- Inventory Management — Stock tracking, low-stock alerts, AI-powered demand forecasting
- Lab Integration — Lab order management, status tracking, work coordination
- Staff Management — Roles & permissions, attendance, doctor schedules
- AI Skills (16 built-in) — Treatment advisor, smart scheduler, billing agent, patient intake, inventory forecaster, cashflow forecaster, patient segmentation, claim analyzer, consent generator, dynamic pricing, and more
- Patient Portal — Online booking, medical records access, digital intake forms
- Insurance & Claims — Insurance verification, claim submission, auto-adjudication
- CRM & Loyalty — Patient segmentation, loyalty points, referral tracking
- Communications — SMS/Email/WhatsApp messaging, campaign management, marketing automation
- Tele-Dentistry — Video consultations via Jitsi Meet integration
- Sterilization Tracking — Instrument management, sterilization logs, compliance reporting
- Dental Imaging — Interactive SVG dental arch viewer with condition mapping
- IoT Device Integration — Medical device data logging and monitoring
- Payment Gateways — Razorpay, PhonePe, Paytm integration (encrypted credentials)
- Reports & Analytics — Revenue, appointments, treatment stats, exportable to Excel
- Audit Logging — Full audit trail for compliance
- Multi-branch Support — Hospital-scoped data isolation via NextAuth
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Database | MySQL 8 via Prisma 5 ORM |
| Auth | NextAuth v5 (beta) with credentials provider |
| UI | Tailwind CSS 3 + Radix UI + shadcn/ui |
| Charts | Recharts |
| Forms | React Hook Form + Zod validation |
| AI | OpenRouter (multi-model gateway) |
| Nodemailer (SMTP) | |
| Testing | Vitest + Playwright + Testing Library |
| CI/CD | GitHub Actions |
- Node.js 20 or later
- MySQL 8.0 or later
- npm 10 or later
Make sure MySQL is running before you start:
# Verify MySQL is accessible
mysql -u root -p -e "SELECT 1"
# Create the database
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS dental_erp"git clone https://github.com/abinauv/dental-erp.git
cd dental-erpnpm installcp .env.example .envEdit .env with your database credentials and other settings. See Environment Variables for details.
# Push the schema to your MySQL database
npx prisma db push
# Seed with sample data (optional)
npx prisma db seednpm run devOpen http://localhost:3000 in your browser.
| Role | Password | |
|---|---|---|
| Super Admin | admin@demo-dental.com |
Admin@123 |
Warning: Change the default password immediately in production.
See .env.example for all available variables. Key ones:
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | MySQL connection string |
NEXTAUTH_URL |
Yes | App URL (e.g., http://localhost:3000) |
NEXTAUTH_SECRET |
Yes | Random secret for session encryption |
ENCRYPTION_KEY |
Yes | 64-char hex string for AES-256-GCM encryption |
CRON_SECRET |
Yes | Secret for securing cron job endpoints |
OPENROUTER_API_KEY |
No | Required for AI features |
SMTP_HOST / SMTP_USER / SMTP_PASSWORD |
No | Required for email features |
SMS_API_KEY |
No | Required for SMS features |
npm run dev # Start development server
npm run build # Production build
npm run start # Start production server
npm run lint # Run ESLint
npm run test # Run unit/integration tests (Vitest)
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
npm run test:e2e # Run end-to-end tests (Playwright)
npm run test:all # Run all tests
# Database
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to database
npm run db:migrate # Run migrations (development)
npm run db:seed # Seed sample data
npm run db:studio # Open Prisma Studio (DB GUI)dental-erp/
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages (login, signup, etc.)
│ ├── (dashboard)/ # Dashboard pages (all modules)
│ └── api/ # API routes
├── components/ # Reusable React components
│ ├── layout/ # Dashboard shell, sidebar, header
│ ├── ui/ # shadcn/ui components
│ └── imaging/ # Dental imaging components
├── config/ # App configuration (navigation, etc.)
├── lib/ # Utilities, helpers, AI skills
│ ├── ai/ # AI skill definitions
│ ├── api-helpers.ts # Auth & API utilities
│ └── prisma.ts # Prisma client singleton
├── prisma/
│ ├── schema.prisma # Database schema
│ └── seed.ts # Database seeder
├── __tests__/ # Test files
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests (API routes)
│ ├── components/ # Component tests
│ ├── e2e/ # Playwright E2E tests
│ └── accessibility/ # Accessibility tests
├── .github/
│ └── workflows/ci.yml # CI pipeline
└── public/ # Static assets
The project has comprehensive test coverage:
- Unit tests — Business logic, utilities, AI skills
- Integration tests — API route handlers with mocked Prisma
- Component tests — React components with Testing Library
- E2E tests — Full user flows with Playwright
- Accessibility tests — WCAG 2.1 compliance with axe-core
# Run all unit/integration tests
npm test
# Run with coverage
npm run test:coverage
# Run E2E tests (requires running server)
npm run test:e2edocker build -t dental-erp .
docker run -p 3000:3000 --env-file .env dental-erpnpm run build
npm start- Node.js 20+
- MySQL 8.0+ (with a dedicated database)
- Reverse proxy (nginx/Caddy) for HTTPS in production
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
If you discover a security vulnerability, please follow our Security Policy. Do not open a public issue for security vulnerabilities.
This project is licensed under the MIT License — see the LICENSE file for details.
- Next.js by Vercel
- Prisma for database ORM
- shadcn/ui for UI components
- Radix UI for accessible primitives
- OpenRouter for AI model access