Skip to content

RatulSaqibKhan/covid-vaccinate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Covid Vaccinate Registration System

Version: 1.0.0

Description:

This is a simple vaccination registration system.

Features

  1. Users can sign up to get vaccinated at a specific vaccination center.
  2. The system automatically processes the registration and schedules the vaccination based on the center's availability.
  3. Users can check when their vaccination is scheduled.
  4. A reminder email is sent to users the day before their vaccination date.

Application Stack

  1. Frontend: NextJs v14
  2. Backend: Laravel v11

Operational Tools

  1. MySQL
  2. Adminer
  3. Redis
  4. RabbitMQ
  5. Mailhog
  6. Docker

Installation Pre-requisite

  1. Docker (version 27.3 or more)
  2. Docker compose (v2.29 or more)
  3. make to run Makefile
  4. The following ports are used to run this system: 9500, 9501, 9502, 9503, 9504, 9505, 9506, 9507. So make sure to free up these if aleardy used.

Installation with make

  1. First we will get up and running the core services using make up-core
    • This will start the backend server for RabbitMQ, MySQL, Adminer, Redis and Mailhog.
    • MySQL (User:Pass) (root:covid-vaccinate)
    • Adminer (User:Pass) (root:covid-vaccinate)
    • Redis (Password) (covid-vaccinate)
    • RabbitMQ (User:Pass) <(covid-vaccinate:covid-vaccinate)
    • Mailhog (No Auth Required)
  2. After that it's time to create DB using make create-db. Please run this after the mysql is up running. To check this open Adminer running at http://localhost:9502 and login with mysql credentials above.
  3. Now let's build and run application actual applcation make up-app
  4. Now run this make migrate-seed to populate the database with some data.
  5. For help run make help

Manual Installation

  1. cd docker/.envs and make all *.env files by copying *.env.example
  2. cd docker and make .env from .env.example and make docker-compose.override.yml from docker-compose.override.dev.yml
  3. cd docker and docker compose up -d redis mysql adminer rabbitmq mailhog
  4. docker exec covid-vaccinate-mysql sh -c "mysql -u root -p'covid-vaccinate' -e 'CREATE DATABASE IF NOT EXISTS covid_vaccinate;'" for regular application
  5. docker exec covid-vaccinate-mysql sh -c "mysql -u root -p'covid-vaccinate' -e 'CREATE DATABASE IF NOT EXISTS covid_vaccinate_test;'" for regular application testing
  6. cd docker and docker network create covid-vaccinate-net
  7. cd docker and docker compose build app
  8. cd docker and docker compose up -d app
  9. cd docker and docker exec covid-vaccinate-app sh -c "composer install"
  10. cd docker and docker exec covid-vaccinate-app sh -c "npm install"
  11. cd docker and docker exec covid-vaccinate-app sh -c "php artisan migrate && php artisan db:seed"
  12. cd docker and docker compose down app
  13. cd docker and docker compose up -d app cron queue
  14. cd docker and docker compose build ui
  15. cd docker and docker compose up -d ui

For Testing

  1. cd docker and docker compose up app-test
  2. Using make cd to project root dir and run make up-app-test

Application Uninstallation

Using Make

  1. cd to project root directory and run make down-app and make down-core

Manual Process

  1. cd docker and run docker compose down

Postman Collection

  1. Find the postman collection here

Application Access

  1. Backend will be running in http://localhost:9500
  2. Frontend will be running in https://localhost:9506

Note:

Integrate phone messaging

  • To integrate phone messaging, you need to install Twilio and configure it in your Laravel project.
  • Need to configure notification dirver from environment variable
  • According to that we need to modify the business logic in SendVaccineReminderCommand.php to send data to specific queue for the notification type (email, sms)
  • New consumer needed for SMS notification to process sms queue data
  • Also we need a new job to handle SMS notification
  • Create SMS Service for sending SMS notifiactions

Improvement Tasks

  1. API throttling/ Rate Limitting for the backend APIs

Install make

  • You can install make using sudo apt-get install make on Ubuntu or brew install make
  • If you are using Windows, you can install make using from the blog.

Install Docker

  • You can install Docker and Docker Compose from the official site.

License

This project is licensed under the MIT License.

About

A covid vaccination registration system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published