This repository contains a simple Laravel-Vue.js application built with the purpose of demonstrating many of Laravel and Vue.js features.
The Subscriber Lite application aims to simplify maintaining the subscribers list of your awesome newsletter. Along with your subscriber's basic information such as name and email, Subscriber Lite allows you to create custom fields for collecting more information from your subscribers. You can also specify the type of a custom field (string, number, date, boolean), as well as indicate if the field is required to be filled-up.
The tech stack used to build this application is:
- PHP 8
- Laravel 9
- MySQL 8
- Vue.js 3
- Tailwind CSS 3
- Alpine.js 3 (only to make the HTML template mobile-responsive)
Feature showcases:
- HTTP JSON API
- Request validation
- Eloquent ORM and model relationships/associations
- Database migration and seeding
- Feature tests
- PSR-2/PSR-12 compliance of source code
Note: To keep things really simple and short, authentication and authorization have been avoided. Also, for the same reason, multi-user scenario has been ignored.
- Make sure Docker is installed on the system. Installation instructions can be found at Docker Desktop (for Mac OS) and Docker Compose (for Linux).
- Clone the git repository:
git clone https://github.com/sharafat/subscriber-lite.git
- Navigate to the application directory:
cd subscriber-lite
- Create
.env
file from.env.example
:cp .env.example .env
- Install composer dependencies using docker to install Sail:
docker run --rm \ -u "$(id -u):$(id -g)" \ -v $(pwd):/var/www/html \ -w /var/www/html \ laravelsail/php81-composer:latest \ composer install --ignore-platform-reqs
- Fire up Docker containers in the background:
./vendor/bin/sail up -d
- Enjoy a cup of coffee while your machine is working hard. 😊
- Run database migrations and populate database with seed data:
./vendor/bin/sail artisan migrate ./vendor/bin/sail artisan db:seed
- Install Javascript dependencies and build front-end:
./vendor/bin/sail npm install ./vendor/bin/sail npm run dev
- Browse https://localhost/
To run PHP test cases, execute:
./vendor/bin/sail test
Subscriber List Page
Subscriber Add/Edit Page
Custom Field List Page
Custom Field Add/Edit Page
If you have questions/comments, please drop me a line at [email protected].