RapidKit Documentation
Complete guide to building backend projects at warp speed
Getting Started
Installation
RapidKit requires Python 3.10 or higher. Install the CLI using one of the following methods:
Recommended: Using pipx
pipx installs the CLI in an isolated environment, preventing dependency conflicts.
pipx install rapidkitUsing pip
pip install rapidkitUser installation (no sudo required)
pip install --user rapidkitrapidkit --versionCreating Your First Project
Use the interactive wizard to create a new project:
rapidkit createThis will prompt you to select:
- โขProject type (API, Microservice, Monolith)
- โขFramework (FastAPI, NestJS, Django)
- โขProject template
- โขProject name
Non-interactive mode
Create a project without prompts:
rapidkit create project fastapi.standard my-apiCLI Commands
rapidkit create
Create a new project from templates.
# Interactive mode
rapidkit create
# Non-interactive mode
rapidkit create project <template> <name>
# Examples:
rapidkit create project fastapi.standard my-api
rapidkit create project nestjs.microservice user-servicerapidkit add
Add modules to your existing project.
# Add a module
rapidkit add module <module-name>
# Examples:
rapidkit add module auth
rapidkit add module logging
rapidkit add module docker-deploymentrapidkit dev
Start the development server with hot-reload.
# Start dev server
poetry run rapidkit dev
# With custom port
poetry run rapidkit dev --port 3000
# With custom host
poetry run rapidkit dev --host 0.0.0.0rapidkit build
Build your project for production.
# Build for production
rapidkit build
# Build with Docker
rapidkit build --docker
# Build and optimize
rapidkit build --optimizerapidkit test
Run tests for your project.
# Run all tests
rapidkit test
# Run specific test file
rapidkit test tests/test_auth.py
# Run with coverage
rapidkit test --coveragerapidkit list
List available templates and modules.
# List all templates
rapidkit list templates
# List all modules
rapidkit list modules
# List installed modules
rapidkit list installedModule System
What are Modules?
Modules are self-contained, production-ready components that you can add to your RapidKit projects. Each module follows Clean Architecture principles and integrates seamlessly with your project.
Module Features:
- Clean Architecture with DDD patterns
- Dependency injection ready
- Comprehensive test coverage
- Framework-agnostic design
- Easy configuration
Installing Modules
Add modules to your project using the CLI:
# Navigate to your project
cd my-api
# Add a module
rapidkit add module auth
# Install dependencies
poetry installBrowse Available Modules
Explore our collection of modules across different categories:
๐ Authentication
JWT, OAuth2, social login, 2FA
๐๏ธ Database
ORM, migrations, connection pooling
โก API
Rate limiting, validation, caching
๐ Monitoring
Logging, metrics, observability
๐ณ Deployment
Docker, K8s, CI/CD pipelines
๐งช Testing
Unit, integration, E2E testing
Project Structure
Typical RapidKit Project
RapidKit projects follow Clean Architecture principles with a clear separation of concerns:
my-api/
โโโ src/
โ โโโ core/ # Domain layer
โ โ โโโ entities/ # Business entities
โ โ โโโ use_cases/ # Business logic
โ โ โโโ interfaces/ # Abstract interfaces
โ โโโ infrastructure/ # External services
โ โ โโโ database/ # DB implementations
โ โ โโโ cache/ # Cache implementations
โ โ โโโ external/ # Third-party APIs
โ โโโ presentation/ # API layer
โ โ โโโ api/ # Route handlers
โ โ โโโ schemas/ # Request/response models
โ โ โโโ middleware/ # API middleware
โ โโโ modules/ # Installed modules
โ โโโ auth/
โ โโโ logging/
โ โโโ email/
โโโ tests/ # Test files
โโโ config/ # Configuration
โโโ pyproject.toml # Poetry dependencies
โโโ README.mdKey Principles:
- Dependency Inversion: Core depends on abstractions, not implementations
- Modularity: Modules are self-contained and independent
- Testability: Business logic isolated from infrastructure
Configuration
Environment Configuration
RapidKit uses environment variables and configuration files for project settings.
Create a .env file:
# Application
APP_NAME=my-api
APP_ENV=development
APP_DEBUG=true
# Server
HOST=0.0.0.0
PORT=8000
# Database
DATABASE_URL=postgresql://user:pass@localhost/dbname
# Redis
REDIS_URL=redis://localhost:6379
# JWT
JWT_SECRET=your-secret-key
JWT_ALGORITHM=HS256
JWT_EXPIRATION=3600Ready to Build?
You now have everything you need to start building with RapidKit. Here are some next steps: