Skip to content

tonycondone/birth-certificate-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

When# πŸ₯ Digital Birth Certificate Management System

A comprehensive, secure, and user-friendly digital birth certificate management system built with PHP 8.4, featuring real-time notifications, elegant certificate templates, and robust verification capabilities.

System Status PHP Version Database Frontend

Quick Start

# Clone the repository
git clone https://github.com/your-org/birth-certificate-system.git
cd birth-certificate-system

# Install dependencies
composer install
npm install

# Configure environment
cp .env.example .env
# Edit .env with your database credentials

# Start the development server
php -S localhost:8000 -t public public/router.php

Default Admin Credentials:

  • Email: admin@example.com
  • Password: password

Table of Contents

Features

Core Features

  • Multi-Role User System: Parent, Hospital, Registrar, and Admin roles
  • Application Management: Complete birth certificate application workflow
  • Certificate Generation: Professional, government-style certificate templates
  • Real-time Verification: QR code and number-based instant verification
  • Document Management: Secure file upload and storage system

Notification System

  • Live Notifications: Real-time notification bell with polling updates
  • Browser Notifications: Native browser notification support
  • In-app Toasts: Elegant toast notifications with sound alerts
  • Email Notifications: Automated email alerts for status changes
  • Admin Broadcasting: System-wide announcements and maintenance alerts

User Management

  • Profile Management: Complete user profile editing
  • Password Security: Secure password change functionality
  • Account Deletion: Self-service account deletion with safeguards
  • Application History: View and manage personal applications
  • Data Export: GDPR-compliant data export functionality

Dashboard & Reports

  • Role-based Dashboards: Customized dashboards for each user role
  • Advanced Reporting: Daily, weekly, and monthly reports with charts
  • Application Tracking: Real-time application status tracking
  • Batch Processing: Bulk approve/reject applications
  • Statistics & Analytics: Comprehensive system statistics

Improved UI

  • Responsive Design: Mobile-first, fully responsive interface
  • Bootstrap 5: Modern, accessible UI components
  • Dark/Light Theme: User preference-based theming
  • Accessibility: WCAG 2.1 AA compliant
  • Progressive Web App: PWA capabilities for mobile devices

System Requirements

Server Requirements

  • PHP: 8.4 or higher
  • Database: MySQL 8.0+ or MariaDB 10.4+
  • Web Server: Apache 2.4+ or Nginx 1.18+
  • Memory: 2GB RAM minimum
  • Storage: 20GB available space

PHP Extensions

php-pdo
php-mysql
php-json
php-gd
php-mbstring
php-xml
php-fileinfo
php-zip
php-curl
php-pdf

Frontend Dependencies

  • Bootstrap 5.3.0
  • Font Awesome 6.4.0
  • Chart.js 3.9.1
  • SweetAlert2 11.7.12

πŸ”§ Installation

1. Environment Setup

# Clone repository
git clone https://github.com/your-org/birth-certificate-system.git
cd birth-certificate-system

# Install PHP dependencies
composer install

# Install Node.js dependencies
npm install

# Build frontend assets
npm run build

2. Database Configuration

# Create database
mysql -u root -p -e "CREATE DATABASE birth_certificate_system CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

# Configure environment
cp .env.example .env

Edit .env file:

DB_HOST=localhost
DB_NAME=birth_certificate_system
DB_USER=your_username
DB_PASS=your_password

APP_URL=http://localhost:8000
APP_DEBUG=true

3. Initialize Database

The system uses dynamic table creation, so tables will be created automatically when needed. For manual setup:

# Run the setup script
php setup_database.php

4. Start Development Server

# Start PHP development server
php -S localhost:8000 -t public public/router.php

# Access the application
open http://localhost:8000

πŸ‘₯ User Roles

Parent

  • Register and submit birth certificate applications
  • Upload required documents (birth notification, ID documents)
  • Track application status in real-time
  • Download approved certificates
  • Manage personal profile and applications
  • Delete rejected applications

Hospital

  • Verify birth records and medical information
  • Upload supporting medical documents
  • Review and validate birth applications
  • Communicate with registrars about applications

