Generated CRUD
Define a model with defineEntity. Get GET, POST, PATCH, DELETE routes with validation
and OpenAPI docs.
import { defineApp, defineEntity, definePackage, entity, field } from '@lastshotlabs/slingshot';
const Task = defineEntity('Task', { namespace: 'app', fields: { id: field.string({ primary: true, default: 'uuid' }), title: field.string(), done: field.boolean({ default: false }), },});
export default defineApp({ port: 3000, packages: [definePackage({ name: 'app', entities: [entity({ config: Task })] })],});slingshot startFive routes, request validation, OpenAPI docs, and swappable storage — from one definition.
Generated CRUD
Define a model with defineEntity. Get GET, POST, PATCH, DELETE routes with validation
and OpenAPI docs.
Operations
Add domain actions like publish, archive, complete alongside CRUD. Each generates a typed,
documented route.
Events and the Event Bus
One event triggers many effects — welcome email, search index, admin notification. No coupling between packages.
Realtime
SSE for live updates. WebSockets for chat and collaboration. Both built in.
Auth and Permissions
Sessions, OAuth, MFA, passkeys, RBAC, and resource-level access control.
Swappable Storage
Memory for dev, SQLite for prototyping, Postgres for production. Same entity code.