Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

989 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦷 RMDC Dental Clinic Management System

RMDC Logo

A comprehensive dental clinic management system built with Laravel 11

Laravel PHP MySQL Tailwind


πŸ“‹ Table of Contents


🎯 About

Robles Moncayo Dental Clinic (RMDC) Management System is a full-featured web application designed to streamline dental clinic operations. It provides comprehensive appointment management, patient records, inventory tracking, payment processing, and real-time notifications.

πŸ₯ Clinic Information

  • Main Clinic: Unit F Medina Bldg, Niog Elementary School, Bacoor, Cavite
  • Operating Hours: Mon-Sat: 7:00 AM - 2:00 PM
  • Branch Clinic: Marigold corner Hyacinth Sts, F E De Castro Village, Bacoor, Cavite
  • Operating Hours: Mon-Sat: 3:00 PM - 8:00 PM | Sunday: 1:00 PM - 8:00 PM

✨ Features

πŸ‘₯ Patient Features

  • βœ… User registration and authentication (email + Google/Facebook OAuth)
  • βœ… Online appointment booking with calendar view
  • βœ… 25% down payment system (GCash, PayMaya, Card) via PayMongo
  • βœ… 20% refund if appointment is declined by admin
  • βœ… Double-booking prevention (one pending/accepted appointment at a time)
  • βœ… Real-time appointment status tracking
  • βœ… Digital teeth layout visualization
  • βœ… Dental records management
  • βœ… Service feedback and ratings
  • βœ… In-app messaging with admin (MongoDB-backed)
  • βœ… Notification bell with refund and status updates
  • βœ… Appointment history, cancellation, and reschedule requests

πŸ₯ Admin Features

  • βœ… Comprehensive admin dashboard
  • βœ… Appointment management (Accept/Decline with automatic refund)
  • βœ… Separate Cancellation Requests page and Reschedule Requests page
  • βœ… Patient records management
  • βœ… Inventory tracking system
  • βœ… Procedure pricing management
  • βœ… Revenue and analytics reports
  • βœ… Real-time notifications via Pusher
  • βœ… Review and feedback moderation

🎨 UI/UX Features

  • βœ… Modern minimalist design
  • βœ… Responsive layout (mobile, tablet, desktop)
  • βœ… Smooth scroll animations
  • βœ… Interactive service cards with expandable descriptions
  • βœ… Click-toggled OAuth security tooltip on login
  • βœ… Modal-based interactions
  • βœ… AJAX pagination
  • βœ… Real-time search and filters

πŸ›  Tech Stack

Backend

  • Framework: Laravel 11.9
  • PHP: 8.2+
  • Database: MySQL 8.0
  • Authentication: Laravel Breeze
  • Real-time: Pusher / Laravel Echo
  • Cache: Redis (optional)
  • Queue: Database/Redis
  • File Storage: Local/S3 compatible

Frontend

  • CSS Framework: Tailwind CSS 3.x
  • JavaScript: Vanilla JS + jQuery
  • Build Tool: Vite 5.x
  • Maps: Leaflet.js
  • Icons: Font Awesome 6.4
  • Fonts: Google Fonts (Poppins)

Third-Party Services

  • Payment: PayMongo API (GCash, PayMaya, Card)
  • AI Chatbot: Groq API (llama-3.3-70b-versatile)
  • Messaging: MongoDB Atlas (messages only)
  • Real-time: Pusher (appointment status & messaging)
  • OAuth: Google + Facebook Login (Laravel Socialite)
  • Captcha: mews/captcha
  • Image Processing: Intervention Image

πŸ“¦ Prerequisites

Before you begin, ensure you have the following installed:

Optional:

  • Redis for caching and queues
  • VS Code with PHP and Laravel extensions

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/LeeDev428/rmdc_dental-clinic-management-system.git
cd rmdc_dental-clinic-management-system

2. Install PHP Dependencies

composer install

3. Install Node Dependencies

npm install

4. Environment Setup

# Copy environment file
copy .env.example .env  # Windows
# OR
cp .env.example .env    # Linux/Mac

# Generate application key
php artisan key:generate

5. Configure Environment Variables

Open .env and update the following:

APP_NAME="RMDC Dental Clinic"
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=rmdc_dental
DB_USERNAME=root
DB_PASSWORD=your_password

# Firebase (See OAUTH_SETUP_GUIDE.md)
FIREBASE_CREDENTIALS=path/to/firebase-credentials.json

