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

Making my first (production) website: Questions about auth, pricing, and hosting

For background, I’m currently studying online in college and have built several websites for my classes using HTML, CSS, and JavaScript. Until this semester, all of our projects were static sites hosted on GitHub Pages. Recently, we started learning backend development and building fully functional websites using Node.js. A local business has asked me to build a website for them. I’m using Next.js for this project, and the site needs to include: * A home page * Functionality to create and display events...

Vercel and DDOS Protection

I run this site for a YouTuber and my usage spiked and went over the free plan limit. I looked into the issue and within an hour, someone made 250k requests to my site. I have DDOS protection enabled I thought. I’m confused on how it got bypassed.
No description

Next.js Version? How to change?

What version of next.js does t3 use? I just assumed @latest meant it installed the latest version of next.js. How do I control the next.js version with t3? I read the purple docs cover-to-cover. It installed v15 in project I create today. Will it always default to the latest stable version? Or how does it decide? Can I put in a flag to change the version?

Software Engineer resources and groups

Since 2020 when I started to work from home indefinitely I started to slowly lose contact with other software engineers and I started to find myself more and more around non tech people. I have no problem with this, but lately the need to discuss different technologies with people similar to me started to become more and more accrue. Do you guys knows any groups or communities where they post latest stuff and also has a sort of forum to discuss stuff?...

How do i add custom id in uploadthing (nextjs app router)?

Hello guys, Apparently you gotta attach a header "x-ut-custom-id": "MY_CUSTOM_ID" to the presigned URL, but when using the nextjs sdk, that is unclear how to do....

T3 Slow down after 10+ messages

Is anyone else experiencing slow downs with T3 Chat after 10-12 messages? I am working on some Infrastructure as Code and about 10 questions in T3 errors/stops in the middle of a response. I can edit the question to ask it again and it will finish. Seems like T3 slows down the more questions you ask.

generateUploadButton throws type error

I'm following the 0 - Production Tutorial. I am about an hour in, and adding the upload button for UploadThing. In the first attachment you can see the code to create a custom export component using the generateUploadButton function. Calling it like this throws the error in attachment 2. If I replace OurFileRouter with FileRouter nothing changes, making me believe that OurFileRouter is not part of the problem. When I Import UploadButton from @uploadthing/react (with alias) and directly export it. As the commented out line does. The code works. Can someone give me some pointers where reality diverted from the tutorial and how to start to debug this issue?...
No description

Anyone with IoT SIM Cards and cellular connectivity experience? Need help where to look for problems

Hey all. I work in the IoT industry and our devices using KORE Super SIM cards to connect to the internet via cellular. KORE had an outage on Thursday, and only 2/3rds of our devices connected. FYI KORE Super SIM was previously Twilio Super SIM. KORE purchased that business unit in 2023 and they are still migrating. I only have experience working with the higher-level APIs available in KORE/Twilio. Stuff like activating SIMs, resetting connectivity, etc. I don't really understand the low level stuff about SIMs authorizing with a tower and such. I'm not asking for help troubleshooting that's a huge ask. But if there's anyone here that can give me a crash course on this I'd appreciate it. I at least want to be more educated and at least have a starting point for where to find a solution. I've gone 18 hours with no response from the support case with have with KORE, so kind of desperate lol....

WebGL + Canvas randomly going black [Helldive Difficulty]

TLDR: Can WebGL resources automatically be disposed by the brower/system without warning? I'm in a bit of a pickle. I have a Svelte project that acts as an image viewer and it uses an external library for rendering the images to a <canvas /> with WebGL. The user can pan, zoom, draw annotations, change brightness and contrast, etc. The problem is a small number of users are reporting an issue where the "viewer" randomly goes black and nothing they do will make the images appear again besides doing a hard refresh of the page. This isn't ideal because they lose the state of the images they had open + any effects they've done to it like changing the brightness/contrast. The big problem is this is happening silently. There are no errors or anything (that I know of) that are happening to cause this. The users are in clinical offices, so my hunch is that it is related to them leaving the website open for extended periods of time without touching the machine. I expect that their computers are going to sleep or the browser/system is cleaning up resources automatically since they aren't being used. I need help from anyone who is experienced with WebGL because I can't find any information on if this is a thing that can happen. The reason why I'm leaning towards this though is the WebGL stuff happens in "a different world" than the main thread it's the only thing that could disappear on it's own. Either way what the users are reporting is that it just goes black. It's failing silently with no errors. On my end I have no code that automatically does things on it's own. No code is messing with anything regarding the images/data array for the canvas/etc on it's own. It's only in response to user interactions. From what they are reporting it seems like there is no user interaction and that they just come back to the viewer being black....

T3 chat - document creation

Hello, on chat.openai there is a feature that when you try to create a document (a business contract for example) and chatgpt sends you to a full screen page and you can type / edit line by line the document. Is this gonna be a feature in mind for t3 chat ? PS: there is not tag for T3 Chat at the moment....

Cacheing Astro SSR pages at build tine

Hey all im making a site with SanityCMS and astro, currently im using SSR on all my routes and using FastlyCDN to cache the pages. These caches get invalidated by a webhook whenever an editor updates a page so content stays fresh without the need to rebuild. This is nearly perfect for me, but i wish there was a way to have my pages cache after the build, rather than when someone visits the page. Thinking about it now, i could probably run a post build script which tells Fastly to recache a list of slugs. Ill check their API....

how to get a refund? i wanted to use it for claude but this AI cant even read pdfs :(

how to get a refund? i wanted to use it for claude but this AI cant even read pdfs 😦

How to remove unused teams?

I created a new Team on dashboard and having issue figuring out how to remove it. :> P.s. Google and Docs didn't help much 😛 P.s.s Thanks...
No description

Supabase Postgresql Timeout on Discord Auth Request

Hey there! I'm trying to build my first T3 app and trying to get the auth up and running. I have it connecting to the Supabase PostgreSQL database and am able to connect & push updates to it from the console, but it's timing out on the Discord OAuth authorize call with an "AdapterError" and "write CONNECT_TIMEOUT". I think everything should be configured correctly (Discord redirects, supabase), but I can't figure out what's wrong with the configuration and why the write isn't working. Anyone have any idea of what I'm doing wrong? This is some of what I see in the terminal console: [auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror...
Solution:
Problem solved! The main issue was that I wasn't using the correct Supabase URI! I needed to use the Transaction Pooler address rather than the Direct Connection address.

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