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

UploadThing Error: FetchError

EDIT: I just saw in the Uploadthing chat that other users were experiencing this as well. Hello, ...

should i use a database to store online users

i am building a chat app i am using socket io ,express js i am hesitant whether i should store the current online users in an array or store them in a database i thought of the first option because i don't wanna use alot of space from my database i am using mysql and most free options don't offer much storage these days + everytime a user logs in i would need to make a call to the database , also i am not sure if it's a good idea to store the users in an array what if i have 10k users i...

What AI tooling and workflows, if any, do Theo and/or this discord use?

I'm not generally big on the AI hype, but I've seen more and more developers I know using AI tooling like Cursor or Windsurf. I've used Copilot for two (separate) weeks in the past but ultimately stopped using it cause I found it more distracting than anything. I occassionally use ChatGPT, maybe a couple prompts a week. I'd be interested on hearing what I'm missing out on in y'alls opinion, or just generally what you use/why you like it.

How do Execution Context interact with Asynchronous Execution?

For a while now, I have been trying to wrap my head around the execution context. Originally I didn't think it was going to be such a rabbit hole. My question is how is an execution context that was created from a async function referencing the function that called it? is it just direct referencing the function? If so, what is happening when the referenced function finishes execution? Is it just a dangling reference at that point or is it more so a closure situation? I also didn't know if I should tag this question as noob or deep question, because I know they work when async isn't involved and I even know how they work with the eval function and in Web Workers....
Solution:
It's more of a closure situation. They call it lexical scoping or lexical environment https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures

Question about behavior of COPY in Dockerfile. An AI is gaslighting me, unsure which

In a Dockerfile does A:
COPY --from=deps /app/node_modules/ws ./node_modules/ws
COPY --from=deps /app/node_modules/ws ./node_modules/ws
produces the same behavior as this B:
COPY --from=deps /app/node_modules/ws ./node_modules/
COPY --from=deps /app/node_modules/ws ./node_modules/
...

Http cookies in next

Hi everyone! I'm trying to create a server-side component in Next.js that makes an API request and passes the data to child components. However, I'm running into an issue: The endpoint I'm making the request to is protected and requires authentication via HTTP-only cookies. When I make the request server-side, I get a 422 status code with an error saying there's no cookie. ...

GPT PLUS API KEY‼

Anyone with gpt plus api key please reply it's kinda urgent help‼️

Npm package template

Hi all, What is a modern template for creating a npm package these days In the past I’ve used tsdx but that isn’t maintained anymore...

Anyone know how a good way to work with json in python?

Looking to run a job daily off my windows that does a ton of network requests and processes data from it, and I already have a job setup with python so I was looking to do it again. If you know any libraries that makes this less of a pain in the ass, or know a better way to do this (was previously doing it on site load in js and let's just say it isn't fast https://threehoolagins.github.io/lol-team-jerseys) with the windows task scheduler? Or with a very easy to setup task scheduler

t3.chat Captcha ERROR in zen

When I use t3 chat in zen I get this error but not in chrome (it happens when logged in and when not)
Solution:
Malwarebytes block is issue
No description

nextjs and express, dev but no build?

I have a nextjs monorepo with a backend in express with trpc. I'm trying to get the first push up to amplify but I can't get the 'next build' to run property. The dev works fine and everything resolves and runs, but the next build can't figure out the trpc link. Here is my basic repo. Can anyopne tell me why the linking isn't working. It has to be something with the monorepo tsconfig setups. pnpm monorepo, trpc11, nextjs15, and express. I've been stuck for 2 weeks! https://github.com/ds...

How to fire mutation with url query param only once

I have a simple page that has a url like that: /confirm-email?token=<token-value> Now when the user visits that page I want to confirm the email with the token from the url with useMutation. ...

Proper Pagination with filtering and sorting for a datagrid questions after watching latest stream

so I saw that offset and limit have a bunch of quirks and isn't an efficient method of pagination at scale from the last stream, but this left me with a bunch other questions as well. For example you have a datagrid of some sorts that allows for sorting, paginating, and filtering. How would it look from a query params perspective in a rest api when these are complex filters?...

is any way to add item Other Recommendations?

Hi, I am creator of Tianji (https://tianji.msgbyte.com/) , can i add my project into this section? https://create.t3.gg/en/other-recs if cant, is any possible to add it with some requirement which i have not reach?...

Where the hell do you guys buy your domains

Hello brethren, I come onto you with a special request? is ti clodflare, vercel, hostinger or namecheap? what is "best"?...

Problem with trying to add more Scopes

Hi I am trying to write a website where I want to use the DiscordProvider for my login and many other things. But now I keep getting the same config error as soon as I insert the following code in my server/auth/config.ts. ```ts DiscordProvider({...

How do i fix CORS Policy block?

I'm currently making some link shortener website using php, and for some reason the client doesnt work on other website, like i want to make an api to shorten link and when i build a quick demo page to test the api, it just refuse to work even though Postman work. Please help me.
No description

Hello, could you provide me good service url for this

1. GPU providing service 2. S3 bucket service 3. Video upscale AI service (but should be possible to use API)...

Create a TS function to deep call .toString() on all Date objects without type casting?

Hi, I was working on a function which should transform any instance of a specific object (for demo lets use the Date object) to a string. I wanted its signature to be like <T>(input: T) => Stringified<T> where Stringified<T> is the exact same type except the Date instaces are now string. ```ts const withDate = {...

What are some Free Database Providers that don't go to sleep on inactivity?

What are some FREE (not cheap) tier plans from database providers you know, that don't go to sleep or scale to zero on inactivity, and don't have limited runtime hours? Need it for small tools or projects, for myself or work. Don't need much. Probably need less than 1gb, maybe even less than 500mb. But, need 24/7 runtime without it going to sleep when not in use, like Supabase does....
Solution:
I think Xata doesn't sleep, but I'm not sure