Every time I start a new Django project, I end up rebuilding the same foundation from scratch. Dark/light theme toggle? Yep. Google Analytics wiring? Yep. Security headers, rate limiting, robots.txt, health checks? All of it, again, from memory, at 11pm. So I finally just built the thing once and committed it to GitHub. Introducing my Django boilerplate: a production-ready starter I put together from patterns I've refined building real ML-powered apps. It includes: * A full Django 6 project structure with Postgres, WhiteNoise, and Gunicorn ready to deploy to Heroku. * A complete ML app scaffold (data pipeline, feature engineering, model classes, MLflow tracking, inference pipeline, and a monitoring buffer model) so the first thing you write is actual ML logic, not plumbing * Dark/light theme toggle that doesn't flash on load * CSP middleware, rate limiting, and HSTS wired up correctly out of the box * GitHub Actions CI that lints and runs tests on every push * 27 tests, zero lint errors on day one The idea is simple: next time I start something, I want to be writing the interesting parts in the first hour, not the fourth. If you work in Python and find yourself rebuilding the same boilerplate over and over, feel free to fork it and make it yours. Link in the comments. #Python #Django #MachineLearning #MLOps #SoftwareEngineering #OpenSource
I've done the same for Rails because I found myself doing the exact same thing.
Repo Link: https://github.com/CKDarling/django-boilerplate