This is a Boilerplate app using Flask with a User Account It is based on this tutorial: https://pytechacademy.medium.com/user-authentication-with-flask-from-login-to-a-welcome-page-110f685f5e6f#:~:text=In%20this%20tutorial%2C%20we%27ve%20covered,in%2C%20and%20access%20personalized%20content
This Flask project demonstrates user authentication using MongoDB as the database. It provides a secure authentication system that allows users to sign up, log in, and access protected routes.
static
: Directory for storing static files (CSS, JavaScript).templates
: Directory for storing HTML templates.app.py
: The main Flask application file.config.py
: Configuration file for storing sensitive information (e.g., MongoDB URI, secret keys).
- Python
- Flask (install via
pip3 install Flask
) - Flask-PyMongo (install via
pip3 install "pymongo[srv]"
) - MongoDB (set up and running)
-
Clone the repository:
git clone https://github.com/PytechAcademy/flask-authentication.git
-
Navigate to the project directory:
cd flask-authentication
-
Configure MongoDB URI in the
config.py.example
file, rename it config.pyMONGO_URI = "your url from Atlas"
-
Run the Flask application:
python app.py
-
Access the application in your web browser at http://localhost:5000.