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

Getting the `OurFileRouter` type for the generateReactHelpers function for custom input component.

Hey guys, this might be a stupid question but I current have a custom React component to handle file input and do a bunch file validation with Zod and React-Hook-Form (irrelavant...ik). Following the example for creating back-end adapter for my API. I'm having trouble for how to get the FileRouter type for the generateReactHelpers function. I'm not using monolithic architecture similar to the example from https://github.com/pingdotgg/uploadthing/blob/main/examples/backend-adapters/client-react/src/uploadthing.ts What would be your recommendation on how to resolve this? Thx u πŸ™...

Bug: [uploadthing] Unable to Resolve UI Package Path in Next.js + TS + Tailwind Project

Hey everyone, I'm encountering an issue with the Uploadthing UI packages in my Next.js + TypeScript + Tailwind project. The log displays the following message: ```plaintext...
No description

is there a variation of `react-native-country-picker-modal` that doesnt use defaultProps

Been searching everywhere and have yet to find a single library that is half as good but doesn't have this error. Ive found like 4-5 that claim they dont have this error but when I boot the app up, I run into it anyway. Im on a bit of a time crunch or else I would keep exploring but the meaningless claims are getting to me, I just wanna hear from someone reliable and this place is always pretty reliable....

t3-chat: start new chat from url endpoint

Is there a way to start a new chat in t3-chat from the url, for example https://www.youtube.com/results?search_query=%s to make a youtube search. I use this a lot for custom search in the browser. TLDR: does t3-chat have some endpoint similar to: https://t3.chat/chat/newchat?model=foo&question=%s to start directly start a new chat? If not, where can I make a feature request for this?...

Unable to have a environment variable only on client?

I'm configuring the better-auth library for my app and it requires the BETTER_AUTH_URL environment variable on the client side, therefore I prefixed it as NEXT_PUBLIC_BETTER_AUTH_URL. ```js import { createEnv } from "@t3-oss/env-nextjs"; import { z } from "zod"; ...
Solution:
what if you try having two env with the same value? BETTER_AUTH_URL on server and NEXT_PUBLIC_BETTER_AUTH_URL on client

React on Amplify with or without Next.js

Hi, i'm doing a rewrite of a React app. What is outside of my control: 1. deploy to aws, either amplify or ecs 2. backend done in python 3. using react...

Claude Sonnet 4

Does anyone keep up with the LLM news? If so, does someone know estimate when they will release Claude Sonnet 4? Because 3.5 has been released more than half a year ago and still beats the new models and gives better answers. So I'm hyped about Claude Sonnet 4, and hopefully we'll see lower pricing.

T3.chat text to image

Will it ever be possible to generate images on t3.chat? I'm currently paying for (Poe, another AI wrapper) that allows me to pick and choose any model I want. T3.chat is great, but I sometimes need to generate images, less than 20/mo. Is this on the roadmap, I'm happy to pay extra for this. If this isn't, is there a tool I can use to generate good quality images, usage based instead of a fixed subscription? I'm currently using Flux 1.1 Pro in Poe...

When will you add pdf support in t3chat?

Normal chatgpt, claude, deepseek have support like this, so what't the problem with adding it?

React Native Phone Input

Does anyone know of any libraries for text inputs that use phone formatting masks? All of the ones that I've found seem to have been abandoned years ago. I'm surprised that something so integral to auth isn't highly sought after. You could filter out any non-numerical characters using an onChangeText handler, setting state manually and assigning it to the TextField's value prop, but this leads to a jumpy UI where the unwanted character is shown briefly before being removed. I'm assuming this is happening because the state being set on the JS layer tries to override the native text input component AFTER the native layer has already set its own internal state....

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