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

URGENT!! System Design Interview Prepration

I have an interview in an hour found some insight via leetcode discuss
A friend shared insights from the frontend system design round. The task was to design a dynamic sprint dashboard where users could modify the dashboard by adding columns such as “Backlog,” “Scheduled,” “In Progress,” etc. Each column could contain entities like tasks or stories. ...

Is there a public reasoning for the folder structure of ct3a?

Hi, is there any public reasoning why the folder structure of ct3a is like it is. Eg prisma being in ./ and not under ./src/server? Im just getting into BE dev and somewhat understanding prisma I'd put it under server. Of course I would just put it there but I believe there is a reason for this?...

DynamoDB adapter?

Neither Prisma nor Drizzle support DynamoDB. Should I just roll my own, or is there another recommended adapter for DynamoDB, even if it's not in the create-t3-app command?...

Invalid environment variables error | My Biggest Tutorial Ever Video

i'm getting this error while following Theo's latest tutorial. The error looks something like this: ``` ❯ pnpm run db:push ...
Solution:
fixed now, the issue was with the SINGLESTORE_DB_NAME. It was different on the singlestore CPanel and my .env.

TypeScript React: Confused about icon: Icon and {...}: Props syntax in component props

I'm working with a Next.js and TypeScript tutorial (https://www.youtube.com/watch?v=djDgTYrFMAY), and I came across this component syntax that I'd like to understand better: ```import {LucideIcon} from "lucide-react" type Props = {...

useSuspenseQuery always called on initial render

Using - t3stack, - trpc 11 - nextAuth 4 ...

Fetching data after Vercel deploy

Hey guys i got a question. I'm just learning to build fullstack app with next.js drizzle and neon. I configured it and everything works fine locally, but after vercel deploy, with same database url connection , it seems to be only fetching on the build time, and when i add records after that it doesnt fetch before redeploy. Why is that happening? I'm using newest version of next. And i just fetch on the page component with simple ```const offerList: Offer[] = await database.select().from(offers...

Is there a way to get past an adblocker ?

In some video I remember theo telling about some technique/script by which the adblocer can be bypasses. It would be useful for services like posthog and plausible.
Solution:
I am currently using netlify, so could this help https://posthog.com/docs/advanced/proxy/netlify...

build fails locally but deploys successfully on vercel

I am using turborepo with trpc and nextjs ,when i run pnpm build in the root of my monorepo the build fails with the following error you can take a look at my code here: https://github.com/777advait/t3-turborepo...
No description

Getting the `OurFileRouter` type for the generateReactHelpers function for custom input component.

Hey guys, this might be a stupid question but I current have a custom React component to handle file input and do a bunch file validation with Zod and React-Hook-Form (irrelavant...ik). Following the example for creating back-end adapter for my API. I'm having trouble for how to get the FileRouter type for the generateReactHelpers function. I'm not using monolithic architecture similar to the example from https://github.com/pingdotgg/uploadthing/blob/main/examples/backend-adapters/client-react/src/uploadthing.ts What would be your recommendation on how to resolve this? Thx u 🙏...

Bug: [uploadthing] Unable to Resolve UI Package Path in Next.js + TS + Tailwind Project

Hey everyone, I'm encountering an issue with the Uploadthing UI packages in my Next.js + TypeScript + Tailwind project. The log displays the following message: ```plaintext...
No description

is there a variation of `react-native-country-picker-modal` that doesnt use defaultProps

Been searching everywhere and have yet to find a single library that is half as good but doesn't have this error. Ive found like 4-5 that claim they dont have this error but when I boot the app up, I run into it anyway. Im on a bit of a time crunch or else I would keep exploring but the meaningless claims are getting to me, I just wanna hear from someone reliable and this place is always pretty reliable....

t3-chat: start new chat from url endpoint

Is there a way to start a new chat in t3-chat from the url, for example https://www.youtube.com/results?search_query=%s to make a youtube search. I use this a lot for custom search in the browser. TLDR: does t3-chat have some endpoint similar to: https://t3.chat/chat/newchat?model=foo&question=%s to start directly start a new chat? If not, where can I make a feature request for this?...

Unable to have a environment variable only on client?

I'm configuring the better-auth library for my app and it requires the BETTER_AUTH_URL environment variable on the client side, therefore I prefixed it as NEXT_PUBLIC_BETTER_AUTH_URL. ```js import { createEnv } from "@t3-oss/env-nextjs"; import { z } from "zod"; ...
Solution:
what if you try having two env with the same value? BETTER_AUTH_URL on server and NEXT_PUBLIC_BETTER_AUTH_URL on client

React on Amplify with or without Next.js

Hi, i'm doing a rewrite of a React app. What is outside of my control: 1. deploy to aws, either amplify or ecs 2. backend done in python 3. using react...

Claude Sonnet 4

Does anyone keep up with the LLM news? If so, does someone know estimate when they will release Claude Sonnet 4? Because 3.5 has been released more than half a year ago and still beats the new models and gives better answers. So I'm hyped about Claude Sonnet 4, and hopefully we'll see lower pricing.

T3.chat text to image

Will it ever be possible to generate images on t3.chat? I'm currently paying for (Poe, another AI wrapper) that allows me to pick and choose any model I want. T3.chat is great, but I sometimes need to generate images, less than 20/mo. Is this on the roadmap, I'm happy to pay extra for this. If this isn't, is there a tool I can use to generate good quality images, usage based instead of a fixed subscription? I'm currently using Flux 1.1 Pro in Poe...

When will you add pdf support in t3chat?

Normal chatgpt, claude, deepseek have support like this, so what't the problem with adding it?

React Native Phone Input

Does anyone know of any libraries for text inputs that use phone formatting masks? All of the ones that I've found seem to have been abandoned years ago. I'm surprised that something so integral to auth isn't highly sought after. You could filter out any non-numerical characters using an onChangeText handler, setting state manually and assigning it to the TextField's value prop, but this leads to a jumpy UI where the unwanted character is shown briefly before being removed. I'm assuming this is happening because the state being set on the JS layer tries to override the native text input component AFTER the native layer has already set its own internal state....

Question about refresh /access token

Hi, for a middleware, whats the best approach to renewing access/refresh token? 1) Is is better to check if access token is expired in middleware and if so, check refresh token and its valid simply pass the new access/fresh via http cooki 2) Or use client/server side interaction- middleware only checks for access token. If request fails, the client send a request to /refresh and this route validates the refresh token, if valid it sends new refresh/access token to client. Client reattempts original request to server....