Home / Companies / Clerk / Blog / Post Details
Content Deep Dive

Build a blog with tRPC, Drizzle, Next.js and Clerk

Blog post from Clerk

Post Details
Company
Date Published
Author
Alexis Aguilar
Word Count
6,613
Company Posts That Month
48
Language
English
Hacker News Points
-
Post removed?
No
Summary

The tutorial provides a comprehensive guide to building a blog application using a modern tech stack that includes Next.js, Clerk for authentication, Drizzle as a database ORM, and tRPC for type-safe API endpoints, among others. It begins with setting up a Next.js app integrated with Clerk for user authentication and Drizzle for database management, deploying the app on Vercel, and using Neon for the Postgres database. The tutorial then details how to add tRPC and Zod for enhanced type-safety and schema validation, and how to replace direct database queries with tRPC procedures using Tanstack Query for data fetching and caching. It explores creating protected procedures with Clerk's authentication context to restrict access based on user status. The guide also covers setting up a client component to fetch and display posts and creating a form for users to submit new posts, ensuring security by using server-side user ID retrieval. The tutorial concludes with suggestions for additional features and improvements, such as custom sign-in pages and more user information storage, to enhance the application's functionality before a production release.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Serverless 6 1,008 229 94 -44%
Developer Experience 1 402 250 99 -15%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.