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

HTML To .doc

Hey! I've added the below code to extract the html from a TipTap text editor and let the user generate/download a word .doc file. There isn't a whole lot of documentation on this type of code that i can find. Can anyone see any security issues with this or anything i should be aware of before giving users this functionality? const handleDownloadClick = () => { const htmlContent = editor.getHTML(); ...

Mac Terminal App

Hi! I was wondering which Terminal Apps yall use? I know this was asked before, but its been quite a bit since then so opinions may have changed. This is my first question here, Iā€™m sorry if it is too noob-ish. I was also wondering which one Theo uses, because it seems to have autocompletion of some kind....

uploadthing replacing name and adding customId in middleware fails to run

This middleware does not run, despite this being close to what is provided in the documentation for changing file names and adding customIds (https://docs.uploadthing.com/file-routes#middleware). Logging the error provided by useUploadThing()'s onUploadError gives UploadThingError: Failed to run middleware... Caused by: Object { ā€¦ } ```TypeScript .middleware(async ({ req, files }) => { // This code runs on your server before upload...

Is there a Vitest UI equivalent for Jest test suites?

I really like Vitest UI, and I was wondering if there's something like it for Jest tests suites. Pic of Vitest UI:
No description

project idea

Boizzz please suggest some project ideas for a hackathon it can come under any background web3 / ai or anything please help me out here. Or tell me about ur project u have used for a hackathon . Come on šŸ¤žšŸ»...

Using Next.js with Biome instead of ESLint

Hi, I have been trying to migrate from ESLint to Biome but the Biome migration always failed because one of the eslint-config-next dependencies (@rushstack/eslint-patch) crashes when Biome tries to run eslint-config-next during the migration. Has anybody managed to find a workaround to this issue? ...

DB Errors Init on Login for `create-t3-app` w/ Prisma + NextAuth

For me, it was returning this Error from Prisma:
The table `main.Session` does not exist in the current database.
The table `main.Session` does not exist in the current database.
It was not clear if there was any additional Init' Setup, but this is what I found out the hard way....

mysql free deployment platforms

I am working on a personal chat-app project with no intentions for it to be a production app (maybe in the far future not so sure ) I am gonna use mysql with prisma , node js , socket io for the backend. I have researched for platforms to deploy my mysql database however pretty much every platform i came across didn't have a free plan , I have no intention to spend money on this project it's only for my portfolio here are the platforms i have seen : plantscale , render , railway ,...

How to Hook UploadThing to a Different Route Instead of /api/uploadthing?

Hey everyone, Is there any way to configure UploadThing to use a custom route instead of /api/uploadthing? I have a separate backend running behind a reverse proxy at example.com/api, so I can't use the /api route for UploadThing. Any help or suggestions would be appreciated!...

PlanetScale vs. AWS

Creating a full mobile + web app with projected 60k mau's? Ease of integration with stuff like react native and next is definitely a factor but nothing big. just looking for price - performance opinions

Handling Dates with client and server and database

Hello, so i am trying to create an appointment scheduling website and I am having trouble using dates between the client and the server. When I first implemented my endpoints, I made sure to convert any date I pass from the client to the server using a zod schema that converts said date to UTC for me. Then I deal with my app logic (using date-fns to handle dates) and save the date or make any db queries using this UTC date. This was working completely fine when working locally....

Single react query doesn't seem to hit then endpoint in production (Vercel)

Hi there, Thought i'd ask here as i'm at a loss I have a dashboard page with 2 queries:...

Localhost:3000 says: Failed to run middleware with uploadthing

The only way I could resolve my errors in the this file was the following: ``` import { clerkMiddleware } from '@clerk/nextjs/server'; import { NextResponse } from 'next/server'; ...

Need help picking a front end framework.

I am making a project which will have primarly many dashboards. I need help picking a framework which will work nicely with Hono which will act as my backend. Some wants are - File Based Routing...

hot reload not working on fresh install of create-t3-app

When I change some files, it seems to work, such as .env or next.config.js, but changing any react .tsx file doesn't reflect until I run npm run dev again. I am running 'npm run dev' in wsl and GETing localhost from windows, so that might be messing with file change detection, but as I said detecting the change of some files does work. No errors in the console, and I didn't change next.config.js from the default. Any ideas?...

CSS Variables or Context

We are currently using SCSS. If we are doing theming (light, dark, white labeling) of our product, should we be using React Context or CSS variables? Additionally: should our CSS variables be var(--primary-blue-500) and referencing a color value directly or should we be doing something liike var(--combobox-border-color) and reference the values all per component CSS property?...

ReactHookForm propagating nested forms despite e.stopPropagation

So I have a RHF inside a RHF, I know this isn't best practice, but this SO thread suggests it's possible: https://github.com/react-hook-form/react-hook-form/issues/1005#issuecomment-626050339 Code looks like: ```ts...

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...