A RESTful API built with CodeIgniter 3 for contact tracing management system. This API provides endpoints for managing schools, users, schedules, curriculum, accounting, and authentication.
- Authentication: JWT-based authentication system
- User Management: Handle user accounts and profiles
- School Management: Manage school information and data
- Schedule Management: Track and manage schedules
- Curriculum Management: Handle curriculum data
- Accounting: Manage financial and accounting records
- Dashboard: Analytics and overview data
- PDF Generation: Generate printable reports using TCPDF
- RESTful Architecture: Clean REST API endpoints
- PHP 5.6 or newer (PHP 7.x recommended)
- MySQL/MariaDB
- Apache/Nginx web server
- Composer (for dependency management)
- Clone the repository:
git clone https://github.com/iframe23/contact-tracing-api.git
cd contact-tracing-api- Install dependencies:
composer install-
Configure the database:
- Import the database schema from
contact.sqlorschool3.sql - Update
application/config/database.phpwith your database credentials
- Import the database schema from
-
Configure the application:
- Update
application/config/config.phpwith your base URL and other settings - Configure REST API settings in
application/config/rest.php
- Update
-
Set up file permissions:
chmod -R 755 application/cache
chmod -R 755 application/logs
chmod -R 755 images- Configure your web server to point to the project root
The API includes the following controllers:
- Auth: Authentication and authorization endpoints
- User: User management operations
- School: School information management
- Schedule: Schedule tracking and management
- Curriculum: Curriculum data operations
- Accounting: Financial and accounting records
- Dashboard: Analytics and dashboard data
- Printable: PDF report generation
Edit application/config/database.php:
$db['default'] = array(
'hostname' => 'localhost',
'username' => 'your_username',
'password' => 'your_password',
'database' => 'your_database',
// ... other settings
);Edit application/config/rest.php to configure:
- API keys
- Authentication methods
- CORS settings
- Rate limiting
- Response formats
- Uses JWT (JSON Web Tokens) for authentication
- API key authentication support
- Input validation and sanitization
- SQL injection prevention through CodeIgniter's Query Builder
- XSS filtering enabled
The application handles various document types:
- Birth certificates
- Form 138s
- Good moral certificates
- Profile pictures
- Transferred TORs (Transfer of Records)
- Valid IDs
All images are stored in the images/ directory with appropriate subdirectories.
- CodeIgniter 3: PHP framework
- REST_Controller: REST API implementation
- JWT: JSON Web Token authentication
- TCPDF: PDF generation library
- Format: Data formatting utilities
application/
├── config/ # Configuration files
├── controllers/ # API controllers
├── models/ # Data models
├── libraries/ # Custom libraries (JWT, REST, PDF)
├── views/ # View templates
└── logs/ # Application logs
images/ # Uploaded documents and images
system/ # CodeIgniter core system
This project is built on CodeIgniter 3, which is licensed under the MIT License.
Please read contributing.md for details on the code of conduct and the process for submitting pull requests.
For issues, questions, or contributions, please open an issue in the GitHub repository.
iframe23
Built with CodeIgniter - A powerful PHP framework