Puerto
Open Source · Rust Framework

Scaffold. Structure. Ship.

Stop bikeshedding your architecture. Puerto gives Rust developers the productivity of Rails with the safety of Rust's type system.

puerto — zsh — 80×24
~ puerto new my-app
// Constructing project skeleton...
├── business/ (domain logic)
├── infrastructure/ (adapters)
├── presentation/ (openapi routes)
└── Cargo.toml
✓ Project 'my-app' initialized successfully.
~ puerto generate scaffold User
business/ — model, errors, repository trait, use cases
infrastructure/ — InMemoryUserRepository
presentation/ — routes, dto, responses, error mapper
✓ Done in 0.3s. Zero manual wiring.

Clean Architecture, Zero Decisions

Every Puerto project ships with a battle-tested 3-layer DDD structure.

business/
Domain + Application

Pure business logic. No framework dependencies. 100% testable with mockall-generated mocks.

infrastructure/
Adapters

Database, external APIs. Implements your domain ports. Swap InMemory for Postgres with one flag.

presentation/
HTTP API

poem-openapi routes with auto-generated Swagger UI. Dependency injection wired automatically.

dependency rule: domain ← application ← infrastructure ← presentation

From zero to DDD
in 30 seconds

01

Install the Puerto CLI

$ cargo install puerto
02

Create a new project with interactive setup

$ puerto new my-app
03

Scaffold a full DDD entity across all layers

$ puerto generate scaffold User

Built for how you actually work

AI-Ready

Rust's compiler catches AI-generated errors instantly. Precise, actionable feedback on every generation.

Convention over Config

Standardized structure across every project. Navigate any Puerto codebase from day one.

Zero Boilerplate

Full DDD entity across all layers with one command. Repository traits, mocks, and unit tests included.

Type-Safe by Default

Strict Rust types from domain to API layer. Define fields once in puerto.toml — structs, DTOs, and SQL columns are generated with the right types automatically.

Auto-wired DI

bootstrap.rs generated automatically from puerto.toml. No manual dependency wiring.

Built for SQLx

First-class Postgres support. Enable once with --db at project creation — every scaffold infers it automatically.

Start building in seconds.

Join developers building production Rust apps without the architecture tax.