djboost 🚀
One command. Production-ready Django REST API.
djboost generates a fully-configured Django REST API project in seconds — DRF, JWT, pagination, standard response format, and more. Add Celery, Docker, Swagger anytime with djboost add. No boilerplate. No config hunting.
pip install djboost
djboost create project myproject
That's it. Your project is ready.
✨ What you get
| Feature | Details |
|---|---|
| REST API | Django REST Framework + Simple JWT pre-configured |
| API Docs | Swagger UI + ReDoc at /api/schema/swagger-ui/ |
| Async Tasks | Celery + Redis (add only when needed) |
| WebSockets | Django Channels + Daphne ASGI server |
| Database | PostgreSQL config ready (SQLite default for dev) |
| Environment | python-decouple with fully pre-filled .env |
| Docker | Dockerfile + docker-compose.yml with 6 services |
| Security | CORS, CSRF, XSS headers, throttling all configured |
| Static Files | Whitenoise for efficient static file serving |
| Code Quality | pre-commit with black, flake8, isort |
| Testing | pytest + pytest-django with coverage |
| CI/CD | GitHub Actions and GitLab CI pipelines |
| Exception Handler | Global DRF handler → {"success": false, "message": "..."} |
| Response Format | Standard success/error/pagination format |
| Pagination | Custom pagination with meta info |
| Modular CLI | Add/remove features anytime with djboost add |
🚀 Quick Start
1 — Create a virtual environment
python -m venv env
# Windows
env\Scripts\activate
# Mac / Linux
source env/bin/activate
2 — Install djboost
pip install djboost
3 — Create your project
Navigate to an empty folder and run:
djboost create project myproject
This single command will:
- Install Django and scaffold the project
- Configure
settings.pywith production-ready settings - Generate
.envpre-filled with all required keys - Set up
pytest.ini,.pre-commit-config.yaml,.gitignore - Install only 13 essential dependencies (add more later as needed)
- Create
common/package with response helpers, pagination, and exception handler - Freeze
requirements.txt
📱 Creating Apps
cd myproject
djboost create app users
This creates a standard app structure:
apps/users/
├── views/ ← Multiple view files (not single file)
│ ├── __init__.py
│ └── users.py ← List + Detail views
├── serializers/ ← Multiple serializer files
│ ├── __init__.py
│ └── users.py ← Detail + List serializers
├── service/ ← Business logic layer
│ ├── __init__.py
│ └── helpers.py ← Helper functions
├── permissions.py ← Custom permissions (IsOwner, IsAdminOrReadOnly)
├── tasks.py ← Celery tasks template
├── models.py ← Standard model with UUID, user, timestamps
├── admin.py ← Admin config with list_display, filters
├── urls.py ← Standard URL patterns
├── apps.py ← App config (name = 'apps.users')
└── tests.py ← Fresh default Django test file
🔐 Creating Accounts App (Full Auth System)
Create a complete accounts app with all auth APIs ready:
djboost create accounts
This creates a production-ready accounts module:
apps/accounts/
├── models.py ← Custom User (email login), EmailOTP, AdminSectionPermission
├── permissions.py ← IsSuperAdmin, IsAdmin, HasSectionAccess, IsOwner
├── tasks.py ← Celery tasks for OTP emails, admin invitations
├── views/
│ ├── auth.py ← SignUp, SignIn, VerifyEmail, SocialLogin, RefreshToken
│ ├── password.py ← ForgotPassword, ResetPassword, ChangePassword
│ └── profile.py ← MyAccount (GET/PUT)
├── serializers/
│ ├── auth.py ← SignUp, SignIn, VerifyEmail, SocialLogin
│ ├── password.py ← ForgotPassword, ResetPassword, ChangePassword
│ └── profile.py ← UserProfile
├── urls.py ← All auth endpoints
├── admin.py ← User admin with role management
├── apps.py
├── tests.py
└── migrations/
API Endpoints:
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/sign-up |
Register new user |
| POST | /api/auth/verify-email |
Verify email with OTP |
| POST | /api/auth/resend-code |
Resend verification code |
| POST | /api/auth/sign-in |
Login with email/password |
| POST | /api/auth/forgot-password |
Request password reset |
| POST | /api/auth/verify-reset-code |
Verify reset code |
| POST | /api/auth/reset-password |
Reset password |
| POST | /api/auth/refresh-token |
Refresh JWT token |
| POST | /api/auth/social-login |
Social login (Google/Facebook/Apple) |
| POST | /api/auth/change-password |
Change password (authenticated) |
| GET | /api/auth/my-account |
Get profile (authenticated) |
| PUT | /api/auth/my-account |
Update profile (authenticated) |
📋 CI/CD Pipelines
Add or remove CI/CD any time — it's modular.
djboost add cicd github # GitHub Actions
djboost add cicd gitlab # GitLab CI
djboost remove cicd github
djboost remove cicd gitlab
⚡ Adding Celery
Add Celery to your existing Django project:
djboost add celery # Add Celery worker
djboost add celery-beat # Add Celery Beat scheduler
This will:
- Install
celery+redispackages - Generate
celery.pyandtasks.pyin your project - Update
settings.pywith Celery configuration - Update
requirements.txt
Removing Celery
djboost remove celery
This will:
- Uninstall
celery+redispackages - Remove
celery.pyandtasks.pyfiles - Remove Celery configuration from
settings.py - Remove Celery from
requirements.txt
🐳 Adding Docker
Add Docker configuration to your existing Django project:
djboost add docker
This will:
- Generate
Dockerfile - Generate
docker-compose.ymlwith 6 services:web- Django applicationdb- PostgreSQL databaseredis- Redis cache/brokercelery- Celery workercelery-beat- Celery Beat schedulerflower- Celery monitoring dashboard
- Generate
.dockerignore - Install
flowerpackage
📚 Adding API Documentation
Add Swagger/ReDoc API documentation:
djboost add api-docs swagger # Add Swagger UI
djboost add api-docs redoc # Add ReDoc
djboost add api-docs both # Add both
After adding, access your API docs at:
- Swagger UI:
http://localhost:8000/api/schema/swagger-ui/ - ReDoc:
http://localhost:8000/api/schema/redoc/
📊 Response Format
All responses follow a consistent format:
Success Response:
{
"success": true,
"message": "Data retrieved successfully.",
"data": [...]
}
Paginated Response:
{
"success": true,
"message": "Data retrieved successfully.",
"data": [...],
"meta": {
"count": 100,
"total_pages": 10,
"current_page": 1,
"page_size": 10
}
}
Error Response:
{
"success": false,
"message": "Invalid email or password.",
"data": null,
"errors": {
"email": ["This field is required."]
}
}
Usage in Views
from common.responses import success_response, error_response
from common.pagination import CustomPagination
# Success response
return success_response(message="User created", data=user_data)
# Error response
return error_response(message="Invalid credentials", status_code=401)
# Pagination
paginator = CustomPagination()
return paginator.paginate_data(
queryset=users,
request=request,
serializer_class=UserSerializer,
)
🏃 Running Your Project
python manage.py migrate
python manage.py runserver
| URL | Description |
|---|---|
http://127.0.0.1:8000/ |
Health check |
http://127.0.0.1:8000/admin/ |
Django Admin |
http://127.0.0.1:8000/api/schema/swagger-ui/ |
Swagger UI |
http://127.0.0.1:8000/api/schema/redoc/ |
ReDoc |
With Docker
docker-compose up --build
📖 CLI Reference
djboost --version # Show version
djboost --help # Show help
# Create commands
djboost create project [NAME] # Create new Django project (default: core)
djboost create app NAME # Create standard app with directory structure
djboost create accounts # Create full accounts app with auth APIs
# Add commands
djboost add cicd github|gitlab # Add CI/CD pipeline
djboost add celery # Add Celery worker + packages
djboost add celery-beat # Add Celery Beat scheduler
djboost add docker # Add Docker configuration
djboost add api-docs swagger|redoc|both # Add API documentation
# Remove commands
djboost remove cicd github|gitlab # Remove CI/CD pipeline
djboost remove celery # Remove Celery + uninstall packages
📦 Dependencies
Essential (installed with create project):
- Django REST Framework + Simple JWT
- django-cors-headers, python-decouple, Pillow
- drf-spectacular, whitenoise
- pytest, black, flake8, isort
Optional (add only when needed):
djboost add celery→ celery, redisdjboost add docker→ flower
📋 Requirements
- Python 3.10+
- Virtual environment (djboost will warn you if not activated)
📄 License
MIT — Munjur Alom
Release files for djboost 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djboost-0.3.1.tar.gz | 39.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djboost-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.5 kB
Release files / djboost-0.3.1.tar.gz
| Download URL | djboost-0.3.1.tar.gz |
|---|---|
| Size | 39.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e65277a103755eddd118e1de3bb7de0f1c7bbaec754edcc7d18733ed66298240
|
|
BLAKE2b-256 checksum How to use checksums |
a53f38f622e81e7b9b0fa31287df9b14b3e1aca42b6d3e807dc2394db2454889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / djboost-0.3.1-py3-none-any.whl
| Download URL | djboost-0.3.1-py3-none-any.whl |
|---|---|
| Size | 48.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fba05a598481f123ae30894d0013d490e409290b0bfe18e80725fbe979f0a17
|
|
BLAKE2b-256 checksum How to use checksums |
d616e7276955fe99d9058e18e3e117b03cdeddef266be48cbc0dec8c9f36fc53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|