A comprehensive web application for managing dental practices, built with Next.js 15, TypeScript, and modern web technologies.
- User Registration & Login - Secure authentication with NextAuth.js
- Role-Based Access Control - Four user roles: ADMIN, DENTIST, STAFF, PATIENT
- Session Management - JWT-based authentication
- Password Security - Bcrypt password hashing
- Protected Routes - Middleware-based route protection
- Patient registration with comprehensive personal information
- Medical history tracking
- Allergy and medication records
- Insurance information management
- Emergency contact details
- Quick patient search and filtering
- Appointment booking and scheduling
- Real-time availability checking
- Appointment status management (Pending, Confirmed, Completed, Cancelled)
- Calendar view for appointments
- Easy rescheduling and cancellation
- Appointment reminders (Email notifications)
- Dedicated dashboard for dentists and staff
- Daily and weekly appointment views
- Patient details and medical history access
- Appointment management (approve/reject/complete)
- Treatment notes and documentation
- Admin dashboard with practice metrics
- User account management
- Role assignment and permissions
- Practice settings configuration
- Appointment settings (working hours, slot duration)
- System-wide oversight
- Landing page with feature highlights
- About page with mission and benefits
- Services page detailing platform features
- Contact page with inquiry form
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI component library
- React Hook Form - Performant form handling
- Zod - Schema validation
- Next.js API Routes - Serverless API endpoints
- Prisma ORM - Type-safe database ORM
- PostgreSQL - Relational database
- NextAuth.js v5 - Authentication solution
- bcryptjs - Password hashing
- ESLint - Code linting
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixing
- Node.js 18+ installed
- PostgreSQL database (local or cloud-hosted)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/ignatius22/Dentify.git cd Dentify -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/dentify?schema=public" # NextAuth NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key-here-generate-with-openssl-rand-base64-32" # Email (Resend) RESEND_API_KEY="your-resend-api-key" EMAIL_FROM="noreply@yourdomain.com"
-
Generate Prisma Client
npx prisma generate
-
Run database migrations
npx prisma db push
-
Seed the database (optional)
npx prisma db seed
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
- User authentication and profile information
- Role-based access (ADMIN, DENTIST, STAFF, PATIENT)
- One-to-one relationships with Patient and Dentist models
- Personal information (name, DOB, contact details)
- Medical history, allergies, medications
- Insurance information
- Emergency contacts
- One-to-many relationship with Appointments and TreatmentNotes
- Professional information
- Specialty and license details
- One-to-many relationship with Appointments and TreatmentNotes
- Appointment scheduling information
- Status tracking (PENDING, CONFIRMED, COMPLETED, CANCELLED)
- Links patients with dentists
- One-to-many relationship with TreatmentNotes
- Diagnosis and treatment documentation
- Prescription records
- Links to appointments, patients, and dentists
- Practice-wide configuration
- Working hours and appointment slot duration
dentify/
βββ src/
β βββ app/ # Next.js App Router
β β βββ (auth)/ # Authentication routes
β β β βββ login/
β β β βββ register/
β β β βββ error/
β β βββ dashboard/ # Protected dashboard
β β βββ about/ # Public pages
β β βββ services/
β β βββ contact/
β β βββ api/ # API routes
β β β βββ auth/
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Landing page
β β βββ globals.css # Global styles
β βββ components/
β β βββ ui/ # Reusable UI components
β βββ lib/
β β βββ auth.ts # NextAuth configuration
β β βββ prisma.ts # Prisma client
β β βββ utils.ts # Utility functions
β βββ types/ # TypeScript type definitions
β βββ middleware.ts # Route protection middleware
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ .env.example # Environment variables template
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project dependencies
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
- Registration: Users create an account with email and password
- Login: Credentials are verified against hashed passwords in the database
- Session: JWT tokens are generated and stored in secure HTTP-only cookies
- Authorization: Middleware checks user role and protects routes accordingly
- Logout: Session tokens are cleared and user is redirected
- PATIENT: Access to personal appointments, medical records, and booking
- DENTIST/STAFF: Access to patient management, appointments, and treatment notes
- ADMIN: Full access to all features, user management, and practice settings
- Push your code to GitHub
- Import the project in Vercel
- Configure environment variables
- Deploy
Ensure all environment variables from .env.example are configured in your deployment platform.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- All passwords are hashed using bcrypt
- JWT tokens are stored in HTTP-only cookies
- Role-based middleware protects sensitive routes
- Input validation using Zod schemas
- SQL injection protection via Prisma ORM
- Email notifications for appointments
- SMS reminders
- Payment processing integration
- Advanced reporting and analytics
- Multi-language support
- Mobile app (React Native)
- Video consultation integration
- Document upload and management
- Billing and invoicing system
This project is licensed under the MIT License.
For support, email support@dentify.com or open an issue in the GitHub repository.
- Next.js team for the amazing framework
- shadcn for the beautiful UI components
- Prisma team for the excellent ORM
- NextAuth.js for authentication solution