Skip to content

Jimmea/lumen_startkit

Repository files navigation

A Boilerplate for yor Web & API server built

What is needed to Install?

  1. PHP >=7.2 with extension requirements given as in Laravel's documentation.
  2. Install web server: apache or nginx
  3. Node & NPM LTS Stable Release.
  4. Composer Stable Release.
  5. Any Database of your choice, I have used MySQL.
  6. Install server Redis
  7. Install server Elastic search

A RESTful API features included:

Document

Technology

  • Beanstalk Beanstalk is a simple, fast work queue.

Use Packages

What this repo contains?

  1. E-Mail Verification/Confirmation for new users.
  2. JWT Setup for your APIs.
  3. Transform Request Middleware for your boolean inputs in requests.
  4. Basic Contracts to Repositories binding sample for Auth Logic.
  5. Queue: beanstalk

For Debugging

How you can install?

# Installs all the necessary packages required to run the app
> composer install;

# Creates your dotEnv file
> cp .env.example .env;

# Setup config dingo in 
> .env

# Gives permission to these directories
> chmod -R 777 bootstrap/ storage/;

# Generates app secret
> php artisan key:generate;

# Generates jwt secret
> php artisan jwt:secret;

# Create queue vs queue fail table
> php artisan queue:failed-table
> php artisan queue:table

# Creates the required tables into your database
# Note: Please do remember to create your database before you run this command!
> php artisan migrate;

# Installs all the npm packages
> npm install;

# Run db examlple
> php artisan migrate --seed

How to run the app?

  • Run a PHP built in server from your root project:
    # You can either run it on localhost or you can have the virtualhost configuration 
    # in a server of your choice (We prefer nginx / apache)
    php -S localhost:8000 -t public/ 
  • Or via artisan command:
  php artisan serve 

How can you see Web routes?

# Lists all the web routes defined for your web-app
php artisan route:list

Todo

User

  • auth/login: Login
  • auth/register; Register
  • auth/refresh: Refresh
  • auth/user: GetInfo
  • auth/user: Update infomation
  • auth/password: Thay đổi mật khẩu

Document other recommend