Primate 0.38: The route is the contract
Primate 0.38 introduces a new approach where the route file serves as the single source of truth for web application development, unifying server expectations, type enforcement, runtime validation, and form integration. The release features declarative route exports, typed route clients, and client.form integration to reduce duplication and synchronization issues. This full-stack solution aims to streamline development by centralizing contract definition within the route itself.
- ▪Primate 0.38 uses route files as the single source of truth for handling server requests, TypeScript types, runtime validation, and form wiring.
- ▪Route handlers are now exported declaratively using the route() function, eliminating side effects and global registries.
- ▪Content type and body schema validation are built into routes, with automatic 415 or 400 responses for invalid requests.
- ▪Importing a route provides a fully typed HTTP client without code generation or separate schema files.
- ▪The client.form utility creates typed forms with automatic field validation and error handling based on the route's declaration.
Opening excerpt (first ~120 words) tap to expand
Primate 0.38: The route is the contract 01 May 2026 by terrablue Today we're announcing the availability of the Primate 0.38 preview release. If you're new to Primate, we recommend reading the quickstart page to get started. The route is the contract In most web frameworks, a route handler is just a function. The types it expects live in a schema file. The validation logic lives somewhere else. The client code that calls it is written separately. The form that submits to it is configured independently. Everything drifts. Everything duplicates. Everything goes out of sync. Primate 0.38 takes a different position: the route file is the single source of truth.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Primate.