Runtime and Infrastructure
Slingshot treats infrastructure as part of app assembly, not as scattered package-local setup.
A representative production root
Section titled “A representative production root”// @skip-typecheckimport { type AppConfig, defineApp } from '@lastshotlabs/slingshot';
declare const myRuntime: AppConfig['runtime'];
export default defineApp({ db: { postgres: process.env.POSTGRES_URL, redis: process.env.REDIS_URL, }, upload: { provider: 'local', directory: './uploads', }, jobs: { enabled: true, }, logging: { enabled: true, }, metrics: { enabled: true, }, observability: { serviceName: 'slingshot-app', }, secrets: { provider: 'env' }, runtime: myRuntime,});What belongs here
Section titled “What belongs here”Persistence and stores
Section titled “Persistence and stores”db decides how the framework resolves infrastructure for packages, entities, permissions, uploads,
jobs, and more.
Secrets
Section titled “Secrets”Secrets resolve before most of the app is assembled. That is why secrets is a top-level concern.
Runtime
Section titled “Runtime”The runtime abstraction is part of the app root because it affects hosting, file access, and server startup behavior.
Jobs and uploads
Section titled “Jobs and uploads”These are not package-internal details. They expose app-level infrastructure and HTTP surfaces.
Monitoring and tracing
Section titled “Monitoring and tracing”logging, metrics, and observability are operational features the framework can wire once for
the whole app.
Read these with the root config, not after the fact
Section titled “Read these with the root config, not after the fact”One of the main docs goals here is to make the app root communicate production reality early:
- what storage exists
- what operational endpoints exist
- how secrets are resolved
- what runtime the app assumes
Specialized guides
Section titled “Specialized guides”You have now seen the full app authoring surface. From here:
- Package-First Authoring — the canonical composition surface
- Entity System — data-shaped domains with generated routes and operations
- Examples — complete apps that combine what you have learned