codefortify-starter
codefortify-starter is a professional Django project starter generator for building clean, scalable, and production-ready Django applications faster.
It creates a modern Django architecture with a structured settings layout, reusable app organization, environment-based configuration, templates, static/media setup, and optional support for HTMX, Django REST Framework, Docker, Celery, Redis, PostgreSQL, and MySQL.
Whether you need a simple Django MVT project or a full API-ready Dockerized architecture with background workers, codefortify-starter gives you a consistent foundation for starting new projects.
What It Is
codefortify-starter is a PyPI-installable Django project generator that helps developers quickly scaffold clean, maintainable, production-ready Django architectures.
By default, it generates a simple Django MVT project. With flags, it can add HTMX, DRF, Docker, Celery, Redis, PostgreSQL, and MySQL.
Why It Exists
Most Django projects repeat the same setup work: project layout, settings split, dependency wiring, env bootstrapping, and deployment scaffolding. codefortify-starter reduces that repeated effort and standardizes project initialization.
Who Should Use It
- Django developers starting new applications
- Teams that want a consistent starter architecture
- Backend/API engineers who need optional DRF, Docker, and Celery setup
- Developers who want a lightweight alternative to larger templating frameworks
Installation
Install from PyPI:
pip install codefortify-starter
Install an exact version:
pip install codefortify-starter==1.2.0
Verify the CLI:
codefortify-startproject --help
Quick Start
Create a basic Django MVT project:
codefortify-startproject myproject
cd myproject
python -m venv .venv
source .venv/bin/activate
pip install -r requirements/dev.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver
Requirements files:
- Development:
pip install -r requirements/dev.txt - Production:
pip install -r requirements/production.txt - Minimal runtime:
pip install -r requirements/base.txt
Supported CLI Flags
--htmx--drf--docker--celery--database [sqlite|postgres|mysql]--no-git--force--directory PATH--all
Command Examples
codefortify-startproject myproject
codefortify-startproject myproject --htmx
codefortify-startproject myproject --drf
codefortify-startproject myproject --docker
codefortify-startproject myproject --celery
codefortify-startproject myproject --docker --celery
codefortify-startproject myproject --drf --docker --celery
codefortify-startproject myproject --database postgres
codefortify-startproject myproject --database mysql
codefortify-startproject myproject --no-git
codefortify-startproject myproject --force
codefortify-startproject myproject --directory /path/to/projects
codefortify-startproject myproject --all
--all is equivalent to:
codefortify-startproject myproject --htmx --drf --docker --celery --database postgres
Feature Matrix
| Feature | Flag | Description |
|---|---|---|
| Django MVT | default | Clean Django project with settings, templates, static/media, and home app |
| HTMX | --htmx |
Adds django-htmx, middleware, and example partial views |
| Django REST Framework | --drf |
Adds DRF, API app, API routes, and REST config |
| Docker | --docker |
Adds Dockerfile, docker-compose, entrypoint, deployment script, and Docker docs |
| Celery + Redis | --celery |
Adds Celery config, Redis broker settings, and example task |
| PostgreSQL | --database postgres |
Adds PostgreSQL-ready configuration |
| MySQL | --database mysql |
Adds MySQL-ready configuration |
| Full stack | --all |
Adds HTMX, DRF, Docker, Celery, Redis, and PostgreSQL |
Generated Architecture
myproject/
├── apps/
│ ├── accounts/
│ ├── common/
│ └── home/
├── core/
│ ├── settings/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── dev.py
│ │ ├── production.py
│ │ └── test.py
│ ├── urls.py
│ ├── asgi.py
│ ├── wsgi.py
│ ├── templates/
│ ├── static/
│ └── media/
├── docs/
├── scripts/
├── manage.py
├── requirements/
│ ├── base.txt
│ ├── dev.txt
│ ├── production.txt
│ └── test.txt
├── tests/
├── .env.example
├── .gitignore
├── Makefile
└── README.md
Feature-specific files are added only when their flags are selected (for example apps/api, core/celery.py, Dockerfile, compose files, and task modules).
Database Options
- Default: SQLite
- Explicit:
--database postgres,--database mysql, or--database sqlite --allsets PostgreSQL automatically.
Generated settings use environment variables with sane defaults for local development.
HTMX Usage
Generate with HTMX:
codefortify-startproject myproject --htmx
The generated project includes HTMX middleware and an example partial endpoint.
DRF Usage
Generate with DRF:
codefortify-startproject myproject --drf
The generated API app includes a health endpoint:
GET /api/health/
Docker Usage
codefortify-startproject myproject --docker
cd myproject
cp .env.example .env
docker compose build
docker compose up -d
docker compose exec web python manage.py migrate
Celery Usage
Generate with Celery support:
codefortify-startproject myproject --celery
Run worker locally:
celery -A core worker -l info
Full Stack Usage
codefortify-startproject myproject --all
cd myproject
cp .env.example .env
docker compose build
docker compose up -d
docker compose ps
Local Development (This Package)
python -m venv .pkgvenv
source .pkgvenv/bin/activate
pip install -r requirements.txt
pip install -e .
python -m pytest -q tests
Build and Publish
Build and validate:
rm -rf dist build *.egg-info
python -m build
twine check dist/*
Publish to TestPyPI:
twine upload --repository testpypi dist/*
Publish to PyPI:
twine upload dist/*
Testing from TestPyPI
Use this only for testing pre-release package builds:
pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
codefortify-starter==1.2.0
License
MIT License. See LICENSE.
Metadata
Release files for codefortify-starter 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codefortify_starter-1.2.0.tar.gz | 38.3 kB | Without provenance | Details for codefortify_starter-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codefortify_starter-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for codefortify_starter-1.2.0-py3-none-any.whl |
Total release size: 101.7 kB
Release files / codefortify_starter-1.2.0.tar.gz
| Download URL | codefortify_starter-1.2.0.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b856dd81eaa1c02c60dbb8fe99d3856b35bd17ce02b834a44a05086897364220
|
|
BLAKE2b-256 checksum How to use checksums |
21c1738b41a8c19e99c1a68f7bff8bdca98787fe28ddd62bc85ce3130103bdfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / codefortify_starter-1.2.0-py3-none-any.whl
| Download URL | codefortify_starter-1.2.0-py3-none-any.whl |
|---|---|
| Size | 63.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd991877c0e60b9c3854f7354f7449d4c87f1e0065441003ddf08e9b424b60b1
|
|
BLAKE2b-256 checksum How to use checksums |
af2e695b32b4f21a70d63eafcc6e021fb6fdabc3ac4f5e3e308a1ac18649df93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for codefortify-starter 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.