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

Question about refresh /access token

Hi, for a middleware, whats the best approach to renewing access/refresh token? 1) Is is better to check if access token is expired in middleware and if so, check refresh token and its valid simply pass the new access/fresh via http cooki 2) Or use client/server side interaction- middleware only checks for access token. If request fails, the client send a request to /refresh and this route validates the refresh token, if valid it sends new refresh/access token to client. Client reattempts original request to server....

Is it possible to see cache hit/skip in the terminal when using Next with tRPC in the t3 template?

There's a feature in Next where you are shown whether your API calls were sent to the server or whether they used the cached data: https://nextjs.org/docs/app/api-reference/config/next-config-js/logging. You usually get a little { cache: HIT } for example next to your API call in the terminal. However, those docs mention that this only works out of the box with fetch. Does anyone know if there's a way to set this up with tRPC?...

noob need help!

hey guys, im very new to AI and i really didnt have any use for it since yet. im a vinyl record collector and wanted to use it for finding records from my wantlist and also to get me the best shopping experience. i tried to use deepseek but it couldnt use the api of discogs (the site im using mostly for record shopping) and "isnt allowed" to create its own account to see my wantlist. my question is, is there a chance AI can help me and use my wantlist off of discogs to search for new ebay entries or any other site where vinyl is being sold. plus multiple seller do have records i want, but prices vary in general plus shipping is different. is it possible that AI goes through all my wants and finds the best combination of each seller to provide me the cheapest buying experience? if there is someone out here who could help, that would be more than great! my DMs are open and thanks for reading 🙂...

Rails help

I’m taking a course in university right now where we build an actual app for an end user (clubs, orgs, or university staff) Only “catch” is that it has to be written in Rails, use Postgres as the db, and has to be deployed to Heroku. (Everything else is fair game) Needless to say I am an astrojs + svelte guy ...

Why does "yarn create t3-app" freeze? | Mac, node 22.5.1, yarn 4.6.0 (via nvm)

➜ Code yarn --version 4.6.0 ➜ Code yarn create t3-app ➤ YN0000: · Yarn 4.6.0 ➤ YN0000: ┌ Resolution step...

How should I handle differences in frontend TS types vs database schema?

For example, lets say in my SQLite database I have a Posts p table with the columns post_id, (fk) user_id, content. Assume other tables exist. But then in my UI I have a TS type Post that looks like ```typescript { post_id: string; username: string; content: string; messages: Message[] }...

t3/env strange behavior on validation

Hi, while using t3 env, I encountered an issue that caused this error message: attempted to access a server-side environment variable on the client. However, the variable in question is consumed by a server action. I’m not sure if this is a bug or if environment variables read within a server action are actually exposed to the client

When Theo says "put it in the KV", what is the KV?

I was watching one of Theo's videos on YouTube and he said something like "and then I'll just put it in the KV". I want a KV. Do you know what he uses? Is there a built in Next.js solution or is it Redis or something?

ufs.sh or utfs.io?

Docs say: Previously, all files were served from https://utfs.io/f/<FILE_KEY>. This is still supported, but not recommended and may be deprecated in the future. and also Everything is served from https://<APP_ID>.ufs.sh/f/<FILE_KEY> ...

Nextjs 15 404 page

What am I missing with the [slug].tsx here it returns a 404. I have this route app/living/location/[slug]/page.tsx but if I visit this route: http://localhost:3000/living/location/test...

Drive tutorial fails to deploy

I followed the tutorial with no changes from my side up until this timecode https://youtu.be/c-hKSbzooAg?si=0wqVRwnBIRdLzu5J&t=407 My deployment of this exact same thing fails with this deploy log (pasted to attachments). Local dev server did work tho. Then I deleted my netlify site, my github repository, my local repository, and redid the tutorial step by step again. Still the same deployment issue. I honestly have no clue how to go about this and how to fix it. Im new to javascript and I haven't used netlify before. I would love to get some help with this, as this is not my first time trying to follow a tutorial and it breaks before I could do or understand anything....

T3Chat constantly failing...

I'm just not impressed by the ammount of these....
No description

Images w/ next & vercel

I watched this video a while back where Theo warns against putting images and videos in the /public directory when using vercel. It makes total sense. What I'm trying to understand, though, is what is happening when I do this: ```...

T3 Chat - 403

I'm unable to access https://t3.chat/. It responds with 403 error. Worked fine yesterday. Does anyone has a similar issue? Is this expected? ID from screenshot: arn1::4ls8n-1738638256954-d9ab5806a262...
No description

UploadThing & Laravel/php

Please don't hate on me for Laravel/php. I've started at a new company and inherited a Laravel/php (backend) with Vue (frontend) app. The old external devs stored all the users uploaded files on disk on a block storage volume mounted to the laravel docker image. Clearly not scalable and means we're kinda locked into the host (actually - there are so many issues with this the more I think about it)... I was wanting to use UploadThing and - yes I know JS/TS & php are not friends, but found this port on github and wondering if there was anything else people know about before I venture down a path of code that hasn't been touched in > 1 year. ...

Update to expo 52

I am updating my expo app to the new SDK. The new expo-image-picker is using a default quality of 1 causing the images to be significantly larger. Has anyone found a good way of handling this? I can go over my current attempts. I am trying to create an issue using the minimal-expo from uploadthing but this has a wormhole of other issues that start before I can even replicate this. Any help would be appreciated. Thanks.

Monitoring and scaling management on a multi-application stack

The startup I work with has a couple data crunching applications that fetch and crunch data for our customers who are serviced through our web app. One of these performs dedicated operations for customers, and the other is a shared data store that the first relies on. While rabbit mq would have worked we use kafka, and it plus some http polling handles communication between all three applications. I'm looking at adding monitoring and management of jobs through the entire stack (mainly the two backend applications), do you have any principles, tools or articles you'd recommend for this kind of thing? At a high level I know what we need at the moment, which would be: start and end time of jobs Ability to quarantine or blacklist certain data points...

Theo recent auth video on JWT

Hi, the timestamp is 5:03 on theo recent video on different auth options. Im confused, currently my understanding is refresh tokens only ever get invalidated if the user sign outs or it expires. This is to force the user to sign in if refresh tokens only ever expires for security purposes But in theo video, he actually creates a refresh token whenever the acess token needs to be created. This results in the user to always be signed in unless they havent touched the app longer than refresh token expiration ...

Api keys

Hello is it possible i get a api key to use any ai model with vscode?

Regarding 2025 status of t3

Hey guys I just need help of someone who has been using t3 for some time to get clarified about how t3 is in current tech market for building freelance projects or saas applications