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

Custom Sub-Domains on Vercel + Namecheap

I'm trying to create a landing-builder and I'd like to host all the created landings on different sub domains (allow users to do that from the entire app). And I faced that I don't know how to configure the subdomains settings through the Vercel. Could someone help me with that or maybe you had some similar experience?
Here are my domains settings (screenshot 1)...
No description

Where would you host full T3 stack, besides vercel or netlify?

Let's say, I want to create an e-commerce website, I will use next auth just for the admin panel, trpc, connect stripe. What should I use for that? I've only ever deployed 1 static website made with vue and api made with express, and realized that namecheap vps might've been an overkill....

Conditional Validation in Form Schema Using Zod?

Hey everyone, I'm currently working on a validation schema for a form in my project, and I'm looking for some guidance on how to implement conditional validation. Here's a simplified version of what I have ```js...

Heights 100 % problems

I am not able to fill up the remaining space after the nav component and the card maker component
No description

UploadButton "You forgot to pass the generic" type error

Last time I used UploadThing, I create the upload button using the 'generateComponents' function which is now deprecated in favor of genUploadBtn and genDropZone functions. I'm using generateUploadButton, but the button generated doesn't seem to be getting the types from OurFileRouter assigned (same structure as to what docs show). Has anyone had this issue? Am I missing something really obvious? Would appreciate any help! Some SS's below:...
Solution:
Seems like auto import was importing the UploadButton and UploadDropZone from @uploadthing/react instead of from my own file were the generic is being assigned. Cheers
No description

Monorepo NextJs-NestJs, weird import issue

Whenever I try to import something from "connector" package in the apps VSCODE suggest me from "dist" local package folder I expected it imports from package installed "connector" which is installed using "connector":"workspace:*", it actually works but just writing import manually from "connector." I use pnpm. Something that I'm seeing is that if remove baseUrl from main tsconfig, it actually imports from package in the apps, but I lost the aliases paths...
No description

zod validation with uploadthing and server actions

Does anyone know how i can handle with image upload to supabase. I have problem with zod schema with next js server action. I have custom hook for upload image and saving file.url from uploadthing and first wanna check with like z.array(instanceof(File) then later have another images array where i save urls of images to db I tried to make separated schema validation just for file and then merge with bigger schema to save all form in db but have conflict like having files array and dont have field prisma schema for that. Tried also to set these merged schema only for useForm and resolver,set submit form function only sending values from bigger (main) schema but for some reason backend still get that files array and cant save it ....

How to upgrade pnpm version of project

I've been following Theo's new tutorial and upgraded pnpm while in the middle of the project. It now won't let me use pnpm on the project anymore because they updated it from v8 to v9. I can't seem to figure out how I am supposed to upgrade the project to the new version. Is there a way to do this? The only way I could figure out how to keep working is to uninstall pnpm and install the old version, but this doesn't seem like the ideal way to handle things.

Guide to upgrade from Pages router to App router

Is there a guide somewhere to convert a T3 stack app from pages router to app router? I am currently developing an app but I feel that if I dont change it to the approuter I will be missing important stuff or improvements in Next.js. - TypeScript - tRCP - NextAuth...

Getting next-auth-steam to work with create-t3-app

According to next-auth-steam's examples i should override jwt() and session() callbacks like this ```ts jwt({ token, account, profile }) { if (account?.provider === PROVIDER_ID) { token.steam = profile...

Clerk middleware complaining on new T3 gallery tutorial

Following https://youtu.be/d5x0JCZbAJs?si=7ucvDfDadGRZ0HBC&t=2799 After getting the .env variables in my local environment and on Vercel, I was able to get Auth to start, let me sign into GitHub, authorize the app, and then fail with the following error when trying to return to the gallery. ``` Error: Clerk: Unable to verify request, this usually means the Clerk middleware did not run. Ensure Clerk's middleware is properly integrated and matches the current route. For more information, see: https://clerk.com/docs/nextjs/middleware. (code=auth_signature_invalid)...

Arguments against twin.macro in favor of TW

Hello all! At work, I am in the process of making the argument for using normal Tailwind over twin.macro. Our last project used twin but in the next I am trying to push hard for abandoning it in favor of the rational stack of TW, CVA, TW merge and CLSX. As far as I can tell, there is only downside for the end user when using JSS. ...

Drizzle Not Working At All On Backend

Hello, I am using drizzle to make a password for me for my website which using a TOTP. I am using Create T3 with Drizzle to store the private key on the backend along with the validity and expiry. All calls to my Postgresql server result in extremely unuseful errors. Using Drizzle studio I can make calls to the database, but not from the backend. Here's my code, most of it is similar to a stock Create T3 app. ```ts...
Solution:
Just fixed this. I was unaware it is required to use the vercel database for development. I don't like this. To fix this, I used switched to @vercel/postgres and used a development part of the database. This took wayyy too long to figure out....

Failed to compile

if I remove const make = api.post.makeCard; it work, but I need it. I'm new to trpc.
No description

how to pass trpc typescript between parent and children ?

I have data types when using useQuery but I want to also include these types inside the component that I am using here is an example const { data , isLoading, refetch } = api.users.submission.useQuery(undefined, { refetchOnWindowFocus: false }); <Submissions refetch={refetch} data={data} />...

pnpm/turbo workspace issue

I have the following workspace setup: ``` packages: - apps/* - packages/*...

How to manage state in a vanilla js app in a functional programming way

This question has been bugging me this week I would love to have some suggestions on this topic.

React To Next header cookies/Token

Hi, for some context. The backend is in python frontend in react and the auth system works by going Frontend clicks a link and gets redirected to the backend -> backend redirects to discord -> discord to frontend and the session token gets saved on the frontend. by using credentials: "include" in axios the backend retrieves the session token in any call I make to the backend. is there a more optimal way of doing this? (don't suggest next-auth cuz its bad)...

"Weird" characters are visible in VSCode Git Bash terminal output (like this: `←[90m` )

Hello, fellow theoists! I'm watching a new video from Theo, and have an issue after running pnpm db:push command inside VSCode "Git Bash" terminal, in Windows 10. I see some "weird" characters inside of my console. The issue does not exist in Command Prompt terminal. I think the problem related to how git bash is interpreting something from this list: - [ ] ASCII escape characters...

Next Auth Drizzle Adapter does not include extra columns (fields)

auth.ts ```ts providers: [ GoogleProvider({...
Solution: