🎉 Introducing God Tier SaaS
shared/../router.ts
import { initContract } from '@ts-rest/core';
import { z } from 'zod';
const c = initContract();
export const contract = c.router(
{
getTodo: {
method: 'GET',
path: '/todos',
responses: {
200: z.object({
id: z.string(),
todoTitle: z.string(),
completed: z.boolean(),
}).array(),
400: z.object({
message: z.string(),
}),
},
summary: 'Get all todos',
}
},
);
Follow these steps to add and use the API
Get the best developer experience with type-safety and easy API development.
Drizzle ORM enables fast, type-safe database queries with PostgreSQL.
Example of a Posts page demonstrating Optimistic UI CRUD operations using Tanstack Query.
Implement secure client-side and server-side authentication using AuthJS.
Track user behavior and understand your customers better with PostHog.
Deploy your application with Docker and Docker Compose.
Manage your blogs and changelogs with ready-to-use content collections.
Use ready-to-use templatees for your landing page and dashboard.
Brought to you by Mit Suthar