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

Create 10,000 dummy React Views (Windows 11)

Does anyone know how to create a batch script to create dummy views. Just need 10,000 files with the pattern of something like View$i.tsx and then content is just random HTML that is 100KB in size. It's a weird set of requirements but is needed for performance testing.
Solution:
this worked ```cmd
"View!fileNum!.tsx" echo export const testFunction!fileNum! = ^(^) =^> {
>> "View!fileNum!.tsx" echo return ( >> "View!fileNum!.tsx" echo ^<div^>...

Stripe integration

Trying to follow Theos Stripe tutorial, turns out I got some skill issues and not understanding the kv setup as I haven't done this before. Can anyone please assist in the setup of it?

Best Way to Model Integrations in Postgres?

Hey everyone, I need advice on modeling data for a system with multiple integrations. Currently, I plan to support 4-5 integrations (e.g., BigCommerce, Shopify), each requiring unique information like API keys. For now, an organization can only have one integration, but I want to design the model so it’s easy to expand to multiple integrations per organization in the future. I’m using Postgres and wondering about the best practices for structuring this. How should I model these integrations to handle their unique data while keeping things scalable and maintainable? Any suggestions or examples would be greatly appreciated!...

whats the best database to use (like sql, postgress and those stuff)

the topic basically
Solution:
sqlite for simplicity and portability, postgres and mysql if you need scale, like huge scale. The difference between postgres and mysql isn't worth looking into if you're still new

Simple typescript function

It has been several hours since I have been trying to create a simple function that I know is possible to create, because I once somehow managed to do that, but not now. I just want to create a function that takes other functions. ...callbacks Each of those functions will be called inside, and a single value will be passed (context). Context: It is an object that takes the result of the previous callback. execution. so like [0]: number, [1]: {a: number} ...

Neos Postgres vs PlanetScale

Theo has recently mentioned that planetscale is way better than Neon. I really want to know much more about this. What's wrong with Neon? (I am shipping Neon for my startup and I am super interested in hearing anything you know!)

Typescript Eslint

I'm not sure if the structure for plugins has changed for eslint but after updating some packages, I'm now getting type error when providing strings.
No description

Tanstack table

Can I add style to column group border in tanstack table?
No description

Hosting option for app serving lots of images

I have an application that serves a lot of ~40-80 kb images, the project is deployed using vercel but I already used up the free tier's perks for image optimization. I haven't tried deploying using a VPS because I've heard of the amount of overhead that comes with it as well. Would love any input on this as I am kind of a noob when it comes to handling these things. Thanks!

Using Next Js with GRPC Backend

I'm interning at a friend's startup building a SaaS for textile companies. The backend is in Go with gRPC, and I’m handling the frontend. While Angular is the proposed framework, I'm more comfortable with Next.js, which offers easy server-side rendering and data prefetching—crucial for our data-heavy tables and pagination. I’m exploring options like React Query or tRPC for managing data fetching, but I need to integrate them with gRPC without adding unnecessary complexity. What’s the best approach to efficiently prefetch data, handle pagination, and communicate with gRPC in this context? Anyone worked in a similiar codebase?...

What theme Theo was using in Vivaldi?

I just watched Theo's Google Drive clone tutorial and found his Vivaldi really nice! Does anyone know what theme he was using?...
No description

Massive Stripe Update Help - Plan to Prices (~2019 version - present)

I have to update a C# API I've inherited and the current version of stripe-dotnet it's on is 27.4.0 and I'm updating it to 47.3.0. One of the big changes I've noticed is that stripe wants you to move from Plans to Prices. I was hoping someone who knows Stripe well can give me a rundown on what the change is here? I have a snippet of the existing code here that is just trying to return the total monthly cost for a subscription. ```csharp foreach (var subscription in stripeCustomer.Subscriptions)...

INTERNAL_CLIENT_ERROR using uploading thing

Does anyone know what this error means? My file router is very simple: ```singleImageUploader: f({...
No description

what is the best way to generate a thumbnail image / poster for a video that is uploaded to UT?

I was thinking about using ffmpeg to generate a thumbnail from the uploaded video, but this might get costly on the server. and i dont like writing to the file system on the server as my own general rule. plus, this going to require uploading the thumbnail to UT after it is generated. I wish that UT automatically could create thumbnails for videos. But that might be asking too much. The other alternatives i was thinking of was AWS Lambda S3 solution or cloudfare. But that just defeats the purpos...

Folders in UploadThing

Hi Guys I've seen that folders are on the roadmap under "this year". Any idea what that means? I would really like to implement uploadthing as storage provider in my multi tenant payload cms app but to make this work I would need a way to see how much storage every tenant uses. What would be the way to work around before folders are available?...

Help Needed: Deployment Error on Netlify for T3 App

Hi everyone, I'm currently trying to deploy my T3 homepage following the tutorial https://www.youtube.com/watch?v=c-hKSbzooAg and I've encountered an error during the build process on Netlify. The error logs indicate issues with Corepack and the installation of pnpm. Here are the relevant parts of the log:...

UploadThing Regions

Hello there, I am planning on putting round about 200.000 (50Gb) images à 1-3Mb on UploadThing first Tier Plan and was wondering if there is a way to get any information about the regions? Latency tests and locations etc. I couldn't find any in the doc and are planning to publish my site for all major continents. Therefore, comparing services etc....

UTapi or is there Something better?

I have to make a form in which when i submit the form, the images are uploaded to uploadthing, and then all formdata along with the urls of the images are added to the database. Previously, I made an next js route handler and used utapi to which I gave the images via formdata and get back the urls and ids. I am currently refactoring a lot of apis and components. I have also upgraded to uploadthing v7. I was wondering is utapi is a still way to go or is there something else better....