# Pusher (Real-time notifications)
PUSHER_APP_ID=your_app_id
PUSHER_APP_KEY=your_app_key
PUSHER_APP_SECRET=your_app_secret
PUSHER_APP_CLUSTER=your_cluster

# Mail (Optional)
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_app_password
MAIL_ENCRYPTION=tls

# Payment (See PAYMONGO_IMPLEMENTATION_GUIDE.md)
PAYMONGO_PUBLIC_KEY=pk_test_xxx
PAYMONGO_SECRET_KEY=sk_test_xxx

# Google OAuth (See OAUTH_SETUP_GUIDE.md)
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT=http://localhost:8000/auth/google/callback

# Captcha
RECAPTCHA_SITE_KEY=your_site_key
RECAPTCHA_SECRET_KEY=your_secret_key

πŸ’Ύ Database Setup

1. Create Database

CREATE DATABASE rmdc_dental CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

2. Run Migrations and Seeders

# Run all migrations
php artisan migrate

# OR run fresh with seeders (includes sample data)
php artisan migrate:fresh --seed

3. Create Storage Symlink

php artisan storage:link

4. Seed Procedure Images (Optional)

See PROCEDURE_IMAGES_GUIDE.md for detailed instructions on setting up procedure images.

# Create procedures directory
New-Item -ItemType Directory -Path "storage\app\public\procedures" -Force

# Copy placeholder images (if available)

▢️ Running the Application

Development Mode

Terminal 1: Laravel Server

php artisan serve
# Access at http://localhost:8000

Terminal 2: Vite Dev Server (for hot reload)

npm run dev

Terminal 3: Queue Worker (for jobs/notifications)

php artisan queue:work

Production Build

# Build frontend assets
npm run build

# Clear caches
php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear

# Optimize
php artisan config:cache
php artisan route:cache
php artisan view:cache

πŸ“ Project Structure

rmdc_dental-clinic-management-system/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/          # All controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminAppointment.php
β”‚   β”‚   β”‚   β”œβ”€β”€ AppointmentController.php
β”‚   β”‚   β”‚   β”œβ”€β”€ WelcomeController.php
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ Middleware/           # Custom middleware
β”‚   β”‚   └── Requests/             # Form requests
β”‚   β”œβ”€β”€ Models/                   # Eloquent models
β”‚   β”‚   β”œβ”€β”€ Appointment.php
β”‚   β”‚   β”œβ”€β”€ User.php
β”‚   β”‚   β”œβ”€β”€ DentalRecord.php
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ Events/                   # Event classes
β”‚   β”œβ”€β”€ Notifications/            # Notification classes
β”‚   └── Providers/                # Service providers
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/               # Database migrations
β”‚   β”œβ”€β”€ seeders/                  # Database seeders
β”‚   └── factories/                # Model factories
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ views/                    # Blade templates
β”‚   β”‚   β”œβ”€β”€ welcome.blade.php    # Landing page
β”‚   β”‚   β”œβ”€β”€ dashboard.blade.php  # User dashboard
β”‚   β”‚   β”œβ”€β”€ admin/               # Admin views
β”‚   β”‚   └── partials/            # Reusable components
β”‚   β”œβ”€β”€ css/                      # Stylesheets
β”‚   └── js/                       # JavaScript files
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ web.php                   # Web routes
β”‚   β”œβ”€β”€ auth.php                  # Authentication routes
β”‚   └── console.php               # Artisan commands
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ img/                      # Public images
β”‚   β”œβ”€β”€ css/                      # Compiled CSS
β”‚   β”œβ”€β”€ js/                       # Compiled JavaScript
β”‚   └── storage/                  # Symlinked storage
β”œβ”€β”€ storage/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   └── public/              # User uploaded files
β”‚   β”‚       β”œβ”€β”€ procedures/      # Procedure images
β”‚   β”‚       β”œβ”€β”€ avatars/         # User avatars
β”‚   β”‚       └── valid_ids/       # ID uploads
β”‚   └── logs/                    # Application logs
└── tests/                        # PHPUnit tests

πŸ“š Key Features Documentation

πŸ—“ Appointment System

User Flow:

  1. Browse services on welcome page
  2. Click "Book Appointment" button
  3. Fill appointment modal with:
    • Procedure selection
    • Date and time
    • Valid ID upload
  4. Select payment method (optional 20% down payment)
  5. Submit and wait for admin approval

Admin Flow:

  1. View pending appointments
  2. Click "Details" button to see full information
  3. Accept or decline with reason
  4. System sends notification to patient

