Tailwind & Django - Free Starter

sm0ke

Sm0ke

Posted on October 4, 2023

Tailwind & Django - Free Starter

Hello Coders!

This article presents an open-source Tailwind & Django project styled with Flowbite, a popular UI Library built on top of Tailwind.

Rocket Django provides a minimal codebase, Tailwind-compatible tooling, Docker, and CI/CD support for Render. The product can be used to bootstrap any type of product on top of Django & Tailwind, two popular technologies for the modern web.


The product can be used in a local environment if NodeJs, Python, and (optionally) Docker are already present and properly configured.

For those interested in compiling the product, here are the steps (manual setup):

βœ… Clone/Download the sources

$ git clone https://github.com/app-generator/rocket-django.git
$ cd rocket-django
Enter fullscreen mode Exit fullscreen mode

βœ… Install Dependencies

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

βœ… Install Tailwind/Flowbite (another terminal)

$ cd static
$ yarn  
$ npx tailwindcss -i ./src/input.css -o ./dist/css/output.css --watch   
Enter fullscreen mode Exit fullscreen mode

βœ… Migrate Database

$ python manage.py makemigrations
$ python manage.py migrate
Enter fullscreen mode Exit fullscreen mode

βœ… Start the Django & Tailwind App

$ python manage.py createsuperuser # create the admin
$ python manage.py runserver       # start the project
Enter fullscreen mode Exit fullscreen mode

At this point, we should see the dashboard view provided by the Flowbite dashboard.

Tailwind & Django - Main Dashboard (Desktop & Mobile)


Another way to start the product is to use the Docker Compose Script shipped with the sources. By navigating to the root of the source code, this is what we need to type in the terminal:

$ docker-compose up --build 
Enter fullscreen mode Exit fullscreen mode

For Docker execution, the app starts on localhost:5085

This simple starter also provides a starter page with a responsive navigation bar and a hero section.

Tailwind & Django - The Starter Page (Flowbite Components)


βœ… Resources

For more resources and support, follow up on the links & information presented in the following section.


βœ… What is Tailwind

Tailwind CSS is a popular utility-first CSS framework used for building responsive and customizable web interfaces. It provides a set of pre-designed utility classes that you can apply directly to HTML elements to style and layout your web pages.

Tailwind CSS is known for its simplicity and flexibility, allowing developers to rapidly create modern and visually appealing user interfaces.

Utility-First ​

Tailwind CSS promotes a utility-first approach to styling, where you apply classes directly to HTML elements to define styles. These classes provide a wide range of styling options, such as colors, typography, spacing, and flexbox-based layouts.

Component-Oriented​

Tailwind CSS can be used in conjunction with component-based frameworks or libraries like Vue.js or React. You can build reusable UI components and apply Tailwind classes to style them.

Plugins​

Tailwind CSS supports plugins that add additional utility classes or functionality. This allows you to tailor the framework to your project's needs and integrate third-party plugins as well.

What is Tailwind - A popular CSS Framework


βœ… What is Django

Django is a high-level, open-source web framework written in Python that enables developers to build web applications quickly and with a clean, pragmatic design.

It follows the "batteries-included" philosophy, providing a comprehensive set of tools and libraries that simplify common web development tasks, such as handling databases, managing user authentication, and generating HTML templates.

Django can be used to code simple websites, CMS (content management system), eCommerce Platforms, APIs, or as an interface to ML/AI systems.

What is Django - A leading Backend Framework crafted in Python

πŸ’– πŸ’ͺ πŸ™… 🚩
sm0ke
Sm0ke

Posted on October 4, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Tailwind & Django - Free Starter
tailwindcss Tailwind & Django - Free Starter

October 4, 2023