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

How to pass arbitrary data from client to middleware in Uploadthing?

Just as the title said. I found this from stackoverflow, but I don't use the component. Here is my code, I am using sveltekit ``` <script> const { startUpload } = createUploadThing("pdfUploader", { ... })...

Data fetching strategy

Using nextjs 15 app dir do you fetch on server components, use react query for example to fetch on client or prefetch on server component and hydrate to client using react-query? I am so used to fetch using react-query so thinking if i should change my idealogy: I have app that is behind auth, just forms etc, tables (paginated) and in my brains its better to prefetch+react-query suspensequery for clientside...

How is LLM streaming done at scale for users?

How is LLM streaming done for like 100-200 users so that IO is not blocked on every request sent to the LLM? Is there like a worker/queue pool and the workers handle requests to the LLM asynchronously? Or..? I'm kind of doing this now myself and I am curious as to how this is done at a scale so that IO does not get blocked when we are streaming chunks from the LLM to the UI. Also, how are the chunks sent from LLM to the UI most optimally? I am now using Redis to stream them....

UploadThing: Removed Image from Team without a trace

Hey Guys, so I am developing a Website and I am using UploadThing to store images for the Website. I do not allow any users to upload any sort of images. I am the only admin on the project, thus only I can upload images or have access to the UploadThing Account/Team. 30 Minutes ago I finished development of the Project (NextJS) I have been working on. Prior to commiting the changes to GitHub I ran some tests and that's when I noticed that one Image that was on the Website previously has just vanished. Now to be clear, the Image was on UploadThing the whole time. Just now the Image completely vanished....

Caching in nextjs with supabase

Hey guys i have a question about a project im building, for context i am building a CRM type of app and i have a few tables like customers, customers_services etc.. all these tables have an officeId from a table called offices, Offices is the way i seperate data for my users which will have their own customers ,this means that for almost every page of my app i need to do the auth.getUser from supabase, then use that user to find the office in which he belongs and get his office id, and then use...

How can I use Unduck on iOS?

Curious whether anyone has figured this out.

Questions on prefetching in NextJS

I have this productPage in my products/[id]/page.tsx file ```ts import { getProduct } from "../../../utils"; ...

PDF ebook Builder with AI

at job they gave me standalone project for me to build well long story short I've to build PDF ebook, user answers the questions and uploads images and with AI i must generate PDF, well in first place I tried to give AI that image links and question and answers what user filled, but AI fucks up whole layout, now I moved on templates, AI now just gives me content text and I insert them in html templates, but its still little fucked up because in some questions user can upload different ratios of...

help with a leetcode problem

Trying to complete leetcode 14 and keep running into the DEADLYSIGNAL error. I know the code is very messy and brute force but I am trying to do it without copy pasting solutions.
Solution:
so yeah, personally, just to avoid any out of bounds index issues, my process would - sort by shortest string - set a string that you update with the shortest[0]->shortest[i] - iterate through the strings horizontally first - iterate through the array vertically. comparing the strings to shortest at the index of the first loop...
No description

React.gg Concurrent Rendering lesson bug

I was looking through the preview of React.gg course, specifically the first Concurrent Rendering lesson, and I think that examples that showcase the chat UI are bugged in that selecting a chat from the sidebar is not interruptible: if you select a slow chat and then immediately select a fast one, it will wait until the slow chat finished rendering instead of switching as soon as possible. I recreated it in Codesandbox, fixed the issue, and then I tried to contact ui.dev team about it but to no success. This happened in May, and I still can't throw it out of my head. So I thought I could ask here, maybe you guys could confirm that it's actually a bug, and if it is help me find a way to report it to ui.dev team....

How does WorkOS AuthKit tell a staging environment from a production one?

I’m trying to run WorkOS AuthKit on my production server, but AuthKit won’t bring up the sign-in page. It complains I’m using the wrong client id for the environment. Does anyone know how to convince AuthKit it’s running on my production server?

Theo's Desk Mic Stand

Hi Guys, do anyone knows which model is this mic stand that Theo has been using in the last year?
No description

Sycophancy Settings?

I'd really like to turn off all the "that's a genius and insightful question" crap and the inverse, "Ahhh yep - [repeating my issue] can be a headache, and it's not just you." I remember a year ago being able to customize the personality of GPT4x, is there an option/setting for that either in GPT5 or T3.chat?...

Did they fix claude?

got so tired of using claude because of the "bugs" that made it less intelligent. How has your experience been with it since they fixed it?...

How do credits work?

Is each message you send one credit?

Your chat is too long.

I am working an a project as a beginner and after a few days of working on it now. I got this message: Your chat is too long. You can try shortening your last message or starting a new chat. If the issue persists, contact support and provide the following: ( THERE IS A TRACE ID HERE - I didnt know if I was supposed to share that) ...

Chat GPT can generate images, can we have that ?

as we all know, chatGPT can generate images when requested. sometimes it can help you draw a diagram or something of sort when it is explaining something to you, thing is, it will ask you that in T3 chat because thats how GPT is programmed but it is limited by the platform and cannot show you anything so ur token message is just gone without being used effectively. you are gonna tell it to proceed with the task and make the image but it wont but rather just say the same thing it sayed, describe the image or talk about its subject. what can we do solve this ?...
No description

retrieve error on client when using `startUpload` provided by `useUploadThing`

Hello, I am trying to somehow obtain the error reason on the client if uploading the image fails. However, the response I get is undefined. I thought maybe i would need to return something from the onUploadComplete callback, but this doesn't allow any returned value as its return type is void. How should I be returning error messages onto the client? ```ts <input...

Alt to t3-turbo that includes backend API app

Hey there, I was wondering if anyone knew of any alternatives to T3-Turbo that basically have all the same features except the API is actually it's own app? I'm struggling to handle tRPC + Clerk + a backend API as I scale my app and introduce new features etc....

Implementing cross-device sync without traditional auth for a pwa

Hey everyone, I’ve got a simple PWA written in Astro that currently persists data using local storage. There is no cross-device communication currently and everything is static and cached right away for offline support. I’m trying to implement some type of cross-device sync but I don’t want to have to rollout full auth as the application is pretty minimal....
Next