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

NODE_ENV exposed to the client? Is that okay?

I'm getting ready to test a live app using the t3 stack but basically I want my api routes to switch between localhost for dev and the actual url for live testing. the env.mjs puts the NODE_ENV as a server variable and I'm not sure why that is the case below is the code that I'm referring to...

How to create custom upload component to use with UploadThing?

UploadThing custom component is designed to be an entire section of a form. However, I'm working in a project, that involves multiple images inputs (field array), so I need a different design, something like a regular input size type of a button. Is there a way to achieve this? If there isn't, should I consider using the existing UploadThing component hidden (absolute and opacity-0) as an intermediary between my displayed component I've created, and the server? Or am I tripping?...

Get PDF with UploadThing

Hi, I'm using upload thing to store some pdfs and there is a point in my application where i want to get the pdf object to store it in my file system. I'm using this to get the pdf (const oneUrl = await utapi.getFileUrls()) but this only gives me the url and the key. Is there a way i can get the file without needing to fetch the file from the url?...

socket.io

i checked socket.io website and they said its not good for mobile messaging app or for webSocket implementation, so what is the alternative?
No description

Question about learning react

For school ive been working with the basics of react, i want to keep learning and get better. What is a good step to take? Id like to learn how to make react/nextjs applications with backend for example. any suggestions where i can start "looking"?

Access clerkId inside upload thing callback

If the uploadthing webhook callback runs on the server wouldn't it make sense that i could still use my clerk auth hooks to get the user data? My file router looks something like this: ```typescript...

Football live Stream Package

Which football live stream package should I use for nodejs and is it safe to use?

Use Enum Values from backend in the Frontend

I'm using this enum in my backend: ``` export const VideoYouthProtectionEnum = { Zero: 'zero', Six: 'six',...

How can I useQuery when I click a button

I have this privateProcedure on the backend. I want to call it when I hit a button in my frontend: ```ts checkDate: protectedProcedure .input(z.object({ date: z.date() })) .query(({ input, ctx }) => { return {...

Need help with solving nextjs production build error

I am using t3 stack for my project. Currently we have added in few components and pages. And we have done deployment using AWS amplify. Everything is working fine for the most but we noticed one error. On deployed site, whenever we navigate the page refreshes, I am not sure why that happens. I was looking around in code and did not find any issues. I checked our deployed application and I was able to find an error that keeps coming up whenever we navigate, I am attaching the screenshot for it. Hope it can we be solved fast. Thank you in advance for your help....
No description

type errors even after disabling

``json 22:32 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 36:9 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 43:11 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 43:23 Error: Unsafe member access .predicted_class on an any` value. @typescript-eslint/no-unsafe-member-access...

Cron jobs fetching gmail emails every 10 minutes

Hey everyone. I was wondering if it was possible to setup a cron job to fetch emails using the gmail api every 10 minutes? Does anyone have any experiences with it, and if so, what would be the best way to approach something like this? The reason that I’m asking, is because I’m working on making an email client, and I figured prefetching emails like this would initially make it way faster!...

vercel webhook for hobby plan

Is there such thing ? I cannot find it in the menu? what i'm trying to do is to perform request upon successful deployment production branch...

Getting "drawer.css.map" when accessing getServerSideProps context

This is so dumb. I'm using Next.js 13, and a very simple getServerSideProps function, which should get the user id from the page route. The file is /pages/admin/[user].tsx, and I'm accessing the param using ctx.params.user, but even when the route is, for example, <host>/admin/id1234, the ctx.params.user value is "drawer.css.map". Any ideas why this is happening?...

embed parts from websites on a whiteboard

anyone has an idea or guidance on how to embed live parts of websites on a whiteboard (by taking a screenshot of the part you want) easels on the arc browser have this feature https://www.youtube.com/watch?v=ukquBSOpmTk&ab_channel=TheBrowserCompany...

Do Next13 and therefore CT3A use turbopack and SWC by default?

https://nextjs.org/ advertises Turbopack and SWC on the front page. But I thought Next uses webpack since turbopack is still in beta?

React Table cell and headers function must be marked with "use server"???

The header and cell functions is no longer available in react-table until we specifically declare the "use server"??? I'm not even using the "use server " in my app
No description

Building an in-app chat

I am building a task management tool where different companies can collaborate. In order to enable conversations, I am creating a chat functionality. This includes - chats with multiple people, @mentions in messages to entities (like people or files) and being able to keep track of an unread messages count per user. Has anyone worked on something similar? Not quite sure where to start.....

type errors i wanna change to warn

``json 22:32 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 36:9 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 43:11 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment 43:23 Error: Unsafe member access .predicted_class on an any` value. @typescript-eslint/no-unsafe-member-access...

Next error

Im doing a project with Next 13.4.5 and out of nowhere I started having this bug. I really dont know where its the problem since it started when I building interfaces and not using links.
No description