Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

Cannot deploy to Vercel with Next13.4

I cannot deploy my project to Vercel, with app directory. I have set all env variables right, such as in my local .env i have the local host and in Vercel i have my actual domain to NEXT_PUBLIC_API_URL. Here's my project it's a small one. Im also not sure if i have the correct folder structure. ...

Good learning resources?

Hey, I realise that this is a (very) beginner question, but I was wondering what the best resources were for learning TS/React? I'm pretty confident with HTML/CSS/Tailwind, but my JS knowledge is pretty cobbled together and I'd like to build a good foundation before going further. Thanks in advance :)

Call route within route in server

How can I call a route in a different route. For example I have this route: ```ts export const realEstateRouter = router({ create: protectedProcedure...

react-signature-canvas alternatives

Any good alternatives to that library that work with React Hook Form? Was trying this out cause I need to implement the signature but found few problems when the signature is resizing, plus it's really hard to work around it with React Hook Form....

In a turborepo, does the .vercel folder go at the root or inside of the app?

I am trying to run vercel link and then do a env pull. Thanks for the help!

Background processing + notification

I have a business need where I need the client to send a request to a server and run a process that takes a long time (say 30 mins per process, imagine generating huge pdfs here), and once it's done the client should be notified. As per my understanding of serverless, this isn't possible because there's a timeout on the lambda functions. I was wondering what solutions are common to a typical problem like this. What I had in mind was using a queue, and some kind of notification service. I have ne...

What to use on the backend of a mobile app

What would be the best source to building a mobile app for the data base part? I am wanting to use React native, Typescript and possibly AWS for the scalability, But watching theos video I see there are much better alterative. It is going to be a fitness tracker app.

With Planetscale (or others), what's the correct way to retroactively edit a prod database?

Noob question I don't know how to Google correctly. Let's say I forgot to add a username field to the users portion of my database. In Planetscale, you can't push a development branch to production without a default value if the field can't be null, for example....

Caching ORM response in Next app dir

I've asked this question on the Next.js discord but wasn't able to get a solid answer, hoping someone here knows What is the recommended way to cache something like a prisma response? I have a page.tsx and in it I defined a revalidate variable and I have a getFirstPost function that fetches the first post: ```ts...

Redirecting from modal in intercepted route

I had an issue similar to what is mentioned here: https://github.com/vercel/next.js/issues/49662 I have Links in a modal which is an intercepted route and parallel route. When I click a link the URL in the browser is correct, but needs a refresh to display the correct content. Any ideas how to fix this? I am using the App Router...

Inject react on a preexisting website for demo purposes

Im building a product that i want to demo for a client, its a little personal assistant. The product is built using react, and i would ideally like to host a version of their website locally, where i go on to insert my react code. Do you guys have any method that i could try to accomplish this?...

Setting Custom Error Messages on Zod Unions

Hello, I'd like to set a custom error message when a union of literals does not pass parsing in zod. With other constraints, such as .min() or .max() you can set a error message like this: ```ts...

Resend Icon Animations what are they?

Just signed up for resend and love their animated icons and was curious if anyone had more information on them? I think they're LottieFiles of some sort but seems like they may be premium icons or something. So yeah just curious if anyone knows.

tRPC + Clerk: user & org info

I'm switching from NextAuth to Clerk. With NextAuth, I got the user info like: ```ts import type { Session } from 'next-auth' type CreateContextOptions = {...

Package create-t3-app with vercel/pkg

Hi everyone, I tried to package my create-t3-app with vercel/pkg. However I cant get it to work correctly. There is an open issue with vercel/pkg when using .mjs files. therefore i changed the next.confg.mjs and env.mjs to .js files. so far so good. However when starting the executable I get the follwoing error. ```...

Why does everyone try to Kill PHP when it is immortal

Why does everyone try to Kill PHP when it is immortal

Bread-Crumbs Navigation

Hey guys, i'm setting up a side project with a design from Figma and i came across this type of in page navigation. i realize i saw something similar to that in the Next.js official website and i want to know how to implement it properly. Maybe a UI library like shadcn or with tailwind or anything, i'm just randomly guessing.