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 400 Error

[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (uploadthing-prod-sea1.s3.us-west-2.amazonaws.com, line 0) Somehow my files doesnt upload anymore and are stuck in "Uploading State"... I didnt change anything from today morning to now and appaerenlty no user can upload any files anymore? Please help me, how can this happen??...

How to use credential login

I know there are some models from nextauth but the user model does not has like a password field. Should i just add that or is there another way? Best regards...

New Zod schema based on an existing one, with some fields having different validation rules?

Having some schema how I could re-use the schema and access some of its fields and change their validation to make up new schema. ```ts const schema = z.object({ details: z.object({...
Solution:
what happens if you define a new schema with the fields you want to edit and then use merge? https://zod.dev/?id=merge

uploadthing read operations

not so or maybe a noob question, but does uploadthing offer unlimited read operations through its API, or is there a limit? If so, what is the limit?

What kind of IT role is most likely to get you hired first:

Some kind of IT Support Technician or a Junior Software Developer? Let's say you're familiar with A+/Network+ study guide material, and have a intermediate understanding of the languages (C++, Python, Java, C#)... Given the job market in September of 2024, which is easier to get for a recent grad of InfoSec or Computer Science with 5 years of experience in Retail/Material Handling? My buddy over in the IRS as an enterprise architect believes it's software developer. What do you think, Theo's Typesafe Cult??...

Dropzone Button

Is it possible to disable the onClick functionality of the button inside of the UploadDropzone? I want to prevent the button being clicked so that I can control the callback of triggering the upload process in a different dependency. I've looked in the documentation and could not find anything about it. It seems the only way to go about this is to wrap the dropzone functionality and design it in the way I want....

How do I cancel an incomplete file upload process?

Does anyone know how to stop the processing if the upload action was triggered but the file upload process isn't complete yet (and I don't have the file ID to delete it)?

How to get accessToken from discord authentication?

I've upload what I have tried but it doesn't quite work.

Proper technology stack for ecommerce

Hi guys, Trying to figure out what framework to use for an ecommerc application that will need to scale well. I am currently between next.js and remix. What is the problem?...

Upload thing use case questions

Hi guys I had two questions about upload thing. 1. Can I use it a on a react frontend not using next js? I wan't to upload from the frontend - how presigned urls work for s3 2. How does uploadthing deal with large files? What is the largest file I can upload? how are file size limits set? ...

Does anyone have an example repo?

So I read this article, and the data-access-layer section seems pretty interesting: https://nextjs.org/blog/security-nextjs-server-components-actions#data-access-layer I still can't really wrap my head around it, so I was wondering if anyone had an example project, where I could see some more typical use-cases with this data handling model....

Not having updated cookies from middleware.ts until a page fully renders

Hi all, I'm having an issue with my middleware function, which handles refreshing auth tokens stored in cookies. here is the issue, if there access token has and have an refresh token it will request a new set of tokens...

Made a web app, now I want to turn it into a mobile app

I created and launched a web app. TypeScript, Next.js, Vercel, MongoDB. I want to create native mobile apps for it as well (even though the responsive experience is ok on phones). What is the current recommendation for React Native tech stack? Is Expo still the way to go? I'll essentially be starting as a beginner as far as mobile development goes but I want to try. I want to integrate it into the same db/backend as the web app....
Solution:
Yes, expo is the way to go. We have a template repo that has a Nextjs app and a React Native app in a monorepo with a shared api - https://github.com/t3-oss/create-t3-turbo

Question about using T3 Stack in a DB Query-heavy app

Hey everyone! I’m currently exploring the T3 stack and loving the workflow so far. I’ve primarily worked with Angular and Django for years, where I built a large-scale web app. The app is very SQL query-heavy, as it manages a lot of data—one of the major tables in the DB has about 1 million rows with loads of relations. In Django, I ran into a lot of bottlenecks but eventually got it to perform well enough. Now, I’m considering migrating the app to the T3 stack because I’ve really fallen for the developer experience (I love React!). I’m also doing this partly for fun and learning, even though it’s a big step for a production app (again, don’t judge 😅— it's my solo dev learning process)....

data optimization

Hello everyone, I'm really stuck and need help. I have a PostgreSQL database running with Docker on my VPS server. I was given a CSV file with over 60,000 rows, and my Next.js application is hosted on the same VPS. On my local machine, it works fine with no delay or timeout. However, after deploying, I noticed it was extremely slow. Most times, the requests time out because I'm trying to fetch all the data to create a dashboard. I think the problem might be related to how I'm making the database calls. I would be really grateful if someone could hop on a call or review my code to see what I can change to improve performance. here is the github link https://github.com/alidauda/Analysis-...

Failing to connect to local d1 db with drizzle

So i am having trouble setting up drizzle with cloudflare d1 and i'm not sure why i am running into issues:. When running bun drizzle-kit migrate i receive the following error: ```bash $ bun db:migrate...

Uploading a preview image of a PDF along with the PDF

The user uploads a PDF file, but I also want to grab (and upload) a preview image of the first page of the PDF. What's the best way of accomplishing this? I've seen a couple pretty hacky decade-old ways of doing this, but I'd love some pointers or recommendations of where to look...

Next 14 (app/router) is extremely slow (on dev) + tRPC + Turbopack

This is an issue we've been having in our App for a long time, and after months of suffering, I finally have the answers and the solutions, so I will provide bullet points here for anyone else who suffers with it now or in the future. Problem: Developing with Next 14 has became extremely slow when mixing up with tRPC. ...

react native windows - Is someone using react to build windows native apps?

Is someone using react to build windows native apps with something like "react-native-windows"? Is it good?

typescript object util library

Is there any good typescript library for object manipulation? Ie changing values of deeply nested objects, getting values via dot notation keys. Setting via dot notation etc