Best laravel framework open-source packages.

Materialize boilerplate

Laravel + ReactJS boilerplate application.
Updated 3 years ago
Materialize Labs

Laravel Boilerplate

About the Project

A starter kit for setting up a Laravel backend and GraphQL API coupled with a ReactJS frontend using Apollo and the Bootstrap UI framework.

Includes

Features

  • React SPA frontend (served through a Laravel web route)
  • GraphQL API
  • Bootstrap UI
  • JWT Authentication
    • Register/login forms
  • Form validation
  • Server side and client side tests

Opinionated code

  • Repository design pattern
  • GraphQL API
  • JWT authentication
  • Pre-commit git hooks for CI
  • phpcs for PSR-2 code compliance
  • eslint Javascript linter using Airbnb styleguide

Pre-installed packages

Server Side
Client Side

Requirements

Installation

For detailed Laravel setup instructions, visit their documentation.

  1. Clone the repo

    $ git clone git@github.com:alexnord/materialize-boilerplate.git
  2. Install PHP dependencies

    $ composer install
  3. Copy the example .env file

    $ cp .env.example .env
  4. Create SQLite DB for testing

    $ touch database/database.sqlite
  5. Generate application keys

    $ php artisan key:generate
    $ php artisan jwt:secret
  6. Run migrations and seed DB

    $ php artisan migrate
    $ php artisan db:seed
  7. Use the Node version provided by .nvmrc

    nvm use
  8. Install frontend dependencies

    $ npm i
  9. Compile frontend assets

    $ npm run prod
  10. Run website

    $ php artisan serve

Useful commands

Compile assets for development (hot module reloading enabled)

$ npm run hot

Run backend and frontend tests

$ npm run test

Run linters

$ npm run lint

Example API Requests

Get list of users

GET /graphql?query=query+FetchUsers{users{id,name,email}}