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

Do i use server components , actions over express JS for my App

i am building a chat app that will use socket io , mySQL database , next js , jwt for authentication as well , i was planning to use express js for the backend for my websocket server logic i was following the next js 14 tutorial they used server actions to submit form data for the new users and the rest of the App to their hosted postgre sql database is there any disadvantages for using server action and components for handling database logic over express js endpoints before i rea...

Anyone familiar with useOptimistic hook to explain how it works???

Hey everyone, im currently using the t3 stack with Next.js app router and have trying to get the useOptimistic hook alongside a server action working So far I have managed to get this all working correctly with one caveat: I have to put "revalidatePath("<url here>")" as the very last line in my server action in order for the hook to work. If I don't do this, the UI flashes for a brief moment and resets back to the "old state" (in my case the button flashes from filled back to unfilled)...

Is it a good idea to wrap a website in an Electron app window?

I've been trying to get a working beta of my moderation platform in an Electron app for a while now. Lately, I've been having issues regarding getting authentication to work within an Electron app using anywhere from React/Vite to Next or even Vue/Vite. I've done a ton of searches on Stack Overflow and Google and even looked at some tutorials on Auth0 (Okta) and on YouTube to try and gain a more deeper understanding of implementing authentication into Electron using a SPA framework. ...

Having difficulty with sequelize association methods.

Hey I am have a problem with the sequelize package. I am try to create an association between the two models 'User' and 'Cart'.
User.hasOne(Cart);
Cart.belongsTo(User);
User.hasOne(Cart);
Cart.belongsTo(User);
...

i think firebase f@@k up again

working on an MVP it 2 am i got a cup of tea and biscuits yes im British now i need to upgrade my Firebase so can use an extension for reverse geolocation for map makers no problem give them me card numbers to verify via my bank all good lovely jubbly so I thought then I got 2 emails 1 Google Cloud Platform suspended...
No description

Theo's app to not leak secrets on stream

I remember he showing it on stream but I forgot the name.

Change page

Hi, I'm a beginner and I don't know why page2 isn't found when I use <Link href={"/page2"} can somebody help me understand please?...
No description

chatgpt assistant API with dynamic data?

I'd like to incorporate chatgpt inside of my website. my website dynamically pulls new data every day, and is "forward looking" about 7 days or so. the data is coming from a database. i'm curious, has anyone tried using assistants api with dynamic proprietary data? my thought is use a script that auto-dumps the data into json format (one of the readable extensions assistants can use) daily, then on the site back end use vector_store expiration policies at 1 day. the other option is, I hard-reboot the back end at like 3AM each today to force-load the new files, and my script just dumps the db as a same file name....

football game need help

-a two person game playing in the same machine . -a penalty shootout game where we can shoot to left right or middle the keyboard keys will be (1,2,3 or a,s,d or any other mapping )
-for both players if the players press the same key which means the key which refers to the same direction then it it a save otherwise its a goal. - i want to create this using opengl and c++. - anyone intrested to team up ❗ ❗ ❗ ❗...

What is your take on the headline of this UI library

As a non-native English speaker, I don't feel good about the headline of the hero section, do have other suggestions for the tagline? https://ui.indie-starter.dev...

Nextjs middleware error while rewrite the route

I am facing an issue with middleware ``` Failed to proxy http://app.localhost:3000/app/login Error: getaddrinfo ENOTFOUND app.localhost at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {...

UploadThing using Cloudflare as a CDN

I noticed that UploadThing was using Cloudflare to deliver uploaded files. Before I entrust UploadThing with anything I'm being paid to produce, I was wondering if you can confirm that UT is using the CloudFlare enterprise plan? Someone will take you up on the "upload and download" as much as you want at some point and I don't want my apps getting knee capped in the process. Thanks!

Small Dynamic in Static Website

I have a website which is fully static. Now in my blog posts which is also static I want to have likes (or number of likes user gave to that article) type of small dynamic thing. But I don't want to give the static website just for this small dynamic thing and don't want to implement the site in React or Nextjs How can I do this? I am thinking of creating a whole different site and adding that small part as iframe to my static site....

Pandacss unknown values

Hey I am looking for some proficient in pandacss. First of all using pandas wasn't my choice. The problem:...

Outbox pattern with mariadb and rabbitmq

Hi all, I am looking to implement an outbox-pattern with MariaDB and RabbitMQ for reliable microservices async communication. (NodeJS+Express) Is there anyone here who implemented it to maybe give me some heads up for unpredictable things that I'll be dealing with?...

I'm using uploadthing version ^6.13.0, @uploadthing/react version ^6.7.0

While uploading image I ran into a RuntimeException that said: Cannot execute an Effect versioned 3.4.5 with a Runtime of version 3.4.2 I guess it is some kind of version mismatch but I can't figure it out, also tried searching the docs...

Using nextauth discord with vercel deployments

New to T3 and nextauth here, and I have a noob question: If I configure discord oauth, discord requires me to register exact URIs for login redirects, but Vercel deployments have dynamic URIs for each branch, so a new branch deployment will never match. I can get any deployment to work by manually adding its URL to the discord app management page, but is there a way to make it work for any vercel branch? If not, do you have a preferred workaround/working style that you think is most effective? M...

Prevent Server Action from getting called if unrelated Search Param changes

const Page = async ({searchParams}: { searchParams: { type: string; }; }) => {...

Creaete T3 No Req or Res in TRPC context

I am trying to integrate clerk with the trpc create context, but the createContext generated by create-3t isn't passing the req or res of the request. What can I do?...

Passing async data to server components

hey guys. I have a basic question - I'm fetching some "slow" data in a server component (at the page level). There are several components on the page that depend on it, so I'm currently awaiting that data, but obviously it means I have to wait before I get anything. ...