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

Email Provider

Does anyone have a preference on Email Providers for personal use/startup to setup emails with custom domains? I'm looking for something like Google Workspace, Office 365, ProtonMail, etc.

UPLOAD THING

My problem is that when i upload images to the app and and try to copy the URL I always get the same URL copied , so in my case that means that i get the same image over and over again copied to where ever i put the image to. I ve also tried to delete image when i coppied it and then upload next image in order to see it will fix it but no improvements. ...

mutation taking a long time to appear after prefetching query

Hello, I'm am currently having an issue where if my isCaptchaValid endpoint errors (using throw new TRPCError(...)) the error message takes a long time to come through, it appears that it is linked to the endpoints execution time, as if I add some code to wait 2 seconds before executing it dramatically increases the time it takes for the error to come back. I am using nextjs loading.tsx which is how the loading animation works, so as soon as the loading animation is gone it means that TRPC data has finished fetching, so the error message should be appearing instantly?...

Multi-part uploads with UploadThing

Hey guys I need to upload videos around 1GB, is there a way I can upload them with a stream or with multi-part uploads?

onUploadComplete

I'm using Next.js, and host it on Vercel. When in dev mode, the onUploadComplete run my codes just fine, but when I run the prod build, my codes in onUploadComplete were not executed at all, even the console.log Any help is appreciate. ``` export const ourFileRouter = {...

Websockets

Hello I'm not too sure this is the right place to ask but its worth a shot I'm making a pterodactyl and wings competitor for those that know pterodactyl is a game management dashboard allowing you to like run game servers and manage there files with docker and it uses a console with websockets, with my competitor (Its called Kyro) I'm having a lot of shit with websockets they are randomly disconnecting and reconnecting if anyone knows a little bit about websockets your help would be appreciated and the Github repos are below: Kyro (Main ui/api of the application): https://github.com/LydonDev/KRYPTON Krypton (Daemon of the application for creating the docker containers and websockets): https://github.com/LydonDev/KRYPTON ...

Embarrassingly stupid question: how do I know what data tools like Cursor are actually collecting?

Title. If I have given it access to my Documents folder for example, how do I know it's not storing/using that data for more than just improving its output?

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?
Solution:
Calling server functions from the frontend is called RPC. Some RPC frameworks: - tRPC (https://trpc.io/) - Gravity (https://gravity.digitak.dev). ...

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
Next