Overview
supastarter is designed to be a scalable and production-ready fullstack starter kit. One of the core features is a dedicated and extendable API layer. To enable this in a type-safe manner, we chose oRPC as the API framework combined with Hono for HTTP routing.
Why oRPC
oRPC is a modern, type-safe RPC framework for TypeScript. It provides automatic input validation via Zod, type-safe client generation, and built-in OpenAPI documentation generation. Combined with Hono for HTTP routing and middleware, it gives you a powerful and flexible API layer.
All API endpoints are defined in the packages/api/ library.
In here you will find a modules folder which contains the different feature modules of the API (admin, organizations, users, payments, ai).
Each module has its own folder with a router.ts file and a procedures folder containing the individual endpoints.
All module routers are aggregated into one main router in packages/api/orpc/router.ts.
The API is served through a Hono app in packages/api/index.ts, which handles authentication routes, webhook endpoints, and oRPC handlers. It is then integrated into Nuxt via a catch-all API route in apps/saas/server/api/[...].ts.
Learn more about the API in these different guides: