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

REAL QUESTION!!!

What breed of cat does Theo have? He is so lovely...

Using credentials provider

Hey guys! I was looking for some kind of info on how I can use credentials provider with NextAuth while using ct3a. I know its insecure and isnt recommended for use and all that but I have a client who wants it. Can anyone help out or point me towards an implementation that works? For context I am using the latest version of ct3a, Prisma, NextAuth, trpc and app router I have added the credentials provider as follows:...

Client-side Exception Occurred

What's the best way of handling this (nextjs client-side exception)? I've already checked the docs and it recommends error boundaries, which i do understand the reasoning but it's not what i'm looking for If i understand error boundaries correctly, they will render something completely different when you get this client-side errors, what i want however is for the client to render just as is despite the error, 99% of the time anyway, i get these kinds of errors when I try to get a property and it doesn't exist / is null / undefined, in that case, i don't want the entire app to crash, i simply want it to not render whatever is missing So how do i do this?, i.e. just ignore the error and if things are undefined them let them be undefined...
No description

Curious about Next.js Errors

Hi all, just wanted to ask if anyone else has been able to find first-party documentation on development errors with Next.js. I'm facing an error, example: "Error: Page "/[root]/[article]/page" is missing param "/deep-dives/x" in "generateStaticParams()", which is required with "output: export" config." . Due to the lack of documentation on Next.js errors during development, I'm out of ideas on how to debug further, apart from just asking an AI for help. P.S., I'm not just looking for a solution of the error above. Instead, I'm trying to better understand how to debug the framework....

App Router and Page Router

Hey everyone, I'm new to T3 stack. Just had some confusion on the initial setup. I see next has both app router and page router, with app router seemingly the path they are investing towards in the future. I'm curious when I created my t3-app. I have an app and pages folder. My understanding was that you either have one or the other depending on whether you are using app router or page router. Looking at the T3 docs, there's also a section on Folder Structure (Pages) and Folder Structure (App) https://create.t3.gg/en/folder-structure-pages. Ideally I want to use app router, would anyone be able to explain what's happening in my setup since I have both?...
No description

tRPC streaming in mutations

tRPC supports streaming responses of useQuery using async generators, which I can use to yield return data to the frontend and get an updating list of stuff. I want to implement the same return with a useMutation, but that one doesn't resolve the async generator into an array but passes it through to the frontend. Does anyone know why these behave differently and how to work around this?...

Upgrading to Next 15, infinite refetching, no cache?

Hi, I'm trying to upgrade my t3 project that I started with next 14 a year ago, to Next 15... I've used the codemod for it an Clerk to v6, but I'm getting a problem when I load a page, it queries again and again, infinitely, putting a huge load on my server. I have my Query Client staleTime at 30 * 1000, but doesn't seem to be taking it into account....

Limit messages per month

Whats the limit on the free version? I just wanna know how much more ill get with the paid

Terrible Uploadthing performance with German ISP.

Could someone perhaps have a look at whether or not there is some blacklisting being done by TELECOM in Germany, the majority ISP here. I can in no way bypass their blocking of uploadthing hosted files through my router except for using a VPN. I've done a bunch of testing, and as far as I can tell, it is only when traffic is going through my router. The download times are in the range of 30s for 50kb which makes my product essentially unusable. I would really appreciate any help anyone has to offer. I'm at the point if phoning up my ISP personally... Cheers. :PepeHands:...

Why is this component not fully SSRed, how can I do it and what learnings can I take from it?

So, My understanding is: export default function ServerComponent(){ return <div> // some normal HTML tags <ClientComponent/>...

Expo Monthly Active User question

So I asked this in the expo discord, but my bet is I'll get a faster answer here. I'm real interested in Expo, but my idea is going to have a rather small revenue per user, so looking at the costs of Expo I am wanting to make sure I'm not about to make a money pit off of the MAU costs. So the documentation appears to cover it decently well but I have a single outstanding question that looking at the documentation doesn't appear to have answered: Is a "Monthly active user" a download from the app...

Does anybody have experience with Proxy Re-encryption?

Hiya! I'm trying to make a prototype for an app with a pretty complex set of requirements. ``` - Alice wants to share a secret message to a group of people she trusts. - This message can only be shared in a decentralized system (not blockchain!!), where everyone can see every message sent. - Once the message is sent, it can not be changed, and neither can the data attached to it, like a decryption key....

Renaming a file but on download it shows the file's key instead of it's name

Main tech stack: Nextjs: 15v, Drizzle orm: 0.39v, Clerk: 6v, Uploadthing: 7v. Github: https://github.com/webdevkaleem/zip4you Description:...
Solution:
got a PR up with a fix

What's the difference between the `api` exported from react.tsx and the `api` from server.ts?

I'm using Next, tRPC, & prisma. In the boilerplate, there's two api objects. One is created with createTRPCReact, and the other created with createHydrationHelpers. What's the difference in what they do? In the examples on StackBlitz there's only one, and it's created with createTRPCNext: https://stackblitz.com/run?file=example-app%2Fsrc%2Fpages%2Findex.tsx,example-app%2Fsrc%2Futils%2Fapi.ts
Solution:
the api from react.tsx is meant for the client with the tanstack-query bindings while the api exported from server.tsx is meant for use within the server only (async components and server functions)

Unfinished uploads (uploadthing)

Hi guys, I noticed in dev mode (isDev=true) the upload (client side) starts before the server calls /route-metadata. What if the server never calls /route-metadata ? The file is lost but the storage is used? Will I be billed for it? Is there any cleanup of unfinished uploads?...

Is t3chat blocked in Russia?

I tend to visit it at times, but now i am getting 403 without VPN 😦
No description

Next js cheat cheet

hi guys im looking for some cheat sheet or concepts reference beacuse im learning next for a project and it is too overwhelming

Symmetrical-Eureka

šŸš€ Hey T3 Theo Devs! šŸš€ We just launched Symmetrical-Eureka, an ultra-lightweight TypeScript ML framework with a built-in RPC system for neural networks. No dependencies, pure TS, blazing fast tensor computations, and modular deep learning models. šŸ”— Repo: Symmetrical-Eureka...

Passing generic inside tRPC query

Hi, I hope you're doing well. Server: ```typescript findManyUser: publicProcedure.input(UserFindManyArgsSchema)....

Next-auth Session is null on initial render with useSuspenseQuery

This one's been driving me crazy and I would love some help. I can't even work out whether it's TRPC, react query, or next-auth that's causing the issue. I'm using TRPC 11.0.0-rc-682, next-auth 5.0.0-beta.25, and the nextjs 15.1.3 app router. I have a route with an id param:...
Solution:
```typescript // server component export function ServerComponent() { void trpc.procedure.prefetch() ...