Registrar

  • Review and process birth certificate applications
  • Approve or reject applications with detailed comments
  • Generate official birth certificates
  • Batch process multiple applications
  • Generate comprehensive reports
  • Manage application workflows

Admin

  • Full system administration capabilities
  • User management (create, edit, disable accounts)
  • System monitoring and audit logs
  • Broadcast system-wide notifications
  • Generate system reports and analytics
  • Configure system settings

Security Features

Authentication & Authorization

  • Bcrypt Password Hashing: Secure password storage
  • Role-Based Access Control: Granular permission system
  • Session Management: Secure session handling
  • CSRF Protection: Cross-site request forgery prevention

Data Protection

  • Input Validation: Comprehensive server-side validation
  • SQL Injection Prevention: Prepared statements
  • File Upload Security: Type and size validation
  • Data Encryption: Sensitive data encryption

Audit & Monitoring

  • Activity Logging: Comprehensive audit trails
  • Failed Login Tracking: Brute force protection
  • Certificate Verification Logging: Verification attempt tracking
  • System Monitoring: Real-time system health monitoring

πŸ§ͺ Testing

Running Tests

# Run PHP unit tests
composer test

# Run frontend tests
npm test

# Run integration tests
php run_tests.php

Test Coverage

  • Unit Tests: Core business logic
  • Integration Tests: Database interactions
  • Feature Tests: End-to-end workflows
  • Security Tests: Vulnerability scanning

πŸ“‘ API Documentation

Authentication Endpoints

POST /auth/login          - User login
POST /auth/register       - User registration
POST /auth/logout         - User logout
GET  /auth/profile        - Get user profile

Application Endpoints

GET    /applications           - List applications
POST   /applications           - Create application
GET    /applications/{id}      - Get application details
PUT    /applications/{id}      - Update application
DELETE /applications/{id}      - Delete application

Certificate Endpoints

GET  /certificates            - List certificates
GET  /certificates/{id}       - Get certificate details
GET  /certificates/{id}/download - Download certificate
POST /certificates/{id}/verify   - Verify certificate

Notification Endpoints

GET    /notifications              - List notifications
POST   /notifications              - Create notification
GET    /notifications/{id}         - Get notification
PUT    /notifications/{id}/read    - Mark as read
DELETE /notifications/{id}         - Delete notification
GET    /notifications/poll         - Real-time polling

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   Backend       β”‚    β”‚   Database      β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β”‚ β€’ Bootstrap 5   │◄──►│ β€’ PHP 8.4       │◄──►│ β€’ MySQL 8.0+    β”‚
β”‚ β€’ JavaScript    β”‚    β”‚ β€’ MVC Pattern   β”‚    β”‚ β€’ InnoDB Engine β”‚
β”‚ β€’ Chart.js      β”‚    β”‚ β€’ RESTful API   β”‚    β”‚ β€’ Full-text     β”‚
β”‚ β€’ PWA Support   β”‚    β”‚ β€’ Real-time     β”‚    β”‚   Search        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🚨 Troubleshooting

Common Issues

Database Connection Error

# Check database service
sudo service mysql status

# Test connection
mysql -u username -p database_name

File Permission Issues

# Fix storage permissions
chmod -R 755 storage/
chmod -R 755 public/uploads/

Session Problems

# Clear sessions
rm -rf storage/framework/sessions/*

# Check PHP session configuration
php -i | grep session

Error Logs

# Application logs
tail -f storage/logs/app.log

# PHP error log
tail -f php_error.log

# Web server logs
tail -f /var/log/apache2/error.log

Database Schema

  • Migration 027 applied: All certificate verification fixes
  • 19 active certificates ready for verification
  • 10 approved applications with valid certificate numbers
  • All tracking numbers generated and functional

Code Standards

  • PSR-12 coding standards
  • Comprehensive PHPDoc comments
  • Unit test coverage
  • Security best practices

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

πŸ—ΊοΈ Roadmap

  • Multi-language support
  • Advanced blockchain integration
  • AI-powered fraud detection
  • Mobile applications (iOS/Android)
  • Integration with government databases
  • Advanced analytics dashboard

Built with ❀️ for secure and efficient birth certificate management

About

user-friendly digital birth certificate management system

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published