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

Supporting multiple auth providers

This is more so a high level backend question, but I am wondering what is the expected behavior if I want to allow users to sign in to my app via Google, Discord, GitHub, and even just plain ole credentials (email + password). Should I create a separate account for each provider that the user logs in with (regardless of the email), or should I do some sort of auto account linking where I would merge multiple providers into the same account if the email is the same? Unsure if that would impose account hijacking issue or any other security issues. Another potential edge case is that if I were to do account linking, say with Google and credentials, and the user changes their Google email, should I still honor the linkings because it's still the same Google account?...

I'm lost and I don't know what should be my next steps

I've been learning web dev for a year now I started exactly 1 years ago. I've learned a lot thankfully and at the beginning I was really lost just like I'm now. but the difference is I thought I was alone and I had to figure out everything on my own but now I recognize that communities like this one exists and I can ask for help. anyways as I mentioned I've learned a lot about web dev the past year especially front end up to being comfortable using nextjs to build any app that has a crud and auth in it. back to the main point which is I'm currently lost I've tried to build something slightly advanced I guess like a zoom clone has has meetings and stuff but I couldn't I got overwhelmed by WebRTC and Web sockets which I wasn't exposed to before this project and when I look at someone like theo and the stuff he's building like t3 chat or sth I really get inspired like how is he like that I wanna be like him I think he's really cool but I just don't know how to get there....

HTMX worth it? or bad?

I enjoy the idea of it, but is it any good? Has anyone used it? What's the pro and con of using HTMX? I'm a vanilla dev ๐Ÿ˜...

Whats the name of the web scraper api that sponsors theo?

I've been looking for a while now, I can't remember the video or name of the company. If you know, I'd appreciate the link.

T3 Chat state

I'm building an AI chat application where LLM responses are streamed to the frontend using web sockets. The frontend concatenates these responses to the existing AI message using React's useState. However, Iโ€™ve encountered an issue with faster responses. The LLM can stream up to 25+ tokens once, but the frontend is unable to update the state multiple times in one go. As a result, only the last token is concatenated, and earlier tokens are missed. I've explored two potential solutions, but neither feels optimal:...

Astro Document Processor

How can I add a document Processor to Astro, to add Supported Formats ? I want to make my Docs with starling and I have XML comments that I want to include as an API overview. It would be nice if that already exists, but I'm totally fine writing it myself if anyone has any resources on how to add it....

Sentry Alternatives

Hi everyone, I was wondering if anyone has experience with alternatives to Sentry and had any thoughts they could share. I am not particularly unhappy with Sentry, just also curious to know if there is a better solution out there....

atomic distributed transaction

I have a nextjs action function which does 4 different tasks, 3 of them are making an api call and 1 is updating the database using prisma. I want to create these 4 tasks as an atomic task. I came across SAGA patterns. Distributed workflow orchistrators like okres. I wanted help on how do i implement it. + also i want to make the nextjs action for these task to be asynchronous with nextjs using RabbitMQ.
No description

Is it safe to ignore occasional next-auth CLIENT_FETCH_ERROR reports if everything seems fine?

I'm running t3 app with ~100 users on vercel using Next-auth, and I'm getting these errors in sentry. I'm fairly certain these are happening because of network issues on the client that I really don't have any control over, but I'm not sure how to ensure that's the case? Is there a way I can configure next-auth to handle these more gracefully? Error message: [next-auth][error][CLIENT_FETCH_ERROR] ...

Error [LibsqlError]: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only

I am getting this error when my project have middleware. Error goes away when deleting middleware.ts
LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:". For more information, please read https://github.com/libsql/libsql-client-ts#supported-urls
LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:". For more information, please read https://github.com/libsql/libsql-client-ts#supported-urls
...

Tanstack - React tabel , pagination problem

Hey guys, i hope y all doing good. ๐Ÿ˜ƒ I m using a Tantstack tabel in order to display some fetched data in column which includes some actions for each row , ๐Ÿ”ด but every single time a user updates a specific row the pagination jumps to the first page (which is the current problem ) , could you let me know how fix this pls ?...

onUploadComplete is not being called

I followed the instructions from the documentaton. When i upload something the file is uploaded well but the onUploadComplete is not called and the loading animatiopn does not be removed from button. What am i missing? Can anyone help me?

Looking For Specific Theo Videos.

Good day everyone. I have a quick question. Does anyone know of the titles, or have a link to the following videos that theo has done: 1). The video were he was talking about "sending unresolved promises from the server to the client" ., 2) Talking about some of the internals of react-native, from what i recall how react-native uses the same type definitions for the dom as react (something along the lines of that), he goes into detail about react-native & 3). The Theo-Primeagen debate about typ...

hosting videos in Vercel static CDN?

I have a video I want to host but don't feel like setting up AWS cloudfront etc. Is it a bad idea to put a couple short videos (20mb) in my website's \public folder and use the Vercel CDN to host the videos for me so that I can embed them in other places?

High bill for Sanity

Hello all, Recently, the invoices of our Sanity started to increase (see image 1). The used framework is Next.js (hosted on Netlify). First, we paid less than 50 euros, but now we get wills of 300 or even 700 euros. It seems that the Bandwidth (see image 2) and the API CDN requests (see image 3) have increased, causing this explosive bill. I started working on converting the website from Page Router to App Router on December, 20th (and I have to find my Theo Twitch clip to see when I was done), but the Sanity increase already started in November, so the conversion will likely not be the cause. According to Google Analytics, there is no increase of traffic on the website. It even seems that less people visited the website than the months before....
No description

real time video stream that gets served to multiple users

Hi all, this is at least what I found to be a very unique issue or problem I am facing and is a react client side issue and need and I'll do my best to explain the issue but for work we work with other companies and integrate rstp/http cameras into our software, and we need to be able to serve these cameras video feed onto our webapp. I am using ffmpeg to convert the rtsp/http stream to mp4 and I am taking that output and piping it to a rabbit mq and publishing the messages using pub/sub. My NextJs API Route Handler is the subscriber of the RMQ message broker which consumes the messages from rmq and streams that to my client component in the browser. It also could be my lack of understanding of how NextJs API Routes work too...

limits of the free tier t3chat?

what is the limits of the free tier t3chat?

custom login page does not work

i made a custom page for sign in and it does not give any error but it does not work either. can someone check my code to see what is wrong?
No description

NextAuth.js is now part of the Auth.js

Recently started using t3 and get errors after setting up the project regarding NextAuth.js. The documentation next steps and getting started with Discord Auth example don't match what T3 creates. Does an update need to happen as NextAuth.js is now auth.js?...