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

Advice on realtime integration

Hello All! I'm working on a very important app for myself and a select large group of people, to simply explain it is a very sophisticated note taking/sharing app. I'm currently making it with Expo/React Native in Typescript(of course), and my initial thought for the database was Supabase which I am self hosting on my local server. Part of my requirements is that there is an aspect of realtime communication in sending messages/notes to others. My first thought for this was just Supabase for the Auth, Database and Realtime all in one....

Search for Applications using Tailwind

Looking for some enterprise applications using Tailwind, preferably open source.

Use tRPC server actions

Hello, Regarding the recent post on https://trpc.io/blog/trpc-actions, would it make sense to replace the current tRPC caller with experimental_nextAppDirCaller? Are there any drawbacks to doing so, aside from it being experimental (such as issues with subscriptions or WebSockets)?...

Does Sentry fully replace Axiom?

In Theo's latest tutorial he is not using axiom anymore and for my new project I want to know which tool might be the best one for me. Are there features that Sentry does not offer but Axiom?...

Vercel Sponsorship Revoked/Expired

If anyone had a Vercel sponsorship that suddenly got revoked with 0 notice, can you share your experience?

invalidate data fetched from server component

Using server components, imagine you have awated some data from an api and down the road you have mutate this data, is there any way that you can mutate it like has been doing in react-query when we queryClient.invalidteQueries()

How do I map next.config.js code samples in the Next docs to T3's implementation?

Next shows examples using module.exports like ``` module.exports = { async headers() {...
Solution:
as simple as this: ```js const config = { async headers() { return [...

Deployment of T3 app / node / node w/GUI

Hey, got a project that I am working on currently and I am having issues figuring out hosting and deployment. Building a game clipping platform, with 3 apps. 1. T3 app handling all user interaction. I would like to use vercel for this, but after looking at tools like terraform etc, I am considering using one platform for all 3 services. 2. NodeJs backend, handling more heavy workloads, processing data, storing in DB, and managing queues. This server only recives file uploads from users. 3. Rendering backend, based on nodejs. This one requires the game installed, and needs a GUI to properly launch the game. The game can run on linux, so wont need windows for this....
Solution:
Not sure if https://coolify.io/ would work for this project or not but seems from the outside like it might then just host yourself possible. could also go with a docker approach, i am not sure of any providers that would support the full workload tho...

Vercel Build out of memory

Alright, so, a few months ago, some of our updates would trigger this error, but only during development build. Then this week it happened more frequently, until this morning it spreaded into Production. Now we can't push any updates at all because of it. I wonder if anyone here has been through this? Our app is pretty huge and we tend to avoid third party dependencies as often as possible. We've already ran the profiler and identified a dependency that was extra large and we got rid of it, but still getting this error. My newest strategy now is to reduce the buddle size with some dynamic imports where it makes sense to....
No description

Authentication failed against database server at `localhost` error with prisma

Authentication failed against database server at localhost, the provided database credentials for johndoe are not valid. I am getting this error while makeing queries with prisma. The db url in the env is valid as the migration did work as expected but when I am making a query, I am getting this error
No description

Konvo or react-konvo support for the NextJs14

Does anyone have worked with Konvo or react-konvo in a next 14 project ? Or are there any other better alternatives ?...

Observability in Next.js

How do y'all manage logging, monitors, and observability in general for your Next.js apps? I am looking for something that logs all incoming requests, the message etc, and also set up monitors based on it.

Error: Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?

I have created a brand new project with t3-app using next.js and trpc with app router
const update = api.users.update.useMutation({});
I have faced this issue when the component that contains the above code get mounted and the issue pointing on .useMutation()...
Solution:
I found the issue I accdently deleted the TRPCReactProvider wrapper from the layout...

Clerk auth() called on a route with file extension in T3 stack

Hi all. Having some issues with T3 and Clerk when i navigate to a route with any extension '/foo.bar'. I get the following error: ```Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following: - clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware. - Your Middleware matcher is configured to match this route or page. - If you are using the src directory, make sure the Middleware file is inside of it. ...

How to port an app from Next.js to the T3 Stack?

Do I just need to port it over to trpc? The app that I'm talking about is quite large

How can we enable experimental TRCP features?

I'm using the app router, and i'm getting type errors when trying to enable experimental TRCP features, specifically, i'm trying to enable streaming responses: https://www-git-05-01-stream-trpc.vercel.app/docs/client/links/httpBatchStreamLink#generators But adding it to the initTRCP function gives me a type error: ```...

Typescript generic field selection assumes type incorrectly

I was working on a generic lib-like api for something I'm working on, and got stumped by unexpectedly wrong typescript generic field selection. E.g. if <Foo extends Something>(args: Foo), then you'd think args.field is typed as Foo['field'], but it's not, it's simplified down instead. Here's a minimal repro:...

onClientUploadComplete not working on backend adapters

I can't image urls on client or server side but I can see the image uploaded on uploadthing my client side code : ```javascript import { generateReactHelpers } from "@uploadthing/react";...

Zod not validating file input

``` z.object({ userId: z.string(), headerImage: z .instanceof(File)...

Cannot upload files to supabase storage

I want to upload image to supabase storage from trpc but im getting Unauthorized error even though ive created policy for anon users (as im using next auth) ``` changeUserHeader: protectedProcedure .input(...
No description