Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ephraimduncan/minimal.so/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
Minimal uses oRPC - a modern, type-safe RPC framework built on top of React Server Components and Next.js. The API provides full end-to-end type safety between the server and client without code generation.Key Features
- Type-safe: Full TypeScript support with inferred types across client and server
- Session-based authentication: Powered by Better Auth
- Automatic validation: Request/response validation using Zod schemas
- React Query integration: Built-in React Query hooks for data fetching and mutations
- Server and client usage: Use from both server components and client components
Router Structure
The API is organized into the following namespaces:server/router.ts:25 for the complete router definition.
Client Usage
From Client Components
Use the React Query integration for automatic caching, revalidation, and optimistic updates:From Server Components
Use the server client for direct procedure calls:Direct Client Calls
You can also use the raw client without React Query:Error Handling
The API usesORPCError for standardized error responses:
Request/Response Flow
- Client request → oRPC client serializes the input
- Validation → Zod schema validates the request against the input schema
- Authentication → Session middleware checks user authentication (for authed procedures)
- Handler execution → Procedure handler processes the request
- Response validation → Output is validated (if schema defined)
- Client receives → Type-safe response returned to client
server/procedures/ and registered in server/router.ts.