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

Is Clerk a good choice to build a real auth management?

I want to give Clerk a try.... as you know auth-js is still in beta mode. is Clerk a good choice to be flexible and free from unexpected bugs?

Simulating low RAM

Related to https://discord.com/channels/966627436387266600/1330220446016208986 I believe the issue is because the users are running low on RAM and so their system is automatically disposing webgl resources. Is there any way locally to simulate low ram so I could force something like this to happen? Chrome dev tools only has CPU throttling...

Prisma doesn't update the db in my container

I have created a T3 app with postgres db. The start-database script creates a container as it should, but when I run npx prisma db push, nothing happens to db in my container, even though prisma says the db is in sync with my prisma scheme. I have opened the db in prisma studio and tried adding data, which gets stored, which leads me to believe there is a local database that prisma is connected to (?). I don't understand why it doesn't connect to my container db. I have a silicon mac, and this worked perfectly fine on both windows and linux pc as far as I know (could be irrelevant). The pictures attached are the commands I ran to make the db, proof that there is nothing in my container db in docker, and proof that there are columns in the db in prisma studio. I had to change out the username for my root username to even have access to the container, after some online digging:
DATABASE_URL="postgresql://gaute:postgres@localhost:5432/propulse-intern"
DATABASE_URL="postgresql://gaute:postgres@localhost:5432/propulse-intern"
. ...
No description

Twitch Re-sub confusion

So I cancelled the recurring membership for theo on twitch because I wanted to subscribe manually. Now I was like ill turn on the automatic payments. I clicked on to resume the automatic payments. I got charged $0.55, and it still says me that my subscription is ending and isn't renewed. I am really confused. (I am on tier 1)
No description

Cannot find module 'expo-asset/tools/hashAssetFiles'

hey everyone! ive just recently moved from normal repo to monorepo due to my stack, and currently i have turborepo-RN, and my expo app is in apps/native. however i have a weird issue: ``` iOS Bundling failed 6713ms apps/native/index.js (4553 modules) ERROR node_modules/expo-router/assets/unmatched.png: Cannot find module 'expo-asset/tools/hashAssetFiles'...

"Callback failed" in production.

Hello, I'm following the 0 to Production tutorial, using Vercel. Uploading files works fine in development locally, but in production the logs show that "callback failed". What could be the reason? I'm providing the latest audit log on the failed file upload: ```{ "url": "https://next-gallery-3x50b68ro-tiger-driver-xalizs-projects.vercel.app/api/uploadthing?slug=imageUploader",...

Why is UX popular for VS competitors?

I'm not technical on the development of these applications so bear with me but: Why do programs like zed.dev and trae initially develop for UX rather than windows? If I remember correctly Cursor was also like this but I know they have a Windows version now....
No description

Nuqs array toggle

How do I toggle value on nuqs array? Is this best way or is there other ways of doing it? ```ts "use client"; import { Button } from "@/components/ui/button";...

T3 Chat Subscription

Hey everyone, just saw t3 chat for the first time on yesterday's live. I'm a bit confused of what I'm getting with the pro subscription here. Chatgpt 4o and 4o mini are already available on chatgpt free tier as well as Claude 3.5 Sonnet. What is different about the what I get from t3 chat that I could not get from the free version of their original companies? I get the experimental models, I'm just a bit confused on the business model because I don't understand what I'm getting and the price a a lot cheaper than other subscriptions that I've seen on this space. Thanks in advance and I'm sorry if this was already answered before. I've tried searching but nothing answered my questions....

Does Upload thing allow for a folder structure?

I was thinking about using upload thing to handle file uploads for my mobile app. I don’t see an option to add folders to an app. Is it possible to create folders to categorize file uploads into different types? Ie profile pictures. Sorry if this is a dumb question but not seeing it in the UI

T3 Chat - Lost all chats after deleting cookies after not being able to access the app the whole day

I am unable to get all my chats. Please check this issue...
Solution:
I guess its a network glitch, cause in the better part of the day I was getting a 401 from your cloudflare gateways and I am authenticated. Now I have gotten back access to the chats after signing out and logging in the third time (Jan 22 2025)....

[SOLVED] New to Docker, can't connect from localhost to DB on container

I am running Docker on Windows via Docker Desktop. I am trying to follow a tutorial and one of the first steps is connecting to a Postgres DB on Docker with Drizzle, but my I can't connect to it and I get an error saying the DB doesn't exist. I have this compose.yml file: ``` services:...
Solution:
you can try running this on windows to see if anything is also taking up that port. netstat -an | find "5432", cuz its possible that an existing postgres instance is already running but your docker compose just couldn't exposed it.

Keyboard shortcuts in react

Hi! What's the best way to build/organize a large number of keyboard shortcuts in a react project? i.e. Superhuman/linear # of keyboard shortcuts And would the approach change for NextJS? Thanks!...

Web Sockets on Vercel

Can I host a Web Socket server on vercel? I know you can't directly cause of it's serverless architecture but is there a work around? and if not what are the alternatives just for context I'll be using that web socket server as a signaling server to send data between 2 peers...
Solution:
Hi @.Boody You can't deploy websocket server to vercel and you wouldn't want to, based on how their pricing works. If your two peers are Servers with a public facing IP/Domain, you probably could switch to webhooks. Or if it is just one pair of peers and you're ok with not having realtime data, a pull/poll method might also a cheaper option than the following: Otherwise, have a look at Pusher.com, Ably.com, soketi.app, ParyKit. The first two provide ws as a service, the last two give a kickstart to host the ws yourself....

Do you know any way to extract a DOM-Element from a website and according style definitions/classes?

I am trying to extract an component (an password import form from auth0) from a website and I also want to extract relevant style definitions. Is there any way to do that easily? For context: I am trying to create a passwort-repeat input for auth0 using so-called partials. Partials are snippets of code you can insert in their auth-form. The password-repeat input should obviously have the same styles as the password input form but i cannot just copy the classnames because the classnames update on every update from auth0 so its functionality would be time-restricted cause it is only a matter of time when auth0 is gonna roll out another update and my class declarations are irrelevant. ...

Weird timestamp behaviour or i don't understand something..

Hi! Can you help me with an issue?
We have a countdown on this page: https://dashboard.babywhale.meme/, counting down to January 23, 17:00 UTC.
The problem is with different time zones: the time difference varies between them.
How can I implement this properly? ...

onUploadComplete and onUploadErorr callback not working

its a react + node project ``` export const uploadRouter = { imageUploader: f( {...

Typesafe: Is there any better way to write this code?

I always try to get better at coding and a challenge I recently came across is this one: I receive some values from database, give that object to a function, which calculates some additional values and adds them to the object. I am aware of two ways to do this. The first is using spread operator - which is very handy, but produces (to my understanding) potentially a huge performance impact because every input object gets copied to be spread. ```ts function calculateSums(project: InputProject)...

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