Production-Ready Django REST API
A robust, scalable REST API foundation built with Django and modern best practices. Featuring JWT authentication, comprehensive user management, and enterprise-grade security out of the box.
Explore the API
Getting Started
Follow these simple steps to get Shirobase up and running on your local machine
Command Usage
Use
uv run <command>
if you don't have a virtual environment activated. Otherwise, use
python <command>
directly.
Prerequisites
- ▸ Python 3.14+ installed
-
▸
uvpackage manager
Clone Repository
>> git clone https://github.com/TrippleA-Ashaba/shirobase.git your-project
>> cd your-project
Install Dependencies
uv sync
Lightning-fast dependency installation with uv
Configure Environment
Create a .env file:
SECRET_KEY=your-secret-key
DEBUG=True
USE_SQLITE=False
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=your_database_host
DB_PORT=your_database_port
ALLOWED_HOSTS=localhost,127.0.0.1
ALLOWED_HOSTS=localhost,127.0.0.1
Run Migrations
uv run python manage.py migrate
# or: python manage.py migrate
Create Superuser
uv run python manage.py createsuperuser
# or: python manage.py createsuperuser
🚀 Launch Your Server
uv run python manage.py runserver
# or: python manage.py runserver
Visit http://localhost:8000 to see
your application running!
🧪 Running Tests
Run all tests:
uv run pytest
# or: pytest
Run with coverage:
uv run pytest --cov
# or: pytest --cov
Run specific test file:
uv run pytest path/to/test.py
# or: pytest path/to/test.py
Run specific test function:
uv run pytest path/to/test.py::test_name
# or: pytest path/to/test.py::test_name
About the Project
Shirobase is a carefully crafted Django REST API starter template designed to accelerate your development process. It eliminates the tedious setup phase by providing a solid foundation with authentication, user management, and essential middleware configurations already in place.
Built with scalability and security in mind, Shirobase integrates industry-standard libraries like Django REST Framework for API development, SimpleJWT for stateless authentication, and django-allauth for comprehensive account management. Whether you're building a SaaS application, mobile backend, or microservice, Shirobase provides the building blocks you need.
The architecture follows Django best practices with a modular app structure, making it easy to extend and maintain. Built-in features include password reset flows, email verification, token blacklisting, audit logging, and automatic API documentation with Swagger UI.
Tech Stack
Core Framework
- • Django 5.2+
- • Django REST Framework
- • Python 3.14+
Authentication
- • SimpleJWT
- • dj-rest-auth
- • django-allauth
Database
- • PostgreSQL
- • SQLite (Dev)
API Documentation
- • drf-spectacular
- • Swagger UI
- • OpenAPI 3.0
Developer Tools
- • Django Debug Toolbar
- • django-extensions
- • Loguru Logging
Additional Features
- • Audit Logging
- • Author Tracking
- • WhiteNoise Static Files
Key Features
JWT Authentication
Secure, stateless authentication with token refresh and blacklisting
User Management
Complete user registration, login, and profile management flows
Password Reset
Email-based password reset with secure token generation
API Documentation
Auto-generated, interactive API docs with Swagger UI
Audit Logging
Track all model changes with comprehensive audit trails
Docker Ready
Containerized setup for consistent development and deployment