Best Flask open-source libraries and packages

Flask react auth

Authentication with Flask, React, and Docker (learning repo)
Updated 1 year ago

Contributors Issues pipeline status


Logo

Flask React Auth

Authentication with Flask, React, and Docker
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

The repo represents my learning progress with the testdriven.io course with Flask and Docker.

Live demo available on Heroku.

Built With

  • Flask
  • Flask-RESTful
  • Docker
  • pytest
  • Jest
  • React
  • React Testing Library

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

  • Docker 19.03.4
  • docker-compose 1.25.0

Installation

  1. Get the flask-react-auth repository
    git clone https://github.com/sophiabrandt/flask-react-auth.git
    or, if you have Node.js on your machine:
    npx degit https://github.com/sophiabrandt/flask-react-auth.git flask-react-auth
  2. Set environment variables
    export REACT_APP_USERS_SERVICE_URL=http://localhost:5001
  3. Build docker containers
    docker-compose build
  4. Run docker containers
    docker-compose up -d
  5. Navigate to http://localhost:3007 to see the React app.

Usage

  • Run pytest:

    docker-compose exec users pytest "project/tests" -p no:warnings
  • Recreate database:

    docker-compose exec users python manage.py recreate_db
  • Seed database:

    docker-compose exec users python manage.py seed_db
  • Run flake8, black, isort:

    docker-compose exec users flake8 project
    docker-compose exec users black project
    docker-compose exec users /bin/sh -c "isort project/*/*.py"
  • Run React tests:

    docker-compose exec client npm run test
  • Run eslint, prettier:

    docker-compose exec client npm run lint
    docker-compose exec client npm run formatfix:check
    docker-compose exec client npm run formatfix:write

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please note that this is a learning repository, not a real project.
As the code is not mine, I can't give it an open-source license.

License

Code is © Michael Herman 2019, with minor modifications by Sophia Brandt.

Contact

Sophia Brandt - @hisophiabrandt

Project Link: https://github.com/sophiabrandt/flask-react-auth

Acknowledgements