বাΰ¦ΰ¦²ΰ¦Ύΰ§ README ফাΰ¦ΰ¦²ΰ¦ΰ¦Ώ ΰ¦ͺΰ§ΰ§ দΰ§ΰ¦ΰ§ΰ¦¨ ΰ¦ΰ¦ΰ¦Ύΰ¦¨ΰ§ (README.bn.md)
One Click DRF is a powerful CLI tool designed to bootstrap production-ready Django REST Framework projects in seconds.
β Star us on GitHub β your support motivates us a lot! ππ
Stop copy-pasting code from old projects. Start with a solid foundation.
Every time a new project starts at the office, I see a familiar cycle: developers need to start everything from scratch, from ground zero, through repetitive and manual work like this:
- Repetitive Installations: Manually installing
djangorestframework,django-cors-headers,drf-yasg(Swagger), and other essential packages every single time. - Settings Fatigue: Manually tweaking settings, creating
.envfiles, and mapping them to variables. - The Hunt: Going to GitHub just to find a standard Python
.gitignore. - Human Error: Forgetting something criticalβlike CORS settingsβonly to realize it hours later when the frontend developer can't connect.
- Confidence Gap: Even after hours of setup, no one is 100% sure if the environment is truly "perfect" or "production-ready."
One Click DRF was born to solve this. It automates these repetitive tasks and guarantees a battle-tested, production-ready foundation in seconds. No more copy-pasting, no more forgotten settingsβjust one command to start building what actually matters.
When you initialize a project with ocd, youβre not just getting a folderβyouβre getting a full production environment:
- π³ Docker Ready: Multi-stage
Dockerfileanddocker-compose.ymlfor development and production. - βοΈ CI/CD (GitHub Actions): Pre-configured workflows for automated testing, linting, and deployment.
- ποΈ Infrastructure as Code (IaC): Terraform templates to manage your cloud resource effortlessly.
- βοΈ AWS Deployment Ready: Built-in configurations to deploy your backend to AWS with confidence.
- π Monitoring & Observability: Integrated Prometheus and Grafana setup to keep an eye on your app's health.
- π οΈ Production Settings & .env: Professionally split
settings.pyand automatically generated.envfile. - π Swagger API Ready: Instant API documentation with
drf-yasgso you're ready to test immediately. - π Organized Apps Folder: A clean architecture where all your Django apps live in a dedicated
apps/directory. - π Standard .gitignore: A pre-configured, standard Python
.gitignoreso you don't have to find one. - π GitHub Integration: Option to automatically initialize a git repo and push to a new GitHub repository in one go.
Since one-click-drf is a CLI tool, it is recommended to install it globally using uv:
uv tool install one-click-drfIf your system doesn't have uv yet, follow the installation guide here.
Alternatively, you can use pip:
pip install one-click-drfocd init myprojectThis creates a new folder myproject with a production-ready structure.
ocd init .You can mix and match flags:
ocd init myproject --docker --ci-cdOr enable everything:
ocd init myproject --allocd --version
# or
ocd versionocd update| Flag | Description |
|---|---|
--docker |
Adds Dockerfile and docker-compose.yml |
--ci-cd |
Adds GitHub Actions workflow for testing & linting |
--iac |
Adds Terraform skeleton for AWS |
--observability |
Adds Prometheus configuration |
--all |
Enables all above features |
We follow a clean, modular structure where the Django backend is isolated in its own directory, and infrastructure/deployment files are organized at the root:
project-root/
βββ backend/ # Django backend source code
β βββ core/ # Project configuration (settings.py, urls.py, etc.)
β βββ apps/ # Your Django apps live here
β βββ manage.py # Django management CLI
β βββ .env # Environment variables
β βββ .gitignore # Backend-specific ignore rules
β βββ Dockerfile # Backend container definition
β βββ erd.sh # ERD generation utility
β βββ requirements/ # Dependencies split (base, dev, prod)
βββ nginx/ # Nginx proxy configuration
βββ .github/ # CI/CD (GitHub Actions workflows)
βββ infra/ # Infrastructure as Code (Terraform & Ansible)
βββ monitoring/ # Observability (Prometheus/Grafana)
βββ docker-compose.yml # Root orchestration for all services
βββ DEVELOPMENT_GUIDE.md # Detailed guide to get started
This structure is intentionally designed for scaling into a full-stack or microservices architecture:
- Full-Stack Ready: Need a frontend? Simply add a
frontend/folder (React, Next.js, Vue, etc.) at the root. - Microservices/AI Ready: You can easily plug in other services like
ml-service/orai-apps/in their own folders next to the backend. - Simplified Orchestration: Any new service can be integrated into the root
docker-compose.ymland CI/CD pipelines, ensuring your entire ecosystem remains easy to deploy in the cloud.
We welcome contributions!
- Fork the repo.
- Clone it clearly.
- Install dependencies:
uv syncorpip install -e . - Add a new generator in
one_click_drf/generators.pyor new templates inone_click_drf/templates/.
On first run, ocd will ask for your GitHub and DockerHub usernames. These are saved in ~/.config/one-click-drf/config.toml so you don't have to type them again.
