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 do you do safe rollouts of new features?

Looking to discuss and have everyone share their opinions on the topic. I mostly have used feature flags for toggling features in production. However, Vercel’s instant rollback feature looks very promising for smaller projects. Instead of having to flag something, I can just revert if something goes wrong. How does everyone else perform their feature rollouts in a safe manner?...

Using Clerk's getAuth() helper causes withClerkMiddleware to be unrecognized

Hi there, Recently, I was following Theo's T3 stack tutorial on YouTube. When attempting to use the Clerk getAuth() helper function in the trpc.ts file of the T3 stack application, an error is thrown stating that the withClerkMiddleware function must be added to the Next.js middleware.ts file. Prior to using the getAuth() helper function, Clerk was working fine and recognized that withClerkMiddleware had already been added to the middleware.ts file. Steps to Reproduce:...

Wordpress with Instagram carousel, serverless replacement

My friend has a hairdressing salon, has a simple Wordpress website with a theme that took far too much effort to setup a few years ago. He has a Wordpress plugin that pulls his lastest instagram posts and displays them in the Wordpress site. Is there any service that you would recommend? Also any recommendations for a 📸CMS that’s simple to use, perhaps similar to Wordpress, and wouldn’t be used often, just by one person. 🙏...

How can i remove the parameter

I want to remove the parameter createdAt cause its of type date.
Solution:
I want to remove the parameter createdAt cause its of type date.

Layout management - T3 Stack - Next.js v13

Im struggling with layout usage. Can't fugure out how to implement it well using the create T3 app starting point. Basically im creating a admin section that will have lets say 4 sub sections ( ...url.../admin/user, .../settings, .../dashboard, etc) and the subsections will be in the content of an admin layout that should persist states like active section but I couldn't find a workaround for this. On React.js i used to use react router dom and just setting the Outlet as children of the layout and thats all. As i read in next js docs, v13 beta has a better management on layouts but idk how to migrate from the t3 stack template to that struture to get what im looking for. Has anyone faced the same difficulty ?...

Worth paying for more Planetscale databases

I currently have an app I am building longer term that is taking up my 1 free database, I have been wanting another one to have as more of a short term one for building ideas out... is this worth it or do people just jump from free tier to free tier?

Issue with npx create-next-app@latest myAppName

Hi guys hope you are doing well, I have a little issue here with npx create-next-app@latest myAppName, on the terminal it shows this issue, I've tried to clean my npm cache and update to node to version 18 and npm is up to 9.6. I dont know what else should I do. thanks 🙂...

Adding scope in NextAuth

Hello! I'm working on a project with a nonprofit partner that has setup their Cognito/database that I'm trying to hit. In the PoC they showed me the JWT decodes to have a scope of "scope":"openid membership-bff\\/admin email" but when I put in membership-bff/admin into the
authorization: {
params: { scope: `openid email profile` },
},
authorization: {
params: { scope: `openid email profile` },
},
I get hit with an error telling me I have an invalid scope. Is this a case where I take the token given to me by Cognito and manually inject membership-bff/admin somehow? ...

Stripe Webhooks typesafety

Im getting a stripe webhook to send a post request on invoice finalized to my next lamda func, but obviously I don't have the typings of req.body.object. How do I get these?

I'm using icons from github repo that is updated, how would you store it?

Hi, I'm allowing users to choose their techstack, I have the techstack from https://github.com/gilbarbara/logos How would you store them? As a file or would you insert it into database, what if the data changes, would you have some script to update the database? I'm leaning forward a simple file that is cached, but would love hear a second opinion on this...

WHAT IS YOUR FAVORITE LOGGER?

Hi all 👋 I'd love to know what is the 'best' logging solution I can use in my T3 app? Also, a few weeks ago there was some talk that a good error handling tutorial is needed, do you know of a good resource to learning best practices in error handling?...
Solution:
console.log

Deploy FastAPI into Vercel

I'm having some troubles when trying to deploy my simple backend with FastAPI into Vercel, I've already create a new question in Vercel discussion room, can you guys take a look, many thanks !!! 😭...

how tight should types be?

I have a tasker field in my task type. The most "accurate" type would look like - ``` type tasker = {...

Setting up notifications in a serverless infrastructure.

My backend is using MongoDB & serverless. Frontend is using tanstack query. What I am doing currently - 1. Listening to a websocket (at wss://websockets.company.com/and if there is a notification, I do the following - 1.a. Invalidate my notifications query...

Prisma: not a good choice for MongoDB?

https://github.com/prisma/prisma/releases/tag/3.10.0 The embedded document is still a preview feature...I'm not sure how many problems there are. But if I can't use embedded document, why do I use MongoDB?...

Prisma nested write issue

I get a TS error (and failing query) when trying to execute this nested write. ```prisma model Applicant { id String @id @default(uuid()) @db.Uuid...

vercel preview domain alias

I’m trying to follow this guide to add an alias to my GitHub CI workflow: https://vercel.com/guides/how-to-alias-a-preview-deployment-using-the-cli But I always get an error that the deployment ID cannot be found. I get the same error when trying to run the same command locally against the preview URL....

Amazon s3 alternative?

Can anyone suggest me an alternative to store user files? I have not used other products and would be happy to look at alternatives. In the spirit of T3...

Recommendation for Free Database Hosting platforms

Hi, so I've gone through the T3 tutorial and ended up using Planetscale's one time only free production ready database hosting. I wanna know if there are some other free production ready database hosting platforms that works with Prisma. I tried using Railway but idk how to connect it with prisma as it's not giving me the url to connect to prisma. ...