A comprehensive clinic management system built with NestJS (backend) and Next.js (frontend) featuring JWT authentication, appointment scheduling, patient management, and queue management.
- JWT Authentication with secure token management
- User Registration & Login with role-based access
- Password Hashing using bcryptjs
- Protected API Endpoints with JWT guards
- Admin & Staff Roles with different permissions
- User Registration with complete profile information
- Role-based Access Control (Admin/Staff)
- User Profile Management
- Secure Logout with token cleanup
- Doctor Management: Add, edit, delete doctors with specialties, locations, and availability
- Patient Management: Comprehensive patient records with search functionality
- Appointment Scheduling: Book, reschedule, cancel, and complete appointments
- Queue Management: Real-time queue with priority handling and status updates
- Time Slot Management: Dynamic availability checking
- Real-time Dashboard with key metrics
- Appointment Statistics
- Queue Status Monitoring
- Doctor Availability Tracking
- NestJS - Progressive Node.js framework
- TypeScript - Type-safe development
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- Passport - Authentication middleware
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Beautiful icons
- Client-side Rendering - Optimized for performance
clinic-front-desk-system/
βββ backend/ # NestJS Backend API
β βββ src/
β β βββ auth/ # Authentication module
β β βββ user/ # User management
β β βββ doctor/ # Doctor management
β β βββ patient/ # Patient management
β β βββ appointment/ # Appointment scheduling
β β βββ queue/ # Queue management
β βββ package.json
βββ frontend/ # Next.js Frontend
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # Reusable components
β βββ package.json
βββ README.md
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd clinic-front-desk-system
-
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install -
Start Backend Server
cd backend npm run start:devBackend will run on: http://localhost:3001
-
Start Frontend Server
cd frontend npm run devFrontend will run on: http://localhost:3000
- Username:
admin - Password:
admin123 - Role:
admin
-
Prepare for Deployment
cd frontend npm run build -
Deploy to Vercel
- Push your code to GitHub
- Connect your GitHub repository to Vercel
- Configure environment variables
- Deploy!
-
Prepare for Deployment
cd backend npm run build -
Deploy to Railway/Render
- Connect your GitHub repository
- Configure environment variables
- Deploy!
NEXT_PUBLIC_API_URL=https://your-backend-url.comJWT_SECRET=your-super-secret-jwt-key
PORT=3001
NODE_ENV=productionPOST /auth/register- User registrationPOST /auth/login- User loginPOST /auth/logout- User logoutPOST /auth/profile- Get user profile
GET /doctors- Get all doctorsPOST /doctors- Create doctorPATCH /doctors/:id- Update doctorDELETE /doctors/:id- Delete doctor
GET /patients- Get all patientsPOST /patients- Create patientPATCH /patients/:id- Update patientDELETE /patients/:id- Delete patient
GET /appointments- Get all appointmentsPOST /appointments- Create appointmentPATCH /appointments/:id/reschedule- Reschedule appointmentPATCH /appointments/:id/cancel- Cancel appointmentPATCH /appointments/:id/complete- Complete appointment
GET /queue- Get queue statusPOST /queue- Add to queuePATCH /queue/:id/status- Update queue statusDELETE /queue/:id- Remove from queue
- Secure token-based authentication
- Role-based access control
- Automatic token refresh
- Secure logout with token cleanup
- Dynamic time slot availability
- Doctor-specific scheduling
- Status tracking (scheduled, completed, cancelled)
- Rescheduling and cancellation
- Priority-based queue system
- Real-time status updates
- Estimated wait times
- Automatic queue numbering
- Comprehensive patient profiles
- Search and filter functionality
- Medical history tracking
- Contact information management
- Set up environment variables
- Configure CORS for production domains
- Set up database (if needed)
- Configure JWT secrets
- Set up SSL certificates
- Configure logging
- Set up monitoring
- Test all endpoints
- Verify authentication flow
- Test responsive design
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.
For support, email your-email@example.com or create an issue in the repository.
Built with β€οΈ for modern clinic management