A production-ready Django + Vue.js project generator
Project description
Django + Vue.js Project Generator
A CLI tool to scaffold production-ready Django + Vue.js full-stack applications with authentication, Docker, and CI/CD out of the box.
Features
- Django Backend: DRF, JWT authentication, custom user model, PostgreSQL
- Vue.js Frontend: Vue 3, Vite, Pinia, Vue Router with guards
- Complete Auth System: Login, register, password reset, profile management
- Todo CRUD Example: Full working example with create, read, update, delete
- Docker Ready: Development and production Docker Compose configurations
- CI/CD Pipeline: GitHub Actions with lint, test, and build stages
- Code Quality: Pre-commit hooks with Black, Ruff, ESLint, Prettier
- Celery + Redis: Background task processing (optional)
- Production Ready: Nginx, Gunicorn, WhiteNoise for static files
Prerequisites
Before you start, ensure you have the following installed on your machine:
| Component | Required Version | Purpose | Check Command |
|---|---|---|---|
| Python | 3.10+ | Backend runtime | python --version |
| Node.js | 18+ | Frontend runtime | node --version |
| npm | 9+ | Package manager | npm --version |
| Git | Latest | Version control | git --version |
Optional (for Docker mode)
To run the project in Docker containers (recommended for production parity):
- Docker Engine: 20.10+
- Docker Compose: 2.0+
[!NOTE] If you don't have these tools,
django-vue-startwill warn you or attempt to handle dependencies (like creating a virtualenv) automatically where possible.
Quick Start
Method 1: Using npx (Recommended)
npx create-django-vue-app my_project
cd my_project
django-vue-start run dev
Method 2: Using pip
# Install the CLI tool
pip install django-vue-start
# Create a new project
django-vue-start new my_project
# Navigate and run
cd my_project
django-vue-start run dev
Method 3: Install npm package globally
npm install -g create-django-vue-app
create-django-vue-app my_project
Running Your Project
After creating a project:
cd my_project
# Start development servers (Django + Vue)
django-vue-start run dev
# Or with Docker
django-vue-start run dev --docker
Access your app:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/api/
- API Docs: http://localhost:8000/api/schema/swagger-ui/
- Django Admin: http://localhost:8000/admin/
CLI Commands
# Create new project
django-vue-start new [project_name]
# Run development servers
django-vue-start run dev # Local mode (SQLite)
django-vue-start run dev --docker # Docker mode (PostgreSQL)
# Run migrations
django-vue-start run migrate
# Run migrations
django-vue-start run migrate
# Open Django shell
django-vue-start run shell
# Create Superuser (Admin)
cd backend
source .venv/bin/activate # On Windows: .venv\Scripts\activate
python manage.py createsuperuser
Project Generation Options
django-vue-start new [OPTIONS]
Options:
--database [postgresql|sqlite|mysql] Database backend
--auth [jwt|session] Authentication type
--celery / --no-celery Include Celery
--allauth / --no-allauth Include social auth
--skip-prompts Use defaults
Generated Project Structure
my_project/
├── backend/
│ ├── config/settings/ # Django settings
│ ├── core/ # Custom User model
│ ├── todos/ # CRUD example app
│ ├── .env # Environment variables
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── api/ # Axios with JWT
│ │ ├── components/ # AppHeader, AppFooter
│ │ ├── router/ # Vue Router
│ │ ├── stores/ # Pinia auth store
│ │ └── views/ # Pages (Login, Profile, Todos)
│ └── package.json
├── docker-compose.yml
└── README.md
Built-in Features
Authentication
- User registration with email
- Login/logout with JWT cookies
- Profile editing (username, email)
- Password change
- Password reset via email
Todo CRUD Example
- Create, read, update, delete todos
- Toggle complete/incomplete
- User-scoped (each user sees only their todos)
Documentation
- User Guide - Getting started and usage
- Authentication - Auth flow docs
- Environment - Configuration reference
- Deployment - Production deployment
Development
Setup for Contributors
# Clone
git clone https://github.com/abdullafajal/django-vue-start.git
cd django-vue-start
# Install
pip install -e .
# Test
pytest tests/ -v
Publishing
PyPI
pip install build twine
python -m build
twine upload dist/*
npm
npm publish --otp=YOUR_2FA_CODE
License
MIT License - see LICENSE file.
Credits
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_vue_start-1.0.6.tar.gz.
File metadata
- Download URL: django_vue_start-1.0.6.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c601b2b350ed12bd516ef8e8d87a5d83cb7b9bc0f21799f723bb8eecfbe86727
|
|
| MD5 |
22659a7ea4c3ac1ca093d759c9c29c0b
|
|
| BLAKE2b-256 |
018e5b1d07f9285d4caff8be1fad8f46469520f745dc495f244c632300b9e693
|
File details
Details for the file django_vue_start-1.0.6-py3-none-any.whl.
File metadata
- Download URL: django_vue_start-1.0.6-py3-none-any.whl
- Upload date:
- Size: 61.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85cfd8145401412b23014cf996deeae7a59939260b29d09a382ec024476fb6e3
|
|
| MD5 |
78920cde5588e62629baa69d3ec50957
|
|
| BLAKE2b-256 |
7c1e8db9c4a5dd1b59a92b9d4ae2d01696fcfa98c52f0a484c2b669336e44c03
|