Shaperail is a framework for teams that want a small source of truth, predictable generation, and a runtime that behaves exactly like the schema says it should.
The shortest correct path
cargo install shaperail-cli
shaperail init my-app
cd my-app
docker compose up -d
shaperail serve
Open the generated app:
http://localhost:3000/docshttp://localhost:3000/openapi.jsonhttp://localhost:3000/health
What Shaperail is optimized for
- Explicit resource definitions with no hidden route generation
- Flat abstractions where the resource file maps directly to runtime behavior
- Deterministic OpenAPI output and route registration
- Docker-first local development with Postgres and Redis already wired
- Generated apps that expose docs, health checks, and observability from day one
What you actually author
These are the files a Shaperail user edits in day-to-day work:
| File | Why it matters |
|---|---|
resources/*.yaml | Defines schema, endpoints, auth rules, relations, filters, pagination, and indexes |
migrations/*.sql | Stores the SQL that changes the running database |
shaperail.config.yaml | Holds service-level settings such as port, DB, cache, and auth config |
.env | Connects the app to local or deployed services |
docker-compose.yml | Boots Postgres and Redis for development |
Start here
- Follow Getting started until you have a running app.
- Read Resource guide to learn the schema contract.
- Review CLI reference for the day-to-day command set.
- Use the Blog API example as a complete sample app.