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

JS Framework The Unifies Frontend and Backend

I watched a video in the last couple of months where Theo talked about a framework where the frontend and backend were a unified codebase and requests were somewhat like functions. Maybe I'm not describing it the best, but does anyone know the video I'm remembering?

saw payment needed in network request

i uploaded an image in uploadthing and saw payment required in network why ? I thought there was no cap in file bandwidth or is there?

Searching for React "advanced" "cool" resources

I know like, a bit of react, but I have seen Theo's videos to know that I don't know all that there is to it. So I want to find cool resources (preferably written) that show out things like Slots, cool patterns, how to make your code actually simple reading from top to bottom, primitives to look out for. I want to widen my tool belt so to speak....

Best Practice for inference

Hi here is my problem: ```typescript type t_Prisma<MNs extends Record<string, string>> = { ModelName: MNs...

Zod error about intermediate value when submitting form

I'm getting the following error when tryign to submit a simple form using zod and react-hook-form.
zod.mjs:7 Uncaught (in promise) TypeError: o[(intermediate value)(intermediate value)(intermediate value)] is not a function
zod.mjs:7 Uncaught (in promise) TypeError: o[(intermediate value)(intermediate value)(intermediate value)] is not a function
```ts...
No description

🚀 Help with GitHub Actions for Moving Issues Between Repos

I have a GitHub organization with three repositories: frontend backend...

TRPC procedure leaks .env

Ive got some router for generated presigned s3 urls. router: https://pastebin.com/zSQ4MRjK (its not meant to be a public procedure) I created an actions file like this:...
No description

Bun with ElasticSearch client?

Hi, I'm developing an API using Bun.js and ran into an issue when trying to connect to ElasticSearch via the official client. I’m getting a “Not implemented in Bun” error, which—as the name suggests—means that the ElasticSearch client relies on features that aren’t yet supported by the Bun runtime. I figured I’d ask here to see if anyone knows of a workaround. At the moment, I see two possible paths: either switch from Bun to Node.js (which isn’t straightforward—I tried it and ran into issues with the typedi library I’m using for dependency injection), or write a custom ElasticSearch client, maybe a small Python proxy to handle fetch requests to ES....

Someone already got ViewTransitions to work?

I tried to implement Viewtransitions into a list i built a few weeks ago, but ViewTransition is undefined after import. Versions are all right, it just doesn't work. Someone encountering the same error or already having a fix? I'm using NextJS and TypeScript btw...

pnpm / turbo monorepo - how to structure shared dependencies

I'm fairly new to monorepos, even more to turbo does anyone have advice on what's the least headache-prone way of structuring shared deps (e.g. one typescript version, one zod version) across a monorepo? one way ig would be to to create a package, e.g. packages/zod, then use that packages whenever you need zod...

Is there a way to Export chat?

Just answered my own question.. Yes, to MD, right click on chat and select Export

NestJS optional Body Fields

How can i accept a partial object as Body using NestJS ```ts import { ApiProperty } from '@nestjs/swagger'; import { IsOptional, IsString } from 'class-validator';...

ERROR! XHR failed 400

I was uploading pretty well images till yesterday but on waking up I'm getting this error, is there a breaking change somewhere... [02:55:01.726] ERROR (#166) handleErrorRequest=3ms: Invalid signature

I was trying to introduce credentials provider alongside my already existing emailprovider

I am using app-router. I broke my application, I am now trying to just get back to using my emailprovider, I reset everything I can, removed jwt as the session strategy, deleted my .next directory, my node_modules, cleared my browser cache. When I build my application I get no errors, so I really don't know what else I can do. Help would be sincerely appreciated...
Solution:
I fixed it had to delete my users unfortunately :( this was the solution so I do think it was a db issue I caused...

Python script in upload thing

Hello just wondering why when I'm trying to upload a python file text/x-python it does not fall into either text or blob Also I don't even have an option to add the text/x-python file type to allowed content types...

T3 Env - Handle Dev vs Prod

How do you all handle prod vs dev values using t3 env

Keys

Is key={crypto.randomUUID()} an okay-ish way of setting keys in TSX/JSX maps? I won't be needing the key for anything later but I'm not sure if this is a good way of going by it
Solution:
you want to ensure that your key is something that is the same for the same state and different for all other states, a uuid is perfectly fine for this but it should not be randomly generated on the fly

v0 quirk or am I dropping the ball?

Using https://v0.dev for a quick and dirty project.. when I go to add a component to an existing project using the provided shadcn cli command it adds a new /app folder? Not just that, but half of the files get added to the correct /app folder and the others do not.. I would like to think that I am the one dropping the ball here, but I can't seem to find an efficient solution that works.. I have resorted to downloading the zip and manually transferring every file that I need.. Please advise..

Text editor for React

Is React Quill New a fork of React Quill still a good choice for new projects needing text editor feature ? Or there is anything out there which has same features but better DX ?
Solution:
From what I understand — it is, just trying to stay (more) up to date with QuillJS version updates. I was looking for a customisable WYSIWYG text editor and settled on https://tiptap.dev/. It was pretty great to use. All that you need there is open source and free...

What app would you recommend for getting a project demo/prototype ?

Hey guys. I'm having a bunch of ideas at the moment but struggle to get them started. Feels like setting up frontend and implementing all the design features is getting absolutely boring for me. I would rather do backend features all day long instead of that boilerplate frontend code. What app / ai tool would you recommend me that can make frontend designs/features decently ? PS: I come from a Theo's youtube video where he tested out multiple platforms that couldn't do much of the stuff he wanted, but I want to hear others opinions. Loveable did a pretty good job at doing the frontend but totally missed out on the backend....
Next