Rocket Django
Open-source Django Starter styled with Tailwind and Flowbite.
This open-source starter incorporates a few modern technologies provided out-of-the-box, at a production-ready level. Rocket Django is actively versioned by AppSeed.
- 👉 Rocket Django -
LIVE Demo
- 👉 Rocket Django -
Source Code
✅ Product Features
The codebase is shipped with basic features that are usually implemented in most of the projects:
- Up-to-date Dependencies
- Tailwind/Flowbite Integration via WebPack
Extended User Model
- API via
DRF
- Charts
- DataTables (native Django)
Celery Beat
- Docker
✅ Manual Build
Download code
$ git clone https://github.com/app-generator/rocket-django.git
$ cd rocket-django
Install Node Modules
$ npm i
$ npm run build
Install Django modules via
VENV
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
Install Tailwind/Flowbite (separate terminal)
$ npm install
$ npm run dev
Migrate DB
$ python manage.py makemigrations
$ python manage.py migrate
Create Superuser & Start the APP
$ python manage.py createsuperuser # create the admin
$ python manage.py runserver # start the project
At this point, we should be able to access Rocket Django in the browser.
✅ Codebase
< PROJECT ROOT >
|
|-- core/ # Project Settings
| |-- settings.py
| |-- wsgi.py
| |-- urls.py
|
|-- home/ # Presentation app
| |-- views.py # serve the HOMEpage
| |-- urls.py
| |-- models.py
|
|-- apps/ # Utility Apps
| |-- common/ # defines models & helpers
| | |-- models.py
| | |-- util.py
| |-- users # Handles Authentication
| |-- api # DRF managed API
| |-- charts # Showcase Different Charts
| |-- tables # Implements DataTables
| |-- tasks # Celery, async processing
|
|-- templates/ # UI templates
|-- static/ # Tailwind/Flowbite
| |-- src/ #
| |-- input.css # CSS Styling
|
|-- Dockerfile # Docker
|-- docker-compose.yml # Docker
|
|-- render.yml # CI/CD for Render
|-- build.sh # CI/CD for Render
|
|-- manage.py # Django Entry-Point
|-- requirements.txt # dependencies
|-- .env # ENV File
|
|-- *************************************************
✅ Extended User Profile
Authenticated user are able to save their information and an IMAGE avatar. The fields that manage the user information can be found in apps/users/models.py
ROLE_CHOICES = (
('admin' , 'Admin'),
('user' , 'User'),
)
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='user')
full_name = models.CharField(max_length=255, null=True, blank=True)
country = models.CharField(max_length=255, null=True, blank=True)
city = models.CharField(max_length=255, null=True, blank=True)
zip_code = models.CharField(max_length=255, null=True, blank=True)
address = models.CharField(max_length=255, null=True, blank=True)
phone = models.CharField(max_length=255, null=True, blank=True)
avatar = models.ImageField(upload_to='avatar', null=True, blank=True)
def __str__(self):
return self.user.username
Here is the correspondent UI (requires authentication)
✅ API Via DRF
The Products model is managed in two different ways: via API (powered by DRF) and a simple, intuitive DataTable view.
class Product(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length = 100)
info = models.CharField(max_length = 100, default = '')
price = models.IntegerField(blank=True, null=True)
def __str__(self):
return self.name
The authenticated users are able to submit products using the DRF UI:
✅ DataTables
Products
information can be easily managed using the DataTable layout styled with Tailwind & Flowbite. Supported features:
- Create/Update/Delete
- Pagination
- Search
✅ Resources
- 👉 Access AppSeed for more starters and support
- 👉 Deploy Projects on Aws, Azure and DO via DeployPRO
- 👉 Create landing pages with Simpllo, an open-source site builder
- 👉 Build apps with Django App Generator (free service)