Skip to content

M-Xue/3900-stack

Repository files navigation

This is an example set up for the technologies used for COMP3900 group project.

The Stack

The technologies used are as follows:

  • Next.js 13 (app directory)
  • tRPC
  • Zod for schema validation
  • Prisma for a database ORM
  • React Query
  • Zustand for state management
  • classnames for CSS utility
  • Headless UI/Radix UI for UI components
  • Lucide Icons

Next.js 13 (app directory)

Why

I don't know, I just picked this because theres hype around it. I don't really get its improvements over v12 apart from maybe smaller bundle sizes. We won't be using the native server api endpoints and will instead be using tRPC.

Resources

Documentation

Video Guides:

tRPC

Why

tRPC is a really great tool to make your routes type safe. It makes it so that the body data of your API requests are typed and provides autocompletion for your routes too. Think of it as the alternative for fetch requests. Instead of making a fetch() call and sending an untyped JSON object as the data payload, you call a function directly in the frontend and pass the data as a typed object. tRPC will raise an error if your object and its fields are of the wrong type.

Resources

Documentation
Video Guide

Zod

Why

We use Zod with tRPC to validate the object argument we give to our tRPC route.

Resources

Documentation

Video Guides:

Prisma

Why

Similar to tRPC, Prisma gives us type safety and auto complete when interacting with our database. Using consists of calling methods on an object corelating to the table schema you are trying to query/mutate. It consists of its own schema language. You should download the Prisma VSCode Extension for it.

Resources

Documentation
Video Guide

React Query

Why

React Query is a really great wrapper around your interactions between the client and the server because it provides things like refetching, caching (best part), request state and more.

Resources

Documentation
Video Guide

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published