This is a sample project for covid vaccine registration with Laravel 10, Vue.js 3, Vite.
Before we get started, make sure that you have the following prerequisites installed on your local machine:
- PHP (minimum version: 8.2)
- Composer
- Docker (minimum version: 20.10)
- Git
To install this project, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/subhesadek/covid_vaccine_registration.git
- Navigate to the project directory:
cd covid_vaccine_registration
- Set up the environment variables by creating a copy of the
.env.example
file and renaming it to.env
:
cp .env.example .env
4: Install Laravel Sail:
composer require laravel/sail --dev
This command will download and install Laravel Sail and its dependencies in your project's vendor directory.
Or,
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs
Note: If you encounter any issues or have any questions, feel free to check out the official Laravel Documentation.
5: Set up Laravel Sail
php artisan sail:install
6: Start Laravel Sail
./vendor/bin/sail up
7: Run the database migrations:
sail artisan migrate
8: Generate the application key:
sail artisan key:generate
9: Install & setup NPM
sail npm install && sail npm run dev
- Start the Laravel Queue worker:
sail artisan queue:work
Note: I used database for Queue Connection.
- Setup your SMTP email server:
Note: Used queue for sending an Invitation mail before last night at 9pm from scheduled date.
- Start the Laravel Task Scheduler:
sail artisan run:schedule
Note: Task Scheduler will update registration status when the scheduled_date exceeded.
If an additional requirement of sending SMS notifications is given in the future, the following changes need to be made in the code:
-
Have to add a new function to send SMS notifications, or modify the existing function to include SMS notifications.
-
Make update the code that sends notifications to call the SMS function in addition to the email function.
-
Will update any relevant variables or constants to include information about the SMS notification, such as the API key for the SMS service.
-
And finally have to update the README file to reflect the new requirement and describe the changes made to the code.
It is recommended to follow the best practices of modular programming and keep the code organized and well-commented, so that it is easy to understand and modify in the future.
This repository contains a set of unit tests for a PHP application
- To run the tests, simply execute the following command from the root directory of the repository:
sail artisan test
To install this project, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/subhesadek/covid_vaccine_registration.git
- Navigate to the project directory:
cd covid_vaccine_registration
- Install the project dependencies:
composer install && npm install
- Set up the environment variables by creating a copy of the
.env.example
file and renaming it to.env
:
cp .env.example .env
- Generate the application key:
php artisan key:generate
- Run the database migrations:
php artisan migrate
- Compile the frontend assets:
npm run dev
- Start the Laravel development server:
php artisan serve
You should now be able to access the application at http://localhost:8000.
To use the Covid vaccine registration site, follow these steps:
- Visit the website at http://localhost
- Click on the "Haven't register yet ? Please register." link to create an account and provide your National ID (NID) number, name, age, and contact information.
- Once registered, you will receive notifications about the vaccine availability and registration status updates via email.
- If you want to check your current registration status, visit the website home page and and enter your NID number and the website will display your current registration status.
Note: This website is for informational purposes only and does not provide medical advice. Please consult with your healthcare provider for any medical advice regarding COVID-19.
This project is licensed under the MIT License. See the LICENSE file for more information.