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

need help with setuping msw

Hey folks I want to integrate msw in my Next App to mock the resend API currently I have mock directory inside the src directory and have these files resend.ts ```ts import { http, HttpResponse, type HttpHandler } from "msw"; import { z } from "zod";...
No description

importing server types inside the client, is that unsafe?

Sometimes I have shared util functions in my server directory, or some types from my schema. I am importing these in client side components. Is this unsafe? coulnd't find much info about it. Thanks in advance

JS/TS dataframe libraries

currently building a web app that deals with a lot of tabular data, i'm currently looking for a well-maintained JS/TS library similar to python's polars, ideally something that works full-stack polars has someting like this https://github.com/pola-rs/js-polars, but it hasn't been updated in over 2 years also found arquero and danfo, would like the input of people who have used these/other libs extensively, thanks!...

Hydration Errors

Do you guys know any better resource to better understand Hydration errors

What's your favorite AI model and why?

I'm using a mix of Gemini 2.0 Flash, 2.5 Pro, OpenAI o3-mini and Claude 3.7 sonnet (with and without reasoning) for multiple tasks. I can categorize my tasks into 3 jobs: 1. Coding -> Claude 3.7 (or deepseek v3 is it comes to using new packages like TailwindCSS v4) 2. (Re)writing texts -> o3-mini...

Best no sql db

So I have some pretty unstructured data and don’t really want a sql database. Would also like some ai capabilities like vector search and etc. What is the best no sql db for Nextjs apps? I’m coming from theos new tech stack vid and he doesn’t mention any no sql dbs...

how to handle DST and/or timezones on javascript?

Im building an application where users can schedule and reserve parkings for their cars. I currently manage correctly (i guess) the timezone changes, i.e the schedules are saved on UTC-0 in the database and its shown on the local timezone for the user on clientside. The issue here is daylight saving times. On 05/04/2025, in Chile the hour would set us at UTC-4 instead of UTC-3, so every schedule that was previously saved for, i.e 15:00 on saturday, saved on its UTC-0 representation at the databa...

LEARNING REACT AND COURSES

Hey guys I may have a stupid question but then again they say no question is stupid. So my question is did you guys do the React by Maximilian Schwarzmüller course on Udemy ? Is it still relevant I read somewhere that some 30% is outdated. At the same time the course is quite long of course it includes for example introduction to Next.js tailwind etc. but again I don't know to what depth I suppose I will still have to buy a course on Next.js from him. Overall if it's worth the time ? also I woul...

Is t3 premium worth it?

with t3 chat premium, can I suspend all my active subscriptions with claude, gemini and openai? or is it still not good enought to allow me to make this change? thanks guys

2025 Best Expo Stack

Is Supabase a good fit as a backend for Expo? I'd like to handle transactions as well — could you share what kind of stack or architecture you’re using?...

Looking for AI models for my SAAS

m looking for a fast, lightweight, and free (or very cheap) AI model for the first stage of my SaaS, which is similar to Notion or Obsidian. The AI should quickly format and organize programming notes, making them clean and structured without delay. I don’t need anything super smart—just something fast, efficient, and low-cost. It should work instantly so developers can take notes without interruption. I’m open to free, self-hosted models or cheap API alternatives. If there’s a way to define rules for formatting, that would be a bonus....

Best practices using neverthrow w/ RQ

Like in the title - I wanted to ask if anyone used those two together, and in turn how to get best type inference out of the two - I assume custom hooks like useNeverthrowQuery that intercept the queryFn / mutationFn and turn it back to promises? Not sure if the API of neverthrow allows for such conversion

How do you manage to debug the server side in VS Code?

I've been trying various configurations, but the breakpoints are unbound for some reason. configurations I tried: ``` {...

NextJS `npm run build`, warnings and errors don't have colours?

At some point my NextJS t3stack warnings and errors stopped having yellow for warnings and red for errors. Finding the issues has now become a lot slower. What do I google or how do I check why this is happening?...

T3 Pro Plan Context Window Size

According to the T3 FAQ, the Pro plan provides 1500 standard message credits per month, plus 100 premium credits for Claude. I'm wondering about the context window/token limits. Specifically, what is the maximum number of tokens I can send per message for each model available through T3? Is there a fixed token limit that applies to all models, or does it vary?
Solution:
I received an official response regarding the context window size limits for the T3 Chat models and thought it might be helpful to share: Most models on T3 Chat support the full context window size. There's no message limit, other than the model's overall context window limit. The exception is Anthropic models (Claude), which are capped at 32K tokens. Here's a breakdown of the context window sizes for each model:...

Censored responses from AI's

Has anyone tested prompting certain LLM's with censored information that is validated later rather than earlier? Does T3 chat just delete the previous tokens? or do they just send everything the API has sent and saves it to the local storage and when the api deletes it's response it just adds the deleted to the end?...

Versions issue with shadcn/tailwind-4 and React 18

I'm unable to find much info about this maybe unusual setup(?) Starting new (vite) project, so I naturally want to use latest shadcn/tailwind. But also trying to stay on React 18 to avoid (yet unknown) possible issues, because I plan to use this project as remote in with module-federation that has other react 18 apps. ...

does t3 support image generation from open ai?

does t3 supports image generation from open ai?

Are bangs in T3 Chat a good idea?

Solve a knapsack problem in Python !r1l What color is the banana? !g2m Write me a proposal !o1 and so on... ...

T3 Chat History Deletion vs Privacy Policy

Delete Chat History says: This will permanently delete all your chat history from both your device and our servers (if sync is enabled). This action cannot be undone. However, their privacy policy claims they retain message history "User Data". Is the User Data deleted after? Or is it only removed from your view while they retain a copy of all your information....
Next