Enterprise-grade web application for COVID-19 health record management with comprehensive analytics, security hardening, and freemium model
Modern, accessible landing page with clear call-to-action and guest usage tracking
Secure authentication with rate limiting and session management
Comprehensive health analytics with real-time KPIs, time-range filtering, and trend analysis
Advanced table interface with search, filtering, and bulk operations
- SQL Injection Protection - All queries use prepared statements
- CSRF Protection - Comprehensive token validation
- XSS Prevention - Input sanitization and output encoding
- Session Security - Secure configuration with timeout and regeneration
- Rate Limiting - Protection against brute force attacks
- Security Logging - Comprehensive audit trail
- Guest Access - 3 submissions/day with IP-based tracking
- Premium Users - Unlimited access for authenticated users
- Usage Analytics - Real-time tracking and upgrade prompts
- Daily Reset - Automated via Windows Task Scheduler
- Real-time KPIs - Total records, encounters, vaccinations, temperatures
- Time-based Filtering - Today, 7 days, 30 days, all time
- Trend Analysis - Period-over-period comparisons
- Export Capabilities - CSV export with current filters
- Quick Filters - Vaccinated, encountered, fever, today
- Dark Theme - Professional healthcare-focused design
- Mobile-First - Responsive design with touch-friendly interactions
- Accessibility - WCAG 2.1 AA compliance with keyboard navigation
- Loading States - Smooth transitions and feedback
- Dynamic Navigation - Scroll-based transparency and blur effects
- XAMPP (Apache, MySQL, PHP 7.4+)
- Git
# Clone the repository
git clone https://github.com/transcenddev/covid-health-declaration.git
# Move to XAMPP directory
mv covid-health-declaration C:/xampp/htdocs/
# Import database schema
mysql -u root -p < database/covid19recordsdb.sql
mysql -u root -p < database/add_created_at_column.sql
mysql -u root -p < database/freemium_migration.sql
# Optional: Add performance indexes
mysql -u root -p < database/performance_indexes.sql- URL:
http://localhost/covid-health-declaration/ - Admin Login: Username:
Admin, Password:Admin - Guest Access: Use incognito/private browsing to test freemium limits
- Frontend: HTML5, CSS3 (Grid/Flexbox), ES6 JavaScript classes
- Backend: PHP with MySQLi prepared statements
- Database: MySQL with optimized indexes and relationships
- Security: Custom security layer with comprehensive protection
- Freemium: IP-based usage tracking with automated reset
covid-health-declaration/
βββ includes/ # Core PHP modules
β βββ security.inc.php # Security functions
β βββ freemium.inc.php # Usage tracking
β βββ dbconn.inc.php # Database connection
βββ database/ # SQL schema and migrations
βββ styles/ # Modular CSS architecture
βββ scripts/ # ES6 JavaScript modules
βββ logs/ # Security and error logs
βββ .github/ # AI coding instructions
All code follows strict security patterns:
- Prepared statements for all database queries
- CSRF tokens in all forms
- Input sanitization and validation
- Secure session configuration
- Comprehensive error logging
- Error Logs:
logs/php_errors.log - Security Events:
logs/security.log - Freemium Tracking:
logs/freemium.log
Set up Windows Task Scheduler:
Program: C:\xampp\php\php.exe
Arguments: C:\xampp\htdocs\covid-health-declaration\reset_daily_limits.php
Schedule: Daily at 00:01
- Monitor
logs/security.logfor suspicious activity - Regular database backups
- Keep PHP and MySQL updated
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow security-first development patterns
- Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Always use prepared statements for database queries
- Include CSRF protection in forms
- Follow the existing code architecture
- Add comprehensive error logging
- Test freemium functionality with multiple IP addresses
MIT License - see LICENSE file for details
- Built with security-first principles
- Designed for healthcare environments
- Optimized for accessibility and mobile use
β Star this repository if it helped you build secure health management systems!