A comprehensive web-based application for tracking and managing quality control processes in manufacturing and production environments.
Quality Control Tracker is a PHP-based web application designed to help organizations record, monitor, and analyze quality control inspections. The system provides a centralized platform for tracking product quality, identifying trends, and generating reports to support continuous improvement initiatives.
- Inspection Records: Create, view, edit, and manage detailed QC inspection records
- Pass/Fail Tracking: Record inspection results with comprehensive notes
- Batch Management: Track quality metrics by batch numbers
- Advanced Filtering: Find records by product, date range, status, and more
- Visual Dashboard: Get an at-a-glance view of key quality metrics
- Pass Rate Analysis: Track pass/fail rates over time with visual charts
- Product Performance: Compare quality metrics across different products
- Data Export: Export records and reports to CSV format for further analysis
- Role-Based Access: Three permission levels (Admin, Manager, Inspector)
- User Administration: Add, edit, and manage user accounts
- Secure Authentication: Password-protected access with encrypted storage
- Product Catalog: Maintain a database of products subject to quality control
- Categorization: Organize products by category for easier management
- Status Control: Activate/deactivate products without losing historical data
- System Settings: Configure application parameters
- Activity Logging: Track user actions for accountability
- Data Backup: Export system data for backup purposes
- PHP 7.4+: Server-side scripting language
- MySQL 5.7+: Relational database management system
- PDO/MySQLi: Database abstraction and prepared statements
- PHP Sessions: User authentication and state management
- HTML5: Semantic markup structure
- CSS3: Custom styling with responsive design principles
- JavaScript: Client-side interactivity and validation
- Pure Vanilla Implementation: No frameworks for lightweight performance
- Password Hashing: Secure credential storage using PHP's password_hash()
- Prepared Statements: Protection against SQL injection attacks
- Input Validation: Comprehensive server-side validation
- CSRF Protection: Form security measures
- Web server (Apache, Nginx, etc.)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- mod_rewrite enabled (for clean URLs)
- Git Clone
- git clone name_of_the_repo(link)
- cd name_of_the_repo
- Create a MySQL database
CREATE DATABASE qc_tracker;
- Import the database schema
mysql -u username -p qc_tracker < database.sql
-
Configure database connection
-
Edit the
config.php
file with your database credentials:
$db_host = 'localhost';
$db_user = 'your_username';
$db_pass = 'your_password';
$db_name = 'qc_tracker';
-
Set up the admin user
-
Access the setup script via browser:
http://yoursite.com/setup_admin.php
-
This will create an admin user with credentials:
-
Username: admin
-
Password: admin
-
Important: Delete the setup_admin.php file after creating the admin user
-
Set proper permissions
chmod 755 -R /path/to/qc-tracker
chmod 777 -R /path/to/qc-tracker/uploads (if applicable)
-
Access the application
-
Navigate to
http://yoursite.com/qc-tracker/
in your web browser -
Log in with the admin credentials
- Log in as an admin or manager
- Navigate to Product Management
- Click "Add New Product"
- Fill in the product details and save
- Navigate to "Add QC Record"
- Select the product and batch number
- Enter inspection details and set pass/fail status
- Add any relevant notes
- Save the record
- Navigate to the Reports section
- Set date range and other filters as needed
- View the generated reports
- Export to CSV if needed
- Log in as an admin
- Navigate to User Management
- Add, edit, or deactivate users as needed
- Assign appropriate roles based on responsibilities
- Issue: Unable to login with correct credentials
- Solution: Run the setup_admin.php script to reset admin credentials
- Prevention: Ensure password_hash() and password_verify() functions are compatible with your PHP version
- Issue: "Could not connect to database" error
- Solution: Verify database credentials in config.php and ensure MySQL service is running
- Prevention: Test database connection before deployment
- Issue: Page displays blank or server returns 500 error
- Solution: Check PHP error logs and enable error reporting temporarily:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
- Prevention: Implement proper error handling and logging
- session.auto_start = 0
- memory_limit = 128M (minimum)
- max_execution_time = 30 (minimum)
- file_uploads = On (if using file uploads)
The application uses a custom CSS file (styles.css) that can be easily modified to match your organization's branding:
- Colors: Edit the CSS variables at the top of styles.css:
:root {
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
/* other color variables */
}
- Logo: Replace the logo image in the header section of layout files
- Typography: Modify font-family properties in the CSS
To add custom fields to quality control records:
- Modify the database schema in database.sql
- Update the form in add_record.php and edit_record.php
- Adjust the display in view_record.php
- Update the getAllRecords() function in functions.php
- HTTPS: Always use SSL/TLS encryption in production
- Environment Variables: Store sensitive data in environment variables instead of config files
- Regular Updates: Keep PHP and MySQL updated to patch security vulnerabilities
- File Permissions: Set restrictive file permissions (644 for files, 755 for directories)
Implement stronger password requirements by modifying the user creation and editing functions:
- Minimum length (8+ characters)
- Complexity requirements (uppercase, lowercase, numbers, special characters)
- Regular password rotation
- Mobile Application: Native mobile apps for on-the-floor inspections
- API Integration: RESTful API for integration with other systems
- Barcode/QR Scanning: Scan product codes directly into the system
- Advanced Analytics: Statistical process control and trend analysis
- Document Management: Attach technical specifications and procedures to products
qc-tracker/
βββ index.php # Main entry point and dashboard
βββ login.php # User authentication
βββ config.php # Database and application configuration
βββ functions.php # Shared functions and utilities
βββ add_record.php # Create new QC records
βββ records.php # List and filter QC records
βββ view_record.php # Detailed view of a single record
βββ edit_record.php # Modify existing records
βββ reports.php # Generate and display reports
βββ admin.php # Admin dashboard
βββ user_management.php # User administration
βββ add_user.php # Create new users
βββ edit_user.php # Modify user accounts
βββ product_management.php # Product administration
βββ add_product.php # Create new products
βββ edit_product.php # Modify product details
βββ export.php # Data export functionality
βββ setup_admin.php # Initial admin setup (delete after use)
βββ styles.css # Application styling
βββ database.sql # Database schema and initial data
**Q: Is this application suitable for regulated industries (e.g., pharmaceuticals, medical devices)?**A: The basic version provides fundamental QC tracking, but regulated industries may need additional validation and documentation features to meet compliance requirements.
**Q: Can multiple inspectors use the system simultaneously?**A: Yes, the application supports concurrent users with different permission levels.
**Q: Is there a limit to how many records can be stored?**A: The limit depends on your MySQL database configuration and server storage capacity.
**Q: Can I integrate this with our ERP system?**A: The current version doesn't have built-in API integration, but you could develop custom connectors using the database structure.
**Q: Does the application work on mobile devices?**A: The interface is responsive and works on tablets and smartphones, though a dedicated mobile app would provide a better experience for field use.
**Q: Can we host this in the cloud?**A: Yes, the application can be hosted on any server with PHP and MySQL support, including cloud providers.
For support inquiries, feature requests, or bug reports, please:
- Open an issue on the GitHub repository
- Contact the development team at [senior.dev.info@proton.me]
This project is licensed under the MIT License - see the LICENSE file for details.
- PHP - The backbone of our application
- MySQL - Reliable database management
- All contributors who have helped improve this project
Create a MySQL database
CREATE DATABASE qc_tracker;
Import the database schema
mysql -u username -p qc_tracker < database.sql
Configure database connection
- Edit the
config.php
file with your database credentials:
$db_host = 'localhost';
$db_user = 'your_username';
$db_pass = 'your_password';
$db_name = 'qc_tracker';
Set up the admin user
-
Access the setup script via browser:
http://yoursite.com/setup_admin.php
-
This will create an admin user with credentials:
-
Username: admin
-
Password: admin
-
Important: Delete the setup_admin.php file after creating the admin user
Set proper permissions
chmod 755 -R /path/to/qc-tracker
chmod 777 -R /path/to/qc-tracker/uploads (if applicable)
Access the application
- Navigate to
http://yoursite.com/qc-tracker/
in your web browser - Log in with the admin credentials