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

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

best way to benchmark cold starts

i'm going to upgrade some apps to the json protocol and would like some stats on the impact it made. what's the best way to get useful stats on this without too much work?

Having role on session, is this security issue and/or is there better way?

Hey quick question on t3 (more security and sessions) if i have this role property on the user and want to check it, everytime a call is made. Is it find to store it on the ctx.session.user object or is there a better way? This role will obviously determine what privileges the user has and whether certain checks needs to be skip in case of the user is an admin etc. Basically what i want to achieve is that when an admin checks a partners org it should skip the checkUserOwnsOrganization check...

t3/next.js app - back button doesn't work?

I recently went through theo's T3 tutorial where we built a emojis-only-twitter app. the back button doesn't seem to work. i can click onto a single post/user view (1st pic), but when i click back, the home page doesn't re-render despite the page url changing accordingly (2nd pic). when i refresh the page the home page loads. if i manually enter the home page (localhost:3000/), it loads. ...

Google analytics 4 very difficult to setup

I have been trying to get it to work on nextjs 13 / t3 stack It didn't work the only way i was able to get it to work a bit was to use the old google analytics which will soon be obsolete so that's why i trying to get the analytics 4 to work But all efforts to no avail...

Having trouble starting with AWS S3

I’ve been going all in on the t3 stack and serverless solutions for my latest hobby project. So far: * I’m more excited to learn a new stack than I’ve been in years. * The services have been simple to set up and easy to use. * My productivity is through the roof....

guide to migrate from webpack to turbo

Is there a guide to migrating from the OG create-t3-app to using turbopack?

React nested setState (zod like) Library API and NPM publishing

Hi!. I'm looking for feedback on the API of this library (in image) and secondly the steps to publish it if is not a terrible idea. I'm working on a multi-year warehouse management app and deal with deeply nested state daily so I made a helper function in the style of zod where everything is a function. With this though the functions are built from existing state to help set state. So every nested key turns into a function to set the state at that point in the object. Just want to get some feedback on the api that is in the image and if anyone can foresee any issues or has suggestions? ...

Receiving Contact/Feedback from Website to Email

So I have this basic HTML/CSS/JS application (no frameworks). Then there's a form on the page where I want users to enter some messages/contact info and hit send. Ideally I want these messages to arrive in my email (gmail) 1. I know about nodemailer but I don't want to use any backend here because of hosting difficulty with backend applications compared to frontend 2. I don't want to have to use an external mail service where the mails would go to. I want them directly in my email. Please let me know how to go about it...

nextjs layout rerendering

I have this code in _app.tsx (image). As you can see, anything that matches the /projects/.* regex has a ProjectSidebar Layout. My understanding was that this Layout gets rendered once. and whatever "children" gets passed down will be replaced. However, I put a console.log statement in ProjectSidebar, and it's getting logged when I click on different Links that bring me to the component that uses ProjectSidebar. 1. Why is that happening? 2. Even clicking on the same Link triggers the console.log statement. Why?...

Serverless (Vercel) Prisma Cold Start Optimizations

Prisma's performance in serverless environment is a hot topic currently and I made this topic to collect best practices, optimizations and tips to use prisma's extremely great developer experience with vercel's blazingly fast serverless functions. As I've previously seen it, cold start are around 2 seconds, while warm requests are handled in ~600ms in a very simple scenario. I understand, high traffic sites don't face this issue as much as others, since they keep functions warm. Switching to (or using them parallel) kysely or drizzle is not really an solution imho. Going back to container based deployment is currently my go-to option if performance matters this much, but having leave Vercel's awesome features behind is a real pain....

Using Prisma with fastify in create-t3-turbo

I am trying to setup a project based on create-t3-turbo so that I can share my prisma configuration between my nextjs app and fastify. I have managed to get the project working locally, but when i build and run the fastify server i get the following error: ```...

Can we use Nextjs trpc endpoint for other apps?

Like i have built t3 app. I need some of the end points in my next react app. Can i call it?....

noob question - data flow in app / app architecture

Hey folks! I want to expand my knowledge and get some experience with databases and how to properly handle the data. I am using the full T3 stack, and planetscale for DB. The app which I am building should be an trading journal. So basically, the user will submit his read only api keys from the given exchange, the app will load all the relevant data, store them in the database and then work with them in some calculations....

help with prisma schema (coming from sql)

```diff generator client { provider = "prisma-client-js" } ...

Bad performance using planetscale, vercel, prisma

Hey all, I have been working on a website called krossahp.se - please feel free to check it out. Im finding that the site feels surprisingly sluggish, for example it takes quite a while to get auth status sometimes (upwards of 2,3 sometimes 5 seconds). ...

Deceptive site ahead

Hi community, I have a Next.js app with NextAuth running on a VPS. Last night, I received a red screen indicating that Google had detected phishing. According to the Google Search Console, these are the URLs that are supposedly affected: https://mydomain/api/auth/signin/ https://mydomain/api/auth/signin/google I check the code on [...nextauth] and its normal. I have performed a clamscan of my repository on the VPS and all files are okay. How can I fix this issue?...

Benefits of RSC for dashboards-like apps

Hello everyone! I got a question regarding RSC. We have a single-page application that serves as a general management dashboard for our company. Would incorporating RSC offer any benefits for this kind of scenario? As I understand it, for internal tools like this one, the smaller js bundle size, which is RSC's primary feature, is not a concern. Furthermore, with RSC we probably wouldn't be able to leverage the significant benefits of caching and revalidation provided by tanstack-query....
Solution:
App dir Layouts are a huge win for dashboards though