# IoT Poultry Vaccination Device Management System ## Project Overview A comprehensive integrated platform for managing IoT-enabled and non-IoT poultry vaccination devices with integrated ticketing, analytics, and workflow management for manufacturers, service providers, and vaccine companies. ## Features ### 1. Master Data Management - Device inventory with unique IDs - Customer and hatchery management - Warranty tracking - Device type management (IoT/Non-IoT) ### 2. Comprehensive Ticketing System - Support ticket creation and tracking - SLA management and monitoring - Automatic engineer assignment - Remote resolution capability - Onsite visit workflow with spare parts management - Ticket closure and invoicing ### 3. Analytics Dashboards #### Admin/Manufacturer Dashboard - Device distribution analytics - Customer-wise device sales - Regional trends and performance - Service and cost analytics - Engineer performance KPIs #### Customer Dashboard - Device visibility and status - Usage reports (life-to-date and periodic) - Geographic allocation tracking - Performance analytics #### Helpdesk Dashboard - Ticket queue management - SLA monitoring - Priority-based ticket distribution - Customer communication tracking #### Engineer Dashboard - Assigned ticket management - Service visit scheduling - Performance metrics - Installation tracking ### 4. IoT Data Integration - Real-time device data ingestion - Dosage count tracking - Device usage analytics - Performance monitoring ## Installation & Setup ### Prerequisites - PHP 7.4 or higher - MySQL 5.7 or higher - Web server (Apache/Nginx) - cURL enabled - OpenSSL for password hashing ### Database Setup 1. **Create Database** ```sql CREATE DATABASE u623911375_iot; ``` 2. **Create User** ```sql CREATE USER 'u623911375_iot'@'localhost' IDENTIFIED BY '@Iot2026@'; GRANT ALL PRIVILEGES ON u623911375_iot.* TO 'u623911375_iot'@'localhost'; FLUSH PRIVILEGES; ``` 3. **Initialize Tables and Sample Data** - Navigate to: `http://your-domain/api/setup_database.php` - Click "Create Tables & Insert Sample Data" button - Database will be automatically initialized with sample data ### Configuration 1. **Update Database Connection** in `config/database.php`: ```php define('DB_HOST', 'your-host'); define('DB_USER', 'u623911375_iot'); define('DB_PASS', '@Iot2026@'); define('DB_NAME', 'u623911375_iot'); define('SITE_URL', 'http://your-domain/'); ``` 2. **Create logs directory** (if not exists): ```bash mkdir -p logs chmod 755 logs ``` 3. **Set file permissions**: ```bash chmod 755 uploads/ chmod 755 assets/ ``` ## Project Structure ``` Project/ ├── api/ │ └── setup_database.php # Database initialization ├── assets/ │ ├── css/ │ │ └── style.css # Main stylesheet │ ├── js/ │ │ └── main.js # JavaScript utilities │ └── images/ # Image assets ├── config/ │ ├── database.php # Database configuration │ └── session.php # Session management ├── includes/ │ ├── header.php # Navigation header │ ├── footer.php # Page footer │ └── sidebar.php # Role-based sidebar ├── pages/ │ ├── admin_dashboard.php # Admin/Manufacturer dashboard │ ├── customer_dashboard.php # Customer dashboard │ ├── helpdesk_dashboard.php # Helpdesk dashboard │ ├── engineer_dashboard.php # Engineer dashboard │ ├── new_ticket.php # Ticket creation │ ├── device_details.php # Device information │ └── ... # Other pages ├── uploads/ # File uploads directory ├── logs/ # Application logs ├── login.php # Login page ├── logout.php # Logout handler ├── dashboard.php # Role-based redirect └── index.php # Home page ``` ## User Roles & Access ### 1. Admin - Complete system access - Device management - User management - Analytics and reporting - System configuration **Demo Login:** - Username: `admin` - Password: `admin123` ### 2. Helpdesk - Create and manage support tickets - Customer communication - Engineer assignment - SLA monitoring - Approval workflow **Demo Login:** - Username: `helpdesk1` - Password: `helpdesk123` ### 3. Engineer - View assigned tickets - Schedule and manage service visits - Update ticket resolution - Submit service reports - Track installations **Demo Login:** - Username: `engineer1` - Password: `engineer123` ### 4. Customer - View owned devices - Submit support requests - View usage analytics - Download reports - Track service tickets **Demo Login:** - Username: `customer1` - Password: `customer123` ### 5. Accounts - Invoice management - Billing records - Service cost tracking - Payment records **Demo Login:** - Username: `accounts1` - Password: `accounts123` ## Sample Data The system comes pre-loaded with: - 3 active customers - 5 devices (mix of IoT and Non-IoT) - 4 support tickets - 5 spare parts - Sample IoT data for last 30 days ## Database Tables 1. **users** - System users with role-based access 2. **customers** - Vaccine company details 3. **devices** - Device inventory with status tracking 4. **iot_data** - Real-time IoT sensor data 5. **support_tickets** - Service request tracking 6. **spare_parts** - Inventory management 7. **ticket_parts** - Parts used in each service 8. **service_visits** - Onsite visit management 9. **installation_requests** - Device installation tracking 10. **sla_rules** - SLA configuration ## Key Features by Role ### Admin Features ✅ Real-time device analytics ✅ Customer performance metrics ✅ Service cost analysis ✅ Regional trend analysis ✅ Engineer KPI tracking ✅ Warranty management ✅ System configuration ### Helpdesk Features ✅ Ticket creation and assignment ✅ SLA monitoring ✅ Engineer scheduling ✅ Customer communication ✅ Approval workflow ✅ Priority-based queue management ### Engineer Features ✅ Ticket assignment tracking ✅ Service visit scheduling ✅ Remote resolution capability ✅ Onsite visit management ✅ Report submission ✅ Installation tracking ✅ Performance metrics ### Customer Features ✅ Device inventory view ✅ Usage analytics ✅ Support ticket submission ✅ Service history ✅ Performance reports ✅ Geographic device mapping ## SLA Configuration Default SLA times: - **Critical Priority**: Response within 2 hours - **High Priority**: Response within 6 hours - **Medium Priority**: Response within 24 hours - **Low Priority**: Response within 48 hours Ticket logged before 12 PM: Call within 6 hours same day Ticket logged after 12 PM: Call within next working day ## API Endpoints (Future Enhancement) The system is designed to support REST APIs for: - Device data submission - Real-time IoT data ingestion - Mobile app integration - Third-party system integration - Analytics data export ## Security Features ✅ Role-based access control (RBAC) ✅ Password hashing (bcrypt) ✅ Session management with timeout ✅ SQL injection prevention (prepared statements) ✅ XSS protection (HTML escaping) ✅ CSRF token support (ready for implementation) ✅ Audit logging capability ## Workflow Diagrams ### Support Ticket Workflow 1. Helpdesk logs ticket 2. System auto-generates ticket ID 3. Engineer auto-assignment based on rules 4. Engineer attempts remote resolution 5. If not resolved → Onsite visit required 6. Spare parts sourcing and approval 7. Service completion and invoicing 8. Ticket closure ### Device Installation Workflow 1. New device manufactured 2. Dispatch and delivery tracking 3. Installation request from customer 4. Engineer assignment 5. Installation execution 6. Device activation 7. Warranty start ## Troubleshooting ### Database Connection Issues - Verify credentials in `config/database.php` - Check MySQL service is running - Ensure database user has proper permissions - Check firewall settings ### Login Issues - Clear browser cookies - Verify user status is 'active' - Check password format (case-sensitive) - Review session.php configuration ### Permission Issues - Ensure `uploads/` and `logs/` directories are writable - Check file permissions (chmod 755) - Verify PHP user has access ## Future Enhancements 1. REST API endpoints 2. Mobile application 3. Email/SMS notifications 4. Advanced reporting (Power BI integration) 5. Machine learning for predictive maintenance 6. IoT real-time data visualization 7. Multi-language support 8. Payment gateway integration ## Support & Maintenance For issues or feature requests, contact the development team. ### Regular Maintenance Tasks - Database backups (daily) - Log file cleanup (weekly) - Performance optimization (monthly) - Security updates (as needed) ## License & Terms This system is proprietary and confidential. All rights reserved. --- **Version:** 1.0 **Last Updated:** January 2026 **System Status:** Production Ready