/gas-queue-mgt

Queue Management Systems for LPG vendor agencies of Sri Lanka, for the LPG shortages in 2022

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

gas-queue-mgt

Queue Management Systems for LPG vendor agencies of Sri Lanka, for the LPG shortages in 2022

Installation

Requirements

  • PHP 7.4 or later
  • MariaDB 10.4 or later

SMS Gateway

  • By default, the system uses FastSMS (Sri Lanka) service.
  • If the service needs to be changed, sendSMS() function in common/sms.php needs to be changed.
  • The configuration parameters in common/config.php needs to be changed accordingly.
  • The configuration parameters in common/config.php sms=>prod has been set to false this will provide UI to view the SMS via /api/v1/send?phone_number=07xxxxxxxx format url

Steps

[INCOMPLETE]

  1. Clone code from GitHub
    git clone https://github.com/madhusankagoonathilake/gas-queue-mgt.git
  2. Move to the installation directory
    cd gas-queue-mgt/
  3. Run composer install
  4. Set up scheduled tasks (cron jobs) to run the following command every 5 minutes & 4 hours respectively
    cd ${INSTALLATION_DIR}/bin && php send-notifications.php > /dev/null
    cd ${INSTALLATION_DIR}/bin && php handled-failed-and-unfulfilled-notifications.php > /dev/null

(Near) Future Improvements

  • Tamil translation (and multi-language support)
  • Agency unregistering
  • Encrypted Session Handling
  • English translation
  • Limit the queue for a configurable number of slots
  • Reduce session timeout from the default PHP value
  • Implement IP & session level restriction to malicious activity
  • Complete the documentation of test cases
  • Implement the removal of expired queue entries older than 2 weeks
  • Automated bug reporting facility

(Not-so-Near) Future Improvements

  • Using Location Based Services, automatically select the nearest agency for the buyer (by Hansaka Weerasingha)

Design Decisions

Following decisions were taken to reduce the time to deliver, wider understanding and minimize overheads

  • Used flat PHP over OOP
  • Minimized the use of external libraries and frameworks