A comprehensive, web-based Visitor Management System designed to streamline the process of tracking visitors, managing entries, and enhancing security for offices, factories, and institutions.
- Visitor Entry: Easy-to-use form to register new visitors (Name, Mobile, Purpose, Meet Person).
- Photo Capture: Integrated camera support to capture visitor photos directly from the browser.
- ID Document Upload: Support for uploading ID proofs (JPG, PNG, PDF).
- Visitor Checkout: Simple interface to mark visitors as checked out.
- Real-time Status: View current visitor status.
- Dashboard: Overview of pending, approved, and rejected visitors.
- Approval Workflow: Approve or reject visitor entries with reasons.
- Pre-scheduling: Schedule visits in advance.
- Visitor History: View complete logs of all past visits.
- Export Data: Export visitor data to CSV for reporting.
- Notification Management: Manage push notification subscriptions.
- SMS Notifications: Configurable SMS alerts (currently in Log mode for dev).
- Push Notifications: Service Worker implementation for real-time alerts.
- Secure File Handling: Unique filenames, validation, and storage outside the DB.
- Responsive Design: Works on Desktop and Mobile devices.
- Frontend: HTML5, CSS3, JavaScript (Vanilla), Service Workers
- Backend: PHP (Native)
- Database: MySQL
- Server: Apache (via XAMPP/WAMP)
- XAMPP (or WAMP/MAMP) installed.
- Web Browser with camera permissions allowed (Chrome/Edge recommended).
- Navigate to your XAMPP
htdocsdirectory (e.g.,C:\xampp\htdocs). - Create a folder named
vms. - Copy all project files into
C:\xampp\htdocs\vms.
- Open phpMyAdmin (
http://localhost/phpmyadmin). - Create a new database named
visitor_management(or simply import the SQL file which handles this). - Import the
database.sqlfile located in the project root.- Click Import tab.
- Choose File ->
database.sql. - Click Go.
- (Optional) Run
migration_add_photos.sqlif you are upgrading or ifdatabase.sqldoes not include photo columns (check the file content).
Verify the settings in includes/db_connect.php:
$host = 'localhost';
$db = 'visitor_management';
$user = 'root';
$pass = ''; // Default XAMPP passwordEnsure the following directories exist and have write permissions:
uploads/photos/uploads/documents/
- URL:
http://localhost/vms/guard/entry.html - Login:
guard1/password(if auth is enabled for this page) - Action: Fill details, take photo, and submit.
- URL:
http://localhost/vms/hr/login.html - Login:
- Username:
admin - Password:
password
- Username:
- Action: View dashboard, approve/reject requests, view history.
vms/
├── api/ # PHP API endpoints (CRUD operations)
├── guard/ # Guard interface (Entry form, index)
├── hr/ # HR/Admin interface (Dashboard, Login)
├── includes/ # Shared PHP files (DB connect, functions)
├── uploads/ # Stored visitor photos and documents
├── database.sql # Main database schema
├── sw.js # Service Worker for notifications
└── index.php # Main entry point (redirects/landing)
- Camera not working: Ensure you are accessing via
localhostorhttps. Browsers block camera access on insecurehttpconnections (except localhost). - File Upload Error: Check if
uploads/folder exists and has write permissions. - Database Connection Error: Verify credentials in
includes/db_connect.php. - Notifications not appearing: Ensure you have clicked "Subscribe to Notifications" and allowed browser permissions.
MIT License