Overview:
The React-Redux-FlaskBoilerplate is an application that combines a Flask JWT Backend with a React/Redux Front-End. It also utilizes Material UI for the user interface. This boilerplate is designed for developers familiar with Python and React/Redux to quickly set up a project with authentication functionality.
Features:
- Flask JWT Backend: The application uses Flask and JWT (JSON Web Tokens) for authentication on the server-side.
- React/Redux Front-End: The front-end of the application is built using React and Redux to manage the state and handle user interactions.
- Material UI: The user interface is designed using Material UI, providing a modern and sleek look for the application.
- Pytest: The application includes Pytest for testing the back-end functionality.
- Heroku Deployment: The application can be easily deployed to Heroku, allowing for seamless deployment and hosting.
Installation:
To install the React-Redux-FlaskBoilerplate, follow these steps:
- Ensure that you have Python 2.7+ or 3.x installed on your system.
- Install Pytest by running the following command in your terminal:
pip install pytest - Set up a Heroku account if you haven’t already.
- Install Flask by running the following command:
pip install flask - Install React and Redux by running the following commands:
npm install react npm install redux - Install React-Router 2.0 and React-Router-Redux by running the following commands:
npm install react-router@2.0 npm install react-router-redux - Install Babel 6 for compiling your JavaScript code by running the following command:
npm install babel-core@6 babel-loader@6 babel-preset-env@1 babel-preset-react@6 --save-dev - Set up SCSS processing by installing node-sass and sass-loader:
npm install node-sass sass-loader --save-dev - Set up Webpack for bundling your JavaScript code by installing webpack and webpack-cli:
npm install webpack webpack-cli --save-dev - Create the database for your application. Refer to the Flask config guide for more information on connection strings.
- Update the database with new migrations by running the following command:
python manage.py db upgrade - Install the front-end requirements by running the following command:
npm install - Test the back-end by running the following command:
python manage.py test - Run the back-end by running the following command:
python manage.py runserver - Build the front-end by running the following command:
npm run build - Finally, open your browser and go to http://localhost:3000/register to set up your first account.
Summary:
The React-Redux-FlaskBoilerplate is a useful tool for developers looking to quickly set up a project with a Flask JWT Backend and a React/Redux Front-End. It provides all the necessary configuration and dependencies to get started, including authentication functionality and a modern user interface design. By following the installation guide, developers can easily create an account and login without any errors.