Skip to content

A basic and simple Laravel-Vue.js application to showcase standard coding conventions

Notifications You must be signed in to change notification settings

sharafat/subscriber-lite

Repository files navigation


Subscriber Lite

About

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.

Setup and Run

  1. Make sure Docker is installed on the system. Installation instructions can be found at Docker Desktop (for Mac OS) and Docker Compose (for Linux).
  2. Clone the git repository:
    git clone https://github.com/sharafat/subscriber-lite.git
  3. Navigate to the application directory:
    cd subscriber-lite
  4. Create .env file from .env.example:
    cp .env.example .env
  5. 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
  6. Fire up Docker containers in the background:
    ./vendor/bin/sail up -d
  7. Enjoy a cup of coffee while your machine is working hard. 😊
  8. Run database migrations and populate database with seed data:
    ./vendor/bin/sail artisan migrate
    ./vendor/bin/sail artisan db:seed
  9. Install Javascript dependencies and build front-end:
    ./vendor/bin/sail npm install
    ./vendor/bin/sail npm run dev
  10. Browse https://localhost/

Run Tests

To run PHP test cases, execute:

./vendor/bin/sail test

Demo

Subscriber List Page


Subscriber Add/Edit Page


Custom Field List Page


Custom Field Add/Edit Page

Contact

If you have questions/comments, please drop me a line at [email protected].

About

A basic and simple Laravel-Vue.js application to showcase standard coding conventions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published