Flask-React-Boilerplate

This project has been developped in order to gather best practices at

  • Building React Single Page Applications that allow to fetch data from Web APIs
  • Building Python Flask REST APIs that efficiently and safely expose data to the Web

This project is intended for developpers who desire to accomodate with React and/or Flask technologies. It covers a large panel of librairies and aims to include best practices at developping robust Web Applications.

This boilerplate is made of 2 independant projects one for React Single Page Application and one for Python Flask API. A reader interested in only one of these 2 technologies can totally give focus on it without meeting any misunderstanding. Nevertheless both projects are designed to be compatible.

Packages

React

  • Create-React-App - Facebook project intended to easily package React Applications
  • Redux - Very popular package that allows proper Application State management
  • React-Router - Package that allows to dynamically manage Applications Route
  • Redux-Saga - Package that properly handles side effects (e.g. asynchronous fetch calls)
  • Redux-Form - Package that allows to easily synchonize forms and Redux state
  • Material-UI - Library of React components that implements Google Material Design specification

Python

  • Flask - Python microframework for Web development.
  • Flask-RESTful - Flask extension that allows to easily expose REST APIs
  • Flask-Login - Flask extension that manages user session (login, logout, etc.)
  • Flask-WTF - Flask extension that allows to handle forms. It also includes CSRF protection
  • SQLAlchemy - Object Relationship Mapper (ORM) that allows easy dialog with SQL databases
  • Marshmallow - Convenient package to serialize/deserialize Python objects into json format
  • Flask-Script - Convenient Flask extension that allows to implement CLI commands