A comprehensive REST API for managing information about persons with disabilities (PWD), their personal data, assistance requests, and support services. The system facilitates efficient tracking, processing, and reporting of disability-related services with multi-role access for case workers, administrators, and service providers.
-
User Authentication & Authorization
- JWT-based authentication
- Role-based access control (admin/officer)
- Password reset via OTP
-
PWD Records Management
- Complete personal information storage
- Document management (supporting documents)
- Status tracking (pending/approved/declined)
-
Community Management
- Register and organize communities
- Associate PWD with specific communities
-
Assistance Management
- Track different types of assistance
- Process assistance requests
- Monitor assistance delivery
-
Comprehensive Statistics
- Generate quarterly reports
- Track assessment status
-
Auditing and Monitoring
- Activity logs
- Request/Response logging
- System logs viewer
- Backend: PHP 8.4
- Framework: Slim 4
- Database: MySQL
- Authentication: JWT (Firebase PHP-JWT)
- Email Service: PHPMailer
- Logging: Monolog
- Validation: Respect Validation
- Dependency Injection: PHP-DI
- Environment Variables: PHPDotEnv
- Containerization: Docker
POST /v1/users/login- User loginPOST /v1/users/password/reset-request- Request password resetPOST /v1/users/password/verify-otp- Verify OTPPOST /v1/users/password/reset- Reset password with OTPPOST /v1/users/password/update- Update password
GET /v1/users- List all usersGET /v1/users/{id}- Get user by IDPOST /v1/users- Create new userPATCH /v1/users/{id}- Update userDELETE /v1/users/{id}- Delete user
GET /v1/pwd-records- List PWD recordsGET /v1/pwd-records/{id}- Get PWD record by IDPOST /v1/pwd-records- Create PWD recordPATCH /v1/pwd-records/{id}- Update PWD recordPATCH /v1/pwd-records/{id}/status- Update PWD record statusDELETE /v1/pwd-records/{id}- Delete PWD record
GET /v1/communities- List communitiesGET /v1/communities/{id}- Get community by IDPOST /v1/communities- Create communityPATCH /v1/communities/{id}- Update communityDELETE /v1/communities/{id}- Delete community
GET /v1/assistance-types- List assistance typesGET /v1/assistance-types/{id}- Get assistance type by IDPOST /v1/assistance-types- Create assistance typePATCH /v1/assistance-types/{id}- Update assistance typeDELETE /v1/assistance-types/{id}- Delete assistance type
GET /v1/assistance-requests- List assistance requestsGET /v1/assistance-requests/{id}- Get assistance request by IDPOST /v1/assistance-requests- Create assistance requestPATCH /v1/assistance-requests/{id}- Update assistance requestPATCH /v1/assistance-requests/{id}/status- Update request statusDELETE /v1/assistance-requests/{id}- Delete assistance request
GET /v1/statistics/quarterly- Get quarterly statisticsGET /v1/statistics/quarterly/{year}- Get statistics for specific yearGET /v1/statistics/quarterly/{year}/{quarter}- Get statistics for specific quarter
GET /v1/activity-logs- View activity logsGET /logs-viewer- View system logs (admin only)
- PHP 8.4+
- MySQL 5.7+
- Composer
-
Clone the repository:
git clone https://github.com/yourusername/disability-management-api.git cd disability-management-api -
Install dependencies:
composer install
-
Create environment file:
cp .env.example .env
-
Configure your environment variables in .env
# App Configuration APP_NAME="Disability Management" APP_ENV=development|production APP_DEBUG=true|false APP_URL=http://localhost:8080 # Database Configuration LOCAL_DB_ADAPTER=mysql LOCAL_DB_HOST=127.0.0.1 LOCAL_DB_PORT=3306 LOCAL_DB_DATABASE=pwd_management LOCAL_DB_USERNAME=root LOCAL_DB_PASSWORD=your_password # Email Configuration MAIL_MAILER=smtp MAIL_HOST=smtp.example.com MAIL_PORT=587 MAIL_USERNAME=your_username MAIL_PASSWORD=your_password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=noreply@example.com MAIL_FROM_NAME="PWD Management System" -
Set up the database:
php db/migrate.php
-
Start the development server:
php -S localhost:8080 -t public
Build and run using Docker:
docker-compose up -dConfiguration is managed through environment variables in the .env file.
The system uses multiple interconnected tables:
- users - System users with role-based access
- pwd_records - Main PWD information records
- communities - Community definitions
- disability_categories - Categories of disabilities
- disability_types - Specific disability types
- assistance_types - Types of assistance provided
- assistance_requests - Requests for assistance
- activity_logs - System activity audit trail
- password_resets - OTP management for password resets
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Gilbert Elikplim Kukah - kwamegilbert1114@gmail.com