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

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 ...

Invalid Signing Secret Error On UploadThing

I am using uploadthing for a project. Everything is working fine when I test it locally but on the hosted server I keep on getting the error invalid siging secret. I am using coolify for the hosting, The project is made using next js for the frontend and node js for the backend.

T3 Chat Temp Chat Feature

I was thinking of buying T3 chat and was wondering if they had a temporary chat feature, that works like a incognito chrome tab. Was wondering if this was a feature and if it wasn't if it would be added in the future.

Upload Thing: Callback Failed

Hello, I am getting this "Callback Failed" message and i was wondering what it meant? Thank you, Mooshay105...
No description

Environment port not used on a local PC

When I execute pnpm dev, the website loads under port 3000 (seems like the default one) but the .env have explicity PORT=3500 NODE_ENV=development ........
No description

Next js server actions

Hi, its my first time using server actions, i always use an api and make requests using react query, So I'm used to handling query invalidations, through react query, and now using actions, to simplify my code base, since it's a very simple project, would this be the best way to update data after removing files? by the way, does the code structure look correct?

upload video to firebase and show it in next js

Hello when i uploaded a video to firebase from nextjs project and tried to show it the console gives me this error video:1 Access to video at 'https://firebasestorage.googleapis.com/v0/b/video-tutorial-6f559.firebasestorage.app/o/videos%2Fmysql%20-%20no%20connection%20established%20or%20unable%20to%20connect%20to%20local%20host.mp4?alt=media&token=b7f221ba-553f-4ca7-aaea-4e387666cc06' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. ...

trpc with nextjs 15

Does it makes sense using trpc with nextjs 15? Because there is server actions too but that's not type safe.

Struggling to Reduce Vercel Function Invocations on My Next.js Website – Need Optimization Tips!

I'm building a website using Next.js, Prisma, and MongoDB, but I'm encountering an issue with excessive Vercel Function Invocations. On a private Vercel account, I noticed that a single request can trigger anywhere from 19 to 100 function invocations, which feels extreme. I've already tried batching requests, server-side caching, and Incremental Static Generation (ISR), but the improvements are minimal. Does anyone have experience optimizing server-side actions for medium to large-scale projects? How can I effectively consolidate these invocations without sacrificing functionality? Any advice, strategies, or resources would be greatly appreciated! I am including stats from my Vercel Account where the app was hosted. I have paused the project because I don't want to end up homeless before AI takes my job....
No description

UT Download Speed question.

So I've noticed that hosted files on UT are downloading quite slowly, or at least slower than I thought. For example, a 150kb image sometimes takes 2 seconds to download or longer. I wonder why this is. I am assuming it has to do with some configuration mistake I made. I'm using "Frankfurt, Germany" region. Can someone advise? I don't even know how to start diagnosing the issue......