Skip to content

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.

License

Notifications You must be signed in to change notification settings

iframe23/contact-tracing-api

Repository files navigation

Contact Tracing API

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.

Features

  • 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

Requirements

  • PHP 5.6 or newer (PHP 7.x recommended)
  • MySQL/MariaDB
  • Apache/Nginx web server
  • Composer (for dependency management)

Installation

  1. Clone the repository:
git clone https://github.com/iframe23/contact-tracing-api.git
cd contact-tracing-api
  1. Install dependencies:
composer install
  1. Configure the database:

    • Import the database schema from contact.sql or school3.sql
    • Update application/config/database.php with your database credentials
  2. Configure the application:

    • Update application/config/config.php with your base URL and other settings
    • Configure REST API settings in application/config/rest.php
  3. Set up file permissions:

chmod -R 755 application/cache
chmod -R 755 application/logs
chmod -R 755 images
  1. Configure your web server to point to the project root

API Endpoints

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

Configuration

Database Configuration

Edit application/config/database.php:

$db['default'] = array(
    'hostname' => 'localhost',
    'username' => 'your_username',
    'password' => 'your_password',
    'database' => 'your_database',
    // ... other settings
);

REST API Configuration

Edit application/config/rest.php to configure:

  • API keys
  • Authentication methods
  • CORS settings
  • Rate limiting
  • Response formats

Security

  • 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

Image Storage

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.

Libraries Used

  • CodeIgniter 3: PHP framework
  • REST_Controller: REST API implementation
  • JWT: JSON Web Token authentication
  • TCPDF: PDF generation library
  • Format: Data formatting utilities

Development

Project Structure

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

License

This project is built on CodeIgniter 3, which is licensed under the MIT License.

Contributing

Please read contributing.md for details on the code of conduct and the process for submitting pull requests.

Support

For issues, questions, or contributions, please open an issue in the GitHub repository.

Author

iframe23


Built with CodeIgniter - A powerful PHP framework

About

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.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages