A blueprint of a flask based web application that uses Tailwind CSS for front end design.
- Flask based Web application with registration and login capabilities
- Run with gunicorn
- Templates using Jinja2
- Tailwind CSS based frontend
- Responsive Design for mobile, tablet and big screens
- Navigation
- systemd service template
By default, the application has an in memory database memrepo with exactly one user:
- username: "[email protected]"
- password: "p4ssword!"
WARNING: You should add a preferred data base. Since repo abstracts all data base accesses, it should be easy to replace the memrepo with any other database.
- Install virtual environment with
python3 -m venv venv
- Activate the environment
. venv/bin/activate
- Install required python packages
pip install -r requirements.txt
- Initiate Tailwind CSS
tailwindcss init
Each time a style in a template is changed, the following command must be run to extend the main.css file
tailwindcss -i ./app/static/src/main.css -o ./app/static/dist/main.css --minify
Start the application:
with flask (for development):
flask --debug run --host "0.0.0.0"
with gunicorn (for production):
gunicorn --workers 4 --bind 0.0.0.0:8000 wsgi:app
Kudos to the ones described how to do things. Without you, I would not be able to create this blueprint that quick.
- Flask Tailwind Integration: https://testdriven.io/blog/flask-htmx-tailwind/
- Navigation: https://codepen.io/hulyak/pen/yLbwXvB
- Login System: https://github.com/Faruqt/Flask-Complete-Tutorial
- Deployment: https://dev.to/brandonwallace/deploy-flask-the-easy-way-with-gunicorn-and-nginx-jgc