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

Final year project

Please anyone give me their final year project ๐Ÿ™๐Ÿป I have very less time. Help a friend ๐Ÿคง...

Minio not working with caddy proxy

I'm using Caddy to proxy my backend and serve a React Vite app build file and other proxies. ``` handle_path /storage/* { reverse_proxy minio:9003...

Managing complex intertwined form vs using state and reducers in React

Hey all, I have a pretty complex form (1500 lines is the full working implementation); essentially, there are array fields that depend on other array fields. It works and it's fine but it's a piece of shit code. Recently I've been playing around with reducers, haven't used them extensively before. I asked o3-mini to rewrite the entire page using the concept of reducers and building state in memory, then assembling it on the fly for submission. This implementation is a good bit shorter (30% or so), but it also feeels easier to reason about because the complex dependency logic is not deep inside a form.watch inside the return clause, but in a single function. I'm curious to know if doing this is even a good idea?...

T3 + supabase + drizzle + authjs problem

I created a Next.js app with T3 stack. I'm using authjs ,supabase and drizzle with discord and github provider. Login works but after login i get an error [auth][error] SessionTokenError: Read more at https://errors.authjs.dev#sessiontokenerror [auth][cause]: Error: The edge runtime does not support Node.js 'perf_hooks' module....

Uploading files to uploadthing directly using fetch API or similar

I am currently trying to write a migration script that simply moves my local files over to uploadthing. I want to do this in a ts script using bun. I tried doing it like this: ```ts import fs from "fs";...

ยด.heif` and `.heic` support

How can I handle ios images (.heif and .heic) smoothly? I would prefer a comple client-side conversion and compression. Since these file formats are not supported on non-ios browsers, I must convert them. Goal: User can upload these image formats, the browser converts them to .jpg, then uploads the JPG-file. I came across https://www.npmjs.com/package/heic2any and https://www.npmjs.com/package/libheif-js but I don't know if they really are the best choice....

I am stuck on visitor password page when I try to signup

I am getting stuck on the visitor password section on t3.chat when i try to login using google auth. Anyone else facing this issue?
No description

Hosting

I'm currently working on a freelance project with 2 of my friends. It's our first big project, though, and we have no idea how we'd host it. We'll be using Next.js for the frontend and Express for the backend along with Socket.io for real-time features. I've some experience with Docker and Linux, so I can probably configure a VPS to host it on, but I don't know which provider I should go to. I heard about AWS, Azure, Hostinger, Cloudflare, etc. How do I know which one is the right choice? What v...

GPT 4o VM/sandbox

Does the GPT 4o option have the ability to run python code in a sandbox like the one on OpenAI's site does?

NextJS api route not working

hey so i have nextjs page using api routes, i created a simple api route that i wanna use as my backend kinda, just call it from another app and it will do some stuff and return back to me just an id... but that's not important, i tested it and it worked flawlessly on my localhost machine, once i deployed it it went thru with no build issues not even warning and when i want to test it it throws me
Function Invocation Internal Sever Error 500
Function Invocation Internal Sever Error 500
...

Uploadthing Path Not Found HONO

```appRouter.all("/uploadthing", (ctx) => { return uploadthingHandlers({ ...ctx.env, ctx: ctx.executionCtx })( ctx.req.raw ); });...

File Upload Limit for $8 Plan

If I pay $8, how many files can I upload in t3chat? I want to upload them one by one, but I need to know the maximum number of times I can upload.

AI & General tooling and workflow advice

Hi! So I have noticed recently that my workflow has become quite inefficient despite being reliable and working. I use:...

TanStack Form

i have a form, values in inputs can be specified by user manually but i would like to have as well an ability to pass value from for example zustand. Is that possible?

Looking for developer - Crypto payments

Looking for Assistance with Automated Media Server Deployment I need help setting up and configuring the following: Jellyfin (Media Server)...

aws lambda + drizzle orm help me please

Hi, im trying to learn a way to create mi api on api gateway + lambdas with drizzle ORM, currently everything works connected to a supabase postgres db but i cant manage to deploy my lambdas to aws :(. I've been trying so hard with serverless framework but it doesnt deploy the lambda handler, node_modules nor anything, just uploades empty package.jsons and handler.js & handler.js.map with a lot of boilerplate code (10000 lines).
No description

React Profiler vs Console.log

I made a dummy app with a context that I will want to convert to pub/sub for learning purposes. I added console logs to each component at the beginning. One thing puzzles me. Why does React Profiler show the re-render of a component (DisplayContainer) but the console.log in that component IS NOT displayed in the console? https://playcode.io/2294773...
No description

UploadThingError: Failed to parse response from UploadThing server

I am using the latest version of UploadThing with tailwindCSS v4 , using UploadAvatar , following all the instructions for nextJs (v15) here is the console error: error UploadThingError: Failed to parse response from UploadThing server at ut-reporter.js:44:69...

Is Theo's model-pricing.csv public?

I can't seem to find it anywhere on his github/gist page. since he's showing it alle the time in his videos, it would be cool to reference it externally every now and then

What is uploadthing?

I've tried to ask AI, search online, and look at other posts, but I don't really understand what it is. Could someone explain it to me in a non-dev-centric manner? Kind of like Eli 10. Can you also tell me why it's better than AWS? Does it make sense for large projects. Who's the target demo? Could you give me examples to visualize it. That would be great, thanks!...