CMS
Pages made of sections made of typed, translatable fields. Shared sections, menus, drafts with preview links, and an admin screen built for whoever writes the copy rather than whoever wrote the models.
A production-oriented Django and Django Ninja starter. Secure defaults, health checks, OpenAPI docs, tests, typing and CI on day one, with auth, CMS, shop and notifications as opt-in apps that install nothing until you name them.
pipx install django-ninja-starter
Feature apps
Name an app in its environment variable, run make migrate, restart. Leave it unset and the
project carries no tables, routes or admin for it at all.
Pages made of sections made of typed, translatable fields. Shared sections, menus, drafts with preview links, and an admin screen built for whoever writes the copy rather than whoever wrote the models.
A read API and a WebSocket that pushes new notifications the moment they exist, with the history, badge and read state kept in sync across devices.
A storefront with variants, several sellers, discount campaigns, reviews, baskets, and an order cycle that reserves stock, issues an invoice and settles a payment.
A wallet per account, every way money moves in and out, and a balance derived from the movements rather than stored.
Live chat and support tickets between a client and the desk, over four transports at once.
Clubs with a levelled ladder, and missions that complete themselves from what the rest of the deployment does.
Accounts register https endpoints; matching events are POSTed signed, retried and recorded.
Owned uploads on disk or S3, and feature flags with per-account overrides and percentage rollouts.
Authentication
Each method, factor, provider and token mode is a separate app. Every login mints a signed JWT.
One backend, four transports
Every JSON response carries the same envelope, so a client handles success and failure one way.
/api/v1/…/graphqlmake grpcnotifications feedOne command creates the router, a matching test, and registers it in both the OpenAPI schema and the Swagger version selector.
# creates src/apps/users/api/v1.py + test
python manage.py startapi users --api-version v1
# GET /api/v1/users/
# Swagger: /api/docs
# ReDoc: /api/redoc
The same six keys on success and failure. Clients key their translations off the title enum.
{
"errors": null,
"data": { /* payload */ },
"isSuccess": true,
"statusCode": 200,
"title": "SUCCESS",
"description": "The request succeeded."
}
Quick start
Install the generator, create a project, then set it up. The generator refuses to overwrite a non-empty directory.
pipx, or use the GitHub Template instead.--directory..env.example./api/docs.pipx install django-ninja-starter
django-ninja-starter my-api
cd my-api
python3 -m venv .venv
source .venv/bin/activate
make install
cp .env.example .env
make migrate
make run
Production-oriented
Defaults you would otherwise argue about in week three.
make and CI.FAQ
Both. Use the GitHub Template button, or install the generator with pipx and run django-ninja-starter my-api.
A generated project ships the feature apps turned off. Set the app's DJANGO_*_ENABLED variable, migrate and restart, and its routes appear.
PostgreSQL is supported for production. Settings are driven by environment variables.
Yes. Open /api/docs. Signed in to the admin as staff, the page authorises itself for Try it out.
AGPL-3.0. See the LICENSE file in the repository.
Read the docs one app at a time, or generate a project and turn things on as you grow.