Code Monkey home page Code Monkey logo

flask-tailwind-saas-starter-template's Introduction

Flask and TailwindCSS SAAS App Starter Template

THIS TEMPLATE IS A WORK IN PROGRESS

Flask Tailwind SAAS Starter Preview

Flask Tailwind SAAS Starter Preview

How to use

  1. Clone this repo and create a virtual environment (python3 -m venv venv) for use with this application.
  2. Activate the virtual environment (source venv/bin/activate) and run pip install -r requirements.txt to install package dependencies.
  3. Download the TailwindCSS standalone build tool and place the executable in the project folder.
  4. In one terminal - run ./tailwindcss -i ./app/static/src/css/tailwind.css -o ./app/static/src/css/index.css --watch. This will start the Tailwind JIT Watcher and will compile your CSS on the fly.
  5. In the second terminal - setup some ENV variables required to run the Flask application:
    • Run export FLASK_APP=run.py (use set instead of export for windows)
    • Run export FLASK_ENV=development
    • Customise the application configuration in config.py as per your requirements
    • Run flask db upgrade to intialise database
    • Run flask run to start the Flask development server
  6. You can now add/remove CSS in your jinja templates, it will be auto-compiled by the compiler running in step 4. You will see the Tailwind CSS styles when you refresh your browser (Flask server) window.
  7. Before deploying to production:
    • Stop the flask server and the Tailwind CLI build tool.
    • Run flask assets clean followed by flask assets compile to prepare the CSS and JSS assets for production
  8. Deploy to production. Enjoy!

flask-tailwind-saas-starter-template's People

Contributors

blackbaba avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.