Introduction
What Slingshot is
Section titled “What Slingshot is”Slingshot is a backend framework that generates the boring parts so you can focus on the interesting parts.
Define a data model — you get CRUD routes, validation, OpenAPI docs, and storage wiring. Write custom routes where you need them. Organize everything into typed packages that compose cleanly as your app grows.
For a working code example, see the splash page or jump straight to the Quick Start. This page is the conceptual map; the next page after this one (First Steps) walks the project shape and boot lifecycle.
What you get
Section titled “What you get”- Generated CRUD — define a model, get
GET,POST,PATCH,DELETEroutes - Operations — add domain actions like
publish,archive,completealongside CRUD - Typed events — packages communicate through typed events, not imports
- Realtime — WebSockets and SSE are built-in, not bolted on
- Auth and permissions — sessions, OAuth, MFA, RBAC, and resource-level access control
- Background jobs — tasks and workflows that run off the request path
- Swappable storage — memory, SQLite, Postgres, MongoDB, Redis — change one line
- OpenAPI — every route shows up in generated API docs automatically
How it is organized
Section titled “How it is organized”app.config.ts (defineApp) └── Packages (definePackage) ├── Entities (defineEntity) → generated CRUD, operations, storage ├── Domain routes (route.*) → custom endpoints └── Public surface (definePackageContract) ├── publishes capabilities → typed cross-package services └── publishes entity refs → narrowed adapters for other packages- App config —
app.config.tsexportsdefineApp({...})as default. The CLI discovers the file and boots the server. Config covers security, databases, runtime, and secrets. - Packages — each feature area is a package with its own routes, middleware, and entities.
- Entities — define a model, get generated routes, operations, and storage that works across backends.
- Package Contracts — when another package consumes yours, declare a typed public surface so the boundary is explicit and validated at boot.
- Core features — events, realtime, auth, permissions, and jobs plug into the same model.
Where to start
Section titled “Where to start”The canonical journey (recommended for most readers):
- Quick Start — get a running app in three steps
- Composing an App — packages, routes, contracts, events, plugins
- Authoring Routes — per-route concerns: validation, DTO, idempotency
- Working with Data → Security → Realtime → Operations → Production
The sidebar follows this order. Walk down it once and you’ll have seen every layer of the framework.
If you learn best by doing:
- Quick Start — paste, run, curl, done
- Core Features — pick the feature you need
If you learn best by understanding the model:
- Authoring Model — how apps, packages, and entities fit together
- App Roots and Runtime — the framework assembly layer
- Package-First Authoring — organizing code into packages
- Entity System — the entity authoring and customization story
If you learn best from examples: