A full-stack, enterprise-grade Hospital Management System (MVP) built specifically designed with role-based access logic for both Administrators and Clinical Doctors.
- Framework: Next.js 14 (App Router)
- Database ORM: Prisma
- Database: PostgreSQL
- Styling: Tailwind CSS
- Authentication: Custom JWT HttpOnly cookies with
jose+bcryptjs - Icons:
react-icons
- Secure Role-Based Workflows: Separate, secure application layers mapped directly to user authorization (ADMIN vs. DOCTOR).
- Patient Management: Full CRUD capability for patient records. Read-only permissions for doctors; creation and deletion isolated strictly to Admins.
- Doctor Registration: Administrators can onboard clinical staff directly into the platform.
- Clinic Appointments: Create, list, schedule, and assign cross-functional medical appointments using patient-doctor assignments.
- Digital Medical Records: Secure entry interface specifically for clinics and recorded encounters. Includes tracking logic to verify diagnosis, prescriptions, and custom medical notes interactively.
First, make sure you configure your .env connection correctly locally:
DATABASE_URL="postgresql://postgres:REPLACE_URL_HERE?schema=public"
JWT_SECRET="YOUR_SECURE_JWT_STRING"Then, initialize and seed your database structure:
# Install packages
npm install
# Push Prisma Database Map
npx prisma db push
# Generate Prisma Types
npx prisma generate
# Seed Database with Dummy Data
npx prisma db seedFinally, launch the local development server:
npm run devThe application will be running natively at http://localhost:3000.
For testing, use the following credentials provided by the initial database seed:
Admin Access:
- Email:
admin@hospito.com - Password:
admin123
Doctor Access:
- Email:
doctor@hospito.com - Password:
doctor123
MIT License