This project demonstrates a minimal todo list application implemented with two different backend technologies:
- Django (Python) - A batteries-included web framework
- Rust (Axum) - A high-performance systems language
Both backends serve the same Vue.js/React frontend, showcasing how different technologies can implement identical functionality.
- Linux/macOS with Bash (Windows users can use WSL2)
- SQLite3 (usually pre-installed on Linux/macOS)
- Node.js
- Git
- Python 3.8+
- Django 4.2+
- Python packages:
pip install django djangorestframework django-cors-headers
- Rust 1.65+ (install via rustup)
- Cargo (Rust's package manager, included with Rust)
- SQLx CLI (for database migrations):
cargo install sqlx-cli --features native-tls,postgres,sqlite,mysql
- Required Rust crates (automatically handled by Cargo):
- Axum
- Tokio
- SQLx
- Serde
- npm
- Vite + React
- Axios 1.0+
ToDo-example/
├── todo-app/ # Django/Python implementation
│ ├── requirements.txt
│ ├── manage.py
│ └── todo/
│ | ├── models.py
│ | ├── views.py
│ | └── urls.py
| ├── frontend/ # Separated Vite frontend for urls diffence
│ ├── src/
│ | ├── components/
│ | ├── api/
│ | └── App.jsx
│
├── rust-backend/ # Rust/Axum implementation
│ ├── Cargo.toml
│ ├── src/
│ │ ├── main.rs
│ │ ├── routes.rs
│ │ └── models.rs
| ├── frontend/ # Separated Vite frontend for urls diffence
│ ├── src/
│ | ├── components/
│ | ├── api/
│ | └── App.jsx
│
└── README.md
Both implementations provide:
✅ Create, read, update, delete tasks
✅ Task completion toggle
✅ CSRF protection
✅ SQLite database persistence
✅ REST API endpoints
| Aspect | Django Implementation | Rust Implementation |
|---|---|---|
| Language | Python | Rust |
| Framework | Django | Axum |
| ORM | Django ORM | SQLx |
| Performance | Moderate | High |
| Safety | GC-managed | Compile-time checks |
| Boilerplate | More | Less |
cd /ToDo-example/todo-app/backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations todo
python manage.py migrate
python manage.py runservercd /ToDo-example/todo-app/frontend
npm install
npm run devcd /ToDo-example/todo-app-rs/backend
sqlx migrate run
cargo build --release
cargo runcd /ToDo-example/todo-app-rs/frontend
npm install
npm run devBoth backends implement the same API:
GET /api/tasks- List all tasksPOST /api/tasks- Create new taskPATCH /api/tasks/:id- Update taskDELETE /api/tasks/:id- Remove taskGET /api/csrf- Get CSRF token
This project serves as:
- A learning resource for comparing web frameworks
- A reference implementation for both stacks
- A demonstration of REST API design principles
- An example of decoupled frontend/backend architecture
Pull requests welcome! Please maintain:
- Feature parity between implementations
- Clean, documented code
- Consistent API responses
