Wrong response? Your editor complains first
Request bodies are typed - that part everyone does. Semola also types what you return. A typo in a field name dies in the editor, not in a 2am bug report.
Zero-dependency TypeScript for APIs, jobs, workflows, SQL, and auth - same patterns throughout. Import only what you use.
import { Api } from "semola/api";
import { } from "semola/queue";
import { boolean, email, object } from "semola/schema";
const = new Queue<{ to: string }>({
name: "emails",
redis: redisClient,
handler: async () => sendWelcomeEmail(job.to),
});
export const api = new ();
export const signup = api.({
path: "/signup",
method: "POST",
request: { body: object({ email: () }) },
response: { 201: object({ queued: boolean() }) },
handler: async (c) => {
await emails.({ to: c.req.body. });
return c.(201, { : true });
},
});
await api.(3000);No problems in server.ts
Responses are checked against the schema too. Try breaking it.
Composition
Flip on a queue, a cache, a workflow - they plug into the same defineRoute handler. Your lockfile still lists a single package.
Contract
Validation, handler types, a typed client, OpenAPI, and in-memory tests all come from the same defineRoute call. No second schema file to keep honest.
Principles
Request bodies are typed - that part everyone does. Semola also types what you return. A typo in a field name dies in the editor, not in a 2am bug report.
Slots take any Standard Schema library: Zod, Valibot, ArkType, or the built-in semola/schema. Swap later without rewriting the app.
On purpose. bun add semola puts one line in package.json. No transitive tree to audit, pin, or wake up for on a CVE Friday.
semola/queue is not a back door into the ORM or the CLI. Each module is its own entry point, so unused code stays out of the process.
Elsewhere
Learn how one module feels and the next one is familiar. Break something on purpose and watch TypeScript catch it.
1 of 9
Try it
Property 'name' does not exist on type '{ id: string; email: string }'.
db.ts Ln 21, Col 19 ts(2339)
Catalog
Type a path like semola/queue or semola/orm. Only that entry point loads. Hit enter to open the docs for it.
17 modules
FAQ
Runtimes, Redis, databases, validators, tree-shaking, and what pre-1.0 actually means for you.
Still stuck? Open an issueSemola is a TypeScript backend toolkit. Instead of installing a router, a queue, an ORM, and three helper libraries, you install one package with an empty dependencies field. Modules cover typed REST APIs with OpenAPI, Redis queues, durable workflows, SQL, auth policies, caching, i18n, and smaller utilities - each imported on its own path like semola/api or semola/queue.
bun add semola. npm, pnpm, and yarn work too. Then import only the modules you need. The getting started guide builds a small typed API from scratch.
No. There is no app shell you have to live inside. You import the pieces you want, compose them in your own server.ts, and leave the rest out. It is closer to a set of libraries that share types and habits than to a framework with opinions about folders.
The API module runs on Node, Deno, and Cloudflare Workers, and Redis-backed modules accept ioredis, node-redis, or Valkey GLIDE through semola/redis. The ORM uses Bun's SQL client, so it needs Bun. Schema, errors, policy, and i18n are plain TypeScript. Check each module page for what it needs.
Only if you use the modules that store state. Queue, workflow, cache, and Redis pub/sub need Redis. The ORM needs SQLite or Postgres. API routes, policies, i18n, and in-process cron run with nothing extra.
Yes. Anything that implements Standard Schema works - Zod, Valibot, ArkType, and the built-in semola/schema. Drop schemas into the same slots. For OpenAPI you need schemas that can emit JSON Schema; semola/schema and Zod 4 both do.
No. Each module is its own entry point. Importing semola/api does not load the ORM, the CLI, or anything else. What you do not import is not there.
Pre-1.0 - currently v0.6.9. APIs can still move between minor versions. Pin the version you ship with and read the release notes before you bump.
MIT. Commercial projects, open source, forks - all fine.
Yes. Full docs are plain text at /llms.txt and /llms-full.txt, and every docs page can copy itself as Markdown.

import { Api } from "semola/api"
You do not have to adopt the whole toolkit. Start with the API, add a queue next week, leave the ORM until you need SQL.