How to get singular type on trpc query
const serviceOrders = api.serviceOrders.getAll.useQuery({});
const [selectedServiceOrder, setSelectedServiceOrder] =
useState<(typeof serviceOrders.data)[0]>();
it says...
Read pg db types and constraints automatically?
Is there way to read postgres database for it's types and constraints, so I could mock up some functions to fill out with fake data for testing?
Paypal subscriptions: how to verify successful sandbox payment
i'm currently experimenting with paypal + nextjs for subscriptions
i think i got it right so far
code goes something like this:
```jsx...
Syncing Clerk User for Prisma User in the Next Pages Directory
Hey there, I am trying to sync my user object with my User model in Prisma DB.
I followed the steps in this video:
https://www.youtube.com/watch?v=NgBxrIC1eHM&t=1293s...
Shadcn ui drop down menu
Does anyone know what the key ⌘ is? I assume it's cmd on Mac. What is it on linux and windows? I use Linux.

Is it possible to dynamically generate zod schema?
Imagine a form where a user can add/remove fields of different types, how can we dynamically generate zod schema for that form?
vercel ai sdk with pages folder
can we use vercel ai sdk with pages folder since it streaming response
NEXTJS COOKIES AND CUSTOM APIS
if i made a request from nextjs server side to another server that assing a cookie will the cookie be on the server or the clinet ?
how do you all cope with onboarding on an already existing express project?
I just tried to maintain an already existing express app built with typescript, but i am getting frustrated due to the lack of standard design patterns
Do you think nestjs should be a higher priority when we mention express js?
But i hate the nestjs syntax, though...
Tracking request/useMutation progress
I have a tRPC endpoint that takes in images in base64, and in the frontend i want the user to be able to watch the progress of the files being uploaded. Not sure on how to really do that. is there a function im missing? I tried looking at the documentation and cant find what im looking for.
Validating Zod Schemas Against Static Data
I'm building a React Native application and we are interfacing with a couple APIs written in Python and PHP that do real violence to the idea of type-safety, so one of our largest pain points has been correctly typing their HTTP responses and making sure our application is robust to all the wild ways that PHP can serialize an object. For instance, we've got an object with a field "location" that has the following possible forms:
```
{"location":{"lat":123.123,"lng":1.23}}
---...
Next 13 + Vercel (+ axiom?), how to log?
I have looked at theo's video about logging and Axiom but I cant get to have working logging on a sample nextjs 13 app.
src/app/api/foo/route.ts
```ts
import { NextResponse } from "next/server";...
Data fetching in client components, Next 13+
TRPC support for /app is not ready yet (from what I've seen).
Server Actions seem to be more mutation focused, Zact seems to be heading that way too. Although I guess you could use SA to fetch data.
So what now? Use the good old API routes and React Query?...
Error: PrismaClient is unable to be run in the browser.
I'm trying to create a build file for my next app but I'm getting the error: Error: PrismaClient is unable to be run in the browser.
It says the error is in my /addsubtopics route which is this:
```
import { db } from "../../lib/db";...
Solution:
prisma can't run on the edge

react hook form generic form
Hello, I am upgrading our form components. We are using react hook form with zod resolver.we also use chakra UI. I want to make generic components for form, inputs etc. Does somebody have good resources how I could make them as generic as possible so I could use those on all forms on our app?
Bet you can't fix this CSS
https://codepen.io/cewfewdawedada/pen/qBQZjNP make the longText wrap so the flex-grow is respected 😉
Mern stack Or Nextjs ?
I have a question in which case I have to use mern stack, and in which case I have to use nextjs? And i know nextjs well should i learn mern stack too??
