Flask Monolith Template

screenshot of Flask Monolith Template

Flask project starter template using factory method with sqlalchemy and flask migrate setup.

Overview

The Flask Monolith Template is a template designed for building monolith apps using the Flask framework. It provides a structured approach to developing Flask projects by separating blueprints into separate folders and generating them using a script. Additionally, it integrates SQLAlchemy and Flask-Migrate for easy database management.

Features

  • Blueprint Organization: Separate blueprints into individual folders for better organization and maintainability.
  • Blueprint Generation: Includes a script to generate new blueprints with a predefined folder structure.
  • Integration with SQLAlchemy and Flask-Migrate: Seamlessly integrates SQLAlchemy and Flask-Migrate for efficient database management.

Usage

To use the Flask Monolith Template, follow these steps:

  1. Create a new blueprint using the provided script. This will generate a new blueprint folder with the required structure.
  2. Running the project:
    • To run with Docker, use the build.sh script included in the project. This will create the Docker image and run it on port 8000.
    • To run from the terminal, navigate to the main project directory and run the necessary commands.
  3. To activate a blueprint, register it in the app.py file in the load_blueprints() function according to the existing format.

Summary

The Flask Monolith Template is a helpful tool for developers looking to build monolith apps with Flask. It provides a structured approach to organizing blueprints, generating new blueprints, and integrates seamlessly with SQLAlchemy and Flask-Migrate for easy database management. With its user-friendly installation and usage guide, developers can quickly get started with their Flask projects while maintaining a maintainable codebase.