Key Files:

  • app/Http/Controllers/AppointmentController.php
  • resources/views/appointments.blade.php
  • resources/views/admin/upcoming_appointments.blade.php

πŸ’³ Payment System

The system supports 3 payment methods:

  • GCash: E-wallet payment
  • PayMaya: E-wallet payment
  • Card: Visa/Mastercard

Implementation:

  • See PAYMONGO_IMPLEMENTATION_GUIDE.md for PayMongo setup
  • 20% down payment calculated automatically
  • Remaining balance tracked in database
  • Payment status: unpaid, partially_paid, fully_paid

πŸ”” Notification System

Firebase Push Notifications:

  • Real-time appointment status updates
  • Admin messages
  • Feedback reminders

Setup:

  1. See OAUTH_SETUP_GUIDE.md for Firebase setup
  2. Configure FIREBASE_CREDENTIALS in .env
  3. Enable FCM in Firebase Console

🦷 Teeth Layout System

Interactive SVG-based teeth layout visualization:

  • 32 adult teeth representation
  • Color-coded status (healthy, cavity, missing, etc.)
  • Quadrant-based organization
  • Click-to-select functionality

Key Files:

  • resources/views/dashboard.blade.php (view layout button)
  • JavaScript SVG generation logic

🌐 Dev Tunnel Setup

For remote access and testing with friends, see DEV_TUNNEL_SETUP.md.

Quick Start:

# 1. Add to .env
VITE_HMR_HOST=your-tunnel-url.devtunnels.ms

# 2. Start servers
npm run dev
php artisan serve --host=0.0.0.0

# 3. Create VS Code tunnel (F1 > Dev Tunnels: Turn on)

πŸ”Œ API Endpoints

Public Endpoints

GET  /                         # Welcome page
GET  /get-services             # Fetch services (AJAX pagination)
POST /appointments             # Create appointment
GET  /appointments             # View appointments (auth required)

Admin Endpoints (Protected)

GET  /admin/dashboard          # Admin dashboard
GET  /admin/upcoming-appointments
GET  /admin/appointments/{id}/details  # Get appointment details (AJAX)
POST /admin/appointment/{id}/accept
POST /admin/appointment/{id}/decline
GET  /admin/reviews            # View ratings/feedback
GET  /admin/inventory          # Inventory management

User Endpoints (Auth Required)

GET  /dashboard                # User dashboard
POST /appointments/cancel      # Cancel appointment
POST /feedback/submit          # Submit service feedback
GET  /messages                 # View admin messages

πŸ§ͺ Testing

# Run all tests
php artisan test

# Run specific test
php artisan test --filter AppointmentTest

# With coverage
php artisan test --coverage

πŸ› Troubleshooting

Common Issues

1. 403 Forbidden on Images

php artisan storage:link
# Verify public/storage symlink exists

2. jQuery is not defined

  • Ensure jQuery is loaded before custom scripts
  • Check welcome.blade.php has jQuery CDN link

3. CSS Not Loading on Dev Tunnel

npm run build
php artisan config:clear

4. Database Connection Error

  • Check .env database credentials
  • Verify MySQL service is running
  • Test connection: php artisan migrate:status

5. Pusher Not Working

  • Verify Pusher credentials in .env
  • Check browser console for connection errors
  • Enable Pusher in config/broadcasting.php

6. Payment Errors

  • See PAYMONGO_IMPLEMENTATION_GUIDE.md
  • Verify API keys (test vs production)
  • Check PayMongo dashboard for webhook logs

Clear All Caches

php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear
composer dump-autoload
npm run build

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Follow PSR-12 coding standards
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Write tests for new features

πŸ“„ License

This project is open-sourced software licensed under the MIT license.


πŸ‘¨β€πŸ’» Developer

Developed by: LeeDev428
Repository: github.com/LeeDev428/rmdc_dental-clinic-management-system


πŸ“ž Support

For support, please:

  • Open an issue on GitHub
  • Check existing documentation files:
    • OAUTH_SETUP_GUIDE.md
    • PAYMONGO_IMPLEMENTATION_GUIDE.md
    • DEV_TUNNEL_SETUP.md
    • PROCEDURE_IMAGES_GUIDE.md

πŸ™ Acknowledgments

  • Laravel Framework Team
  • Tailwind CSS Team
  • All open-source contributors

Made with ❀️ for Robles Moncayo Dental Clinic

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

Robles Moncayo Dental Clinic (RMDC) Management System is a full-featured web application designed to streamline dental clinic operations. It provides comprehensive appointment management, patient records, inventory tracking, payment processing, and real-time notifications.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages