Skip to content

Symfony 4 + React (with Flow, Redux, Bootstrap 4 and other stuff) + JWT implementation + PostgreSQL

Notifications You must be signed in to change notification settings

mickgeek/symfony-react-restful-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Symfony-React RESTful Boilerplate

A boilerplate with two separated applications: RESTful API (created through the Symfony 4 PHP framework) and SPA (the React JavaScript library respectively). It contains a user implementation with advanced functions suitable for most projects. The following features are included:

  • JWT authentication
  • Registration
  • Account management
  • Confirmation via email (password reset, account activation, email change)
  • Administrative interface

The main components of the Symfony part:

  • Annotations (FrameworkExtraBundle)
  • Doctrine
  • Doctrine Migrations

The main components of the React part:

  • Webpack
  • Babel (ES6+ and JSX)
  • Hot Module Replacement
  • Flow
  • ESLint
  • Redux
  • Bootstrap 4

Installation

Symfony

  1. Install application dependencies:
composer install
  1. Configure parameters in the config/packages/doctrine.yaml and .env files according to your needs.
  2. Generate secret keys for JWT:
php bin/console lexik:jwt:generate-keypair
  1. Create the database:
php bin/console doctrine:database:create
  1. Create the schema migration and migrate it:
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
  1. Create a super administrator:
php bin/console app:create-super-admin [email protected] password

React

  1. Install application dependencies:
yarn install
  1. Generate library definitions for dependencies (use this command when you add new third-party libraries into your code):
yarn run flow-typed install
  1. Change URLs in the src/constants/callConstants.js file on your own way.
  2. Run the application in a development mode:
yarn run start

Commands

Symfony

  • php bin/console list - lists all available commands

React

  • yarn run start - starts a development server that provides live reloading
  • yarn run build - launches a build process for a production
  • yarn run flow - runs the Flow library
  • yarn run lint - runs the ESLint library

About

Symfony 4 + React (with Flow, Redux, Bootstrap 4 and other stuff) + JWT implementation + PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages