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

how to add a column to my database in production without wiping database (prisma x mysql)

I want to add a column to my current user table I want to add a column called verified and defaults to false But we are currently in production with large users i can't afford data lose any ideas?...

Help with (new) monorepo tsconfig

Ive just started merging two codebases into a monorepo basically i have FM and reporting...

uint256 in mysql

what's the most sane way to store an amount like this in a db? Decimal(38,18), a bigint of wei like Decimal(38,0), a hex string like binary(20), varchar (lol), something else?...

What is the optimal flow for guest to user functionality

So I'm building an app with the t3 stack where users can create itinerary's and I want guests (people not signed in) to be able to as well, but their's won't be saved if they don't sign in. Current semi-implementation is to create the itinerary on the client and save it to sessionStorage. I'm rendering the guest itinerary on a different page than the user itinerary page. Then when a guest returns from sign in (OAuth provider), take what's in sessionStorage, navigate them to the actual user itinerary page, create it in the backend, wait for response, and then render it. I feel like there must be a better approach. What's the best way to go about this? Is it okay to save guest data in the db temporarily?...

What to use to for Email Templates

What do you recommend for writing emails? There is so many options, I would probably like something code related like: https://mjml.io/ Did theo ever said what he uses?...

Noob TRPC quesiton regarding response JSON

I am struggling with parsing some JSON my TRPC API is responding, and hoping to receive some guidance. I have a TRPC API which calls a table created in Prisma , as follows: ```ts...

Typescript error when using tailwind Container queries plugin

Hello, I Just want to try the container queries, but I've got this error (see picture). Do you know what we are supposed to do here? I don't find any @types package available....

T3 Turbo : Do I have to run on mac to use expo go with iphone?

When using t3 turbo and expo, do I have to be running on a mac to use the expo go instant developer experience? I believe I do, but expo documentation is a little confusing.

looking for free redis service with proper security and password

free redis hosting? unlimited requests per day minimum persistent storage=5mbinimum ram=100mb, minimum cpu=1 core, no phone verification no card, free redis hosting 24/7 I want and also, I don't want trial

How to delete One-to-many self relations in Prisma?

I define the discussion model as a 1-to-m self-relationship. But something goes wrong when I delete parent discussions (discussions with many replies). It's totally fine if I delete the discussion without any reply....

What's difference between prisma db push and prisma db migrate

I see it as they both push schema to DB, also there is prisma db generate

Custom fields with EmailProvider

Using EmailProvider with Prisma and doesn't seem clear how to add additional fields to the user during initial registration - is there a way to do this or should I just send the user to a new form as a second step after the user has successfully authenticated with a sign in link?

Prisma reorders database

I've found out prisma reorders my database upon updating, any chance anyone know how I can stop it from reordering? I can't find anything on the prisma docs or in google..

How to create API token with Clerk?

I need support of API tokens for my service which never expires. Theo recommended Clerk as auth options. Does it supports my request?

calling GET, POST, DELETE, and PUT request in one next.js api file

Hi guys is it possible to call all 4 CRUD methods in one Next.js api file?

Confusion: Type annotation/ Type conversion

Hello, may anyone who has better understand help me digest the following? In both cases the "interface" has one property of the "value" but why does one throw error while one does not? Thanks for any help in advance....

tRCP beginner questions

I am very new to tRPC and it is too good to by true but there are some general and basics questions I have: 1. tRCP couples the client and the server together, does this mean that you can not consume a tRCP server/endpoint with different clients that you develop separately but with the same type experience? 2. are there tRCP server implementations for other languages? (Rust, Python)...

tRPC API endpoints?

Hello guys, i've been asked to implement an api route to create, validate and edit password using post methods, I'm allowed to use t3 and provide a better implementation with it... I'm new to it and i'm trying to wrap my mind around trpc, i have been able to do queries and mutations using it from the front end. but I'm not sure if it's possible to use it in an api endpoint ex: /api/user/create, sending a req.body instead of "input"? sorry im a bit lost...

Deceptive Site Warning

Two of my t3 apps have been flagged by google as deceptive sites and I'm not sure what has happened. One is deployed on vercel and one is a private company app hosted in AWS. Both got the deceptive site warning overnight, with the only common link is they both use ct3a. One is using discord auth, one is using google auth. Does anyone have an idea what this could mean? Public app: http://style-transfer-demo.vercel.app/...