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

Deploying Bun Websocket Server

After watching Theo’s latest video about Bun, I was inspired to play around with it and wanted to test deploying a Bun Websocket server. Does anyone have recommendations on deploying and hosting a server like this? I was investigating Fly.io but I’m interested to hear recommendations. Also, if Theo has any relevant affiliate links or promos, I’d be open to check them out. Thanks in advance!

Customizing/ Making custom UploadThing dropzone

Hey yall, trying to use UploadThing for my app. I'd love to be able to fully customize it, and i saw there's some helpful parts in the docs describing how to do most of this. I'd love to add my own custom svg instead of the traditional uploadthing cloud icon. Should I just make my own dropzone and then send it to the ut api or is there a way to change out the icon?

Cloudflare secrets

anyone know if its possible to have env variables not in wrangler.toml file and use the default cloudflare workers cicd deploy?

Do you really need an ORM?

I'm designing a Next app with a postgres DB in supabase, and want to use tRPC so I have some methods I can share to other apps I might make in future (using React Native or something). I've got the db defined in supabase - there's a bunch of tools that make that super easy - then I can use supabase typegen to make the requisite types. Then I can create tRPC methods using those types. So what's the use in an ORM like prisma or drizzle? What is it adding?...

Best Practices for Managing High-Quality Product Images in a Catalog/E-commerce Website

I'm developing a product catalog website that will eventually transition into an e-commerce platform. Current specifications: - 13 products - 4-6 high-quality images per product - Images already optimized using AVIF format with WebP fallback...

what should i unit test and what shouldn't I?

Hi, a dev new to unit testing here! I'm wondering if, in a typescript project, should i test functions against runtime or not. example: ```ts function iReceiveAString(arg:string){...

How to handle both "image/x-icon" and "image/vnd.microsoft.icon"

This thing has been driving me crazy, how do you guys validate or limit accepts here? Do i really need to create a custom button / dropzone for it?
Solution:
found out how to do it, my syntax was just wrong correct way: ```...

Has upload to Uploadthing but does not return

Even though it was uploaded to storage, it took a long time to load and did not return

Extension to check tech sack

What tool does theo use to check a website's tech stack. I saw him use an extension in one of his videos but can't remember which one. Does anyone here know? Thanks

quick question about the rules

with rule #6, where it says not to add friends, is there an exception where the other person wants to be friends, or do you mean just not to spam friend requests? thanks!

pnpm build fails after create t3-app

I did pnpm create t3-app@latest qqq --CI --noGit --trpc --drizzle --nextAuth --tailwind --dbProvider postgres cd qqq Filled in .env, pnpm db:push...

t3 business costing.

are there any plans to have a shared subscription as a team, and so on?

what's a good way to add a blog to my friend's site

i'm making my friend a portfolio, and i want to add a blog with auth keeping it free/cheap as humanly possible. What's a good way to go about this. Also this is my first nextjs ui. so roast, give feedback, w/e :3 https://jacobkemblemusic.com/...

NextJS dynamic routes with „use cache“ and dynamicIO - examples?

Hi everyone 😃 Does anyone have an example with an cached dynamic route in the new dynamicIO way of doing it? Even though I saw an issue on GitHub, I can’t believe it’s in general not possible. I basically need a very common example for something like a blog....

React error

Hi everyone! I’m facing the following error when I click a custom “Save Changes” button in my React app: “Uncaught Error: A React form was unexpectedly submitted.” The button programmatically submits a form using form.submit() in the onClick handler. The form is a React component with an action tied to a server function....

Zustand question

```ts const useStore = create((set) => ({ count: 0, increment: () => set((state) => ({ count: state.count + 1 })), decrement: () => set((state) => ({ count: state.count - 1 })),...
Solution:
okay i am dumb, should have read docs better

Problem with t3 chat pro

I bought it yesterday, and I do get quite a lot of 'Stream failed for unknown reasons' or 'Uncaught exception' errors. After it encounters an uncaught exception, there is no way to recover that particular chat—you have to create a new one. Here is an example
No description

how to execute some code on user signup, next auth 5

I have magic link auth and google oauth. I need to create default team in db for user when user signups but before he redirected to dashboard. What would be appropriate place to do it?
Solution:
found it. events.createUser . i though this event executed asynchoniously but it is actully awaited in auth flow so user is blocked while team is being created

T3.chat why is the chat api POST response after a prompt not in JSON?

Hi, I have been using t3.chat frequently - theo and his team's wonderful AI chat interface after seeing the video on it. I spend some time dissecting it and while looking over the network requests, I realized that the response from this endpoint https://t3.chat/api/chat is not in JSON. What it looks like ...