Skip to main content

A production-ready Django project generator with optional HTMX, DRF, Docker, Celery, Redis, PostgreSQL, and MySQL support.

Project description

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.0.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.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver

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, serializers, and tests
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/
│   └── home/
├── core/
│   ├── settings/
│   │   ├── base.py
│   │   ├── dev.py
│   │   └── production.py
│   ├── urls.py
│   ├── asgi.py
│   └── wsgi.py
├── templates/
├── static/
├── media/
├── manage.py
├── requirements.txt
├── .env.example
└── 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 without --docker: SQLite
  • Default with --docker: PostgreSQL
  • Explicit: --database postgres, --database mysql, or --database sqlite

Generated settings safely handle an empty DATABASE_URL and support local fallback behavior for 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.0.0

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codefortify_starter-1.0.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codefortify_starter-1.0.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file codefortify_starter-1.0.0.tar.gz.

File metadata

  • Download URL: codefortify_starter-1.0.0.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for codefortify_starter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9712b002844128fc726e71766b4bd56ef7fb3cfa579de8039022af33e510424b
MD5 9e8c450d1e08c45d41be10cd84196ef6
BLAKE2b-256 38f72e7485115d8910f7bcd2cd176a67ec7142eae2861c8e520e9d8606e80ae4

See more details on using hashes here.

File details

Details for the file codefortify_starter-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codefortify_starter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12357220c771fc2e9571fe7721744a7887c3e4cd24f0d748a713461f77035f6c
MD5 cc79b13b00efdf38497bc8ee4a0d6c05
BLAKE2b-256 49ce0b9636864f005631a490993af68766673e900e908730d263bfec6fe18079

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page