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

whats the url of deployed socket.io server

i have a nodejs socket.io server idk the url to my websocket server in nodejs I do const io = new Server(1001, { cors: { origin: ["https://deployedclient.vercel.app", "http://localhost:3000"] } }) and client knows that the websocket is hosted on localhost:1001 ...

How does the Beta system of CT3A works?

I don't understand it. How can I use and find betas?

Prisma, self relation onDelete, onUpdate behavior

I have a prisma model: ``` model Comment { ... children Comment[] @relation("replies")...

net::ERR_NAME_NOT_RESOLVED Drizzle ORM

Hi, I have the following server component: ``` import { db } from "app/lib/db/index"; import { subjects } from "app/lib/db/schema" ...

NextJS 405 response (Exceeding response size limit)

Hi. I have a quick question on the best way to move forward for one of my api routes. I'm making a post request to one of my api routes ./feed which then makes several post requests and returns some data. Occasionally this data is very large. As a result sometimes nextjs throws a 405 error at me and doesnt let the data get fetched properly. I saw that on https://nextjs.org/docs/messages/api-routes-response-size-limit, the advice was to turn off response Limit, however I was wondering if that would only affect that single route, or my entire project. Will my project still stay serverless?...

Uploadthing onUploadComplete file size is undefined

Hey all, the property file on the parameter of onUploadComplete callback should have a size property that is not undefined based on its type UploadedFile, but this is not the case. I've tried both on local and in production on vercel and I always get file.size as undefined. Is there something wrong in the implementation or is the type UploadedFile wrong and the file size is not actually added to the object?

How to get rid of CORS errors

I keep getting cors error when I tried to connect my front and back end applications. It works on localhost but when I deployed both of them, it just fails. I did some googling and they said I should add this to my app.js ``` const corsConfig = { origin: [...

Website Suggestion

what kinda website can I build for my personal portfolio that can also generate huge amount of traffic and ads based revenue? Does page routing of Next JS is better option for right now?✌️ #websitesuggestion...

socket.io + tRPC

I have a socket.io backend with nodejs/express, and a frontend with react. I have a list of posts that users can delete. Everytime a user deletes a post, it will send a websocket broadcast to all the other users so it will delete that post from everyone else's screen as well. My question is how should I implement this? Here is a few options I've considered:...

Retrieving folder directory

I am creating forms and and I want one input to be such that, the user is made to select a folder on the their computer and after I have a function to return the path of that folder destination.

Truncating link

I want the behavior of the link you see at the top. For the link to truncate I had to set it to block but this means that it fills its container, so on hover works on spots it shouldnt and the border is not right. Inline-block did not fix because truncation stopped working, any ideas?

Next auth in external services

Who knows how can we use NextAuth in external services? I want to manage authentication with NextAuth and run an authentication middleware in other microservices that are written in GO. Is it trivial?...

Recommendations for Realtime Service (Pusher, Supabase Realtime etc..)?

Hey, im building a web app (t3 stack, trpc) with realtime capabilities. So im currently looking for a realtime framework/service that i can use. My webapp will be deployed on vercel, so custom WebSockets will not not work as vercel is not able to maintain a connection. I've been looking into Pusher and Supabase Realtime, but cant really decide. It should require channels, broadcasting and auth integration. ...

cant register a new user with next auth prisma

hi all, im trying to register a new user but it seems next auth and prisma reject it, but when i logged in using existing user it work just fine. any idea how? (im using planetscale)

PlanetScale vs Supabase

Hi, i am building a blog SaaS, that let's users build their own blogs, but i can't decide whether to supabase or planetscale, supabase charges via bandwidth, and planet is based on number of requests, if got a lot of users, it would result in more blogs and more blog posts, that i cant control the length, i can limit but shouldn't ( who would limit the number of words their users posta can have? ), supabase bill would start to add up, everytime someone visited the blog poston the web, meanwhile...

Migrating next app from [client -> ts-query + clerk -> supabase] to planetscale

Hi all, I'm migrating an app which used supabase's RLS with clerk's JWT to directly connect clients to a database. I now would like to use planetscale but getting stun locked with the different options I have. Ideally I want to keep data management on the client side (with tanstack query) so would it be best to just create a bunch of Route Handlers? There are about 9 queries and mutations. ...

Setting up GitLab authentication, getting "Argument `user` is missing." when logging in

Hi, I've just set up a new T3 project and I've replaced the default Discord authentication provider with the GitLab one. The authentication with GitLab itself works like expected, but after being redirected back to T3 I get a generic error message in the frontend, and in the console I get Argument 'user' is missing. . In the DB (sqlite), a matching User was created, but the Account table remains empty.

Earning tips

I'm a intermediate full stack web developer 😃, and i want to create a own production website and earn money with it using Google ads, So that i can get the experience of how to manage/handle a website with traffic, so what is the best Website topic for this?? Anyone have any suggestions?? Also I'm 18 and i want some side income because im studying in 12th so if you guys have some website ideas please share with me ❤️

Problems with Turborepo + Prisma Data Proxy / Edge Client

I'm not 100% sure if this is a Turborepo problem or not but my guess is that it is. I have a Turborepo-based (pnpm too if that matters) monorepo setup for a tRPC + Next.js + Prisma project. I am using @prisma/client/edge (I've tried to replicate this issue without the data proxy, but it doesn't work using prisma in my next middleware). Error message in server console: ``` prisma:warn Attempt 1/3 failed for querying: Cannot fetch data from service:...