Skip to content

In this article, we’ll build a type-safe tRPC CRUD API with Next.js, PostgreSQL, and Prisma. This tRPC example in Next.js will showcase how to use tRPC on the backend and later we will consume the API on the frontend app.

Notifications You must be signed in to change notification settings

wpcodevo/trpc-nextjs-prisma

 
 

Repository files navigation

Build a tRPC CRUD API Example with Next.js

In this article, we’ll build a type-safe tRPC CRUD API with Next.js, PostgreSQL, and Prisma. This tRPC example in Next.js will showcase how to use tRPC on the backend and later we will consume the API on the frontend app.

Build a tRPC CRUD API Example with Next.js

Topics Covered

  • Setup the tRPC Project with Next.js
  • Create the Database Models with Prisma
    • Create the Database Schema
    • Migrate the Schema to the Database
  • Create the Validation Schemas
  • Create Reusable Database Services
  • Create the tRPC Procedure Controllers - Create Mutation tRPC Procedure Handler - Get Single Query tRPC Procedure Handler - Get All Records Query tRPC Procedure Handler - Update Mutation tRPC Procedure Handler - Delete Mutation tRPC Procedure Handler
  • Create the tRPC Procedure Routes - Creating the tRPC Procedure Endpoints - Merging the tRPC Endpoints - Add the tRPC Endpoints to the Next.js Router

Read the entire article here: https://codevoweb.com/build-a-trpc-crud-api-example-with-next-js

Articles in this series:

1. How to Setup tRPC API Server & Client with Next.js and Prisma

How to Setup tRPC API Server & Client with Next.js and Prisma

2. Build tRPC API with Next.js & PostgreSQL: Access & Refresh Tokens

Build tRPC API with Next.js & PostgreSQL: Access & Refresh Tokens

3. Full-Stack Next.js tRPC App: User Registration & Login Example

Full-Stack Next.js tRPC App: User Registration & Login Example

4. Build a tRPC CRUD API Example with Next.js

Build a tRPC CRUD API Example with Next.js

About

In this article, we’ll build a type-safe tRPC CRUD API with Next.js, PostgreSQL, and Prisma. This tRPC example in Next.js will showcase how to use tRPC on the backend and later we will consume the API on the frontend app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published