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

dynamic unit testing

Hello. Well i checked the Unit, E2E, Integration testing and where/what/when they should be used for. The thing that i can't understand is in the Unit testing when i write a test basically i'll hard code every case and that's basically not efficient for me. I may end up with a function that has +50 test cases and idk how to make the process dynamic....

Why does vercel strip out authorization headers?

Just noticed that vercel in production places my request's authorization headers under x-vercel-sc-headers. Googling for this is a bit overwhelming tbh, lots of different articles but no specific mention of that specific header key. Was wondering if someone could point me in the right direction to fix this quickly? Thanks!

Migrating from Firebase to Supabase

Hey everyone, Disclaimer: I'm new to Theo's Typesafe Cult For the last couple of months I've been creating a web app using Nextjs (with page routing for now) , Typescript, Tailwind CSS and Firebase (hosting, auth, firestore, storage)....

Tips for incremental migration from jquery to react?

I have a medium-large web app that was written in php and jquery. It's a nightmare and needs to be overhauled. Ideally rather than have two projects going simultaneously, I was hoping to stand up a react front end that can incrementally migrate to, and implement new features in. Any tips or ideas from the masters here?...

Need Help setting up UploadThing With React

I currently have my frontend with react and backend with express, I look throught the examples but still not able to make it work yet, can anyone provide me with a simple example using uploadthing in react running with a server

Pretty Basic (I think) React / Tailwind / Next question

Hi everyone, I have tailwind UI and I'm trying to implement a theming system similar to : https://www.skies.dev/tailwind-themes - I'm sure something I'm missing is basic react functionality but I've not been able to find the right answer and I'm sorry to just brain dump here but I've kind of reached an impasse (and don't have a lot of friends familiar enough with React to help...) - His basic tutorial works great, however I'm trying to expand on that. - The Basics, I'm using React, Next.JS (App Directory), Tailwind UI...

Problem when using postgis .

I am trying to use geometry datatype in schema.prisma . But it shows error unsupported datatype geometry . Then i saw one solution like this pickup_geom Unsupported("geometry(Point, 4326)")? .. It looks fine until i try to insert a row with prisma create function...

fetch failed - error on npm start on production

I rebuild my next.js app with the npm run build command and I started it with npm start now I get this error: ``` << query #1 post.hello {...

Best approach to limit free users

I am building an app with the T3 stack, so I have all the bells and whistles that it provides, including NextAuth I am getting ready to open the application for beta users, but I would like to limit their actions. I've already implemented a role that I leverage to display admin-only components on the UI. The thing is that I would like to limit the amount of information the user is able to save into the database. I was checking out shadcn Taxonomy demo project (https://github.com/shadcn-ui/taxonomy/blob/main/app/api/posts/route.ts) and it seems to me that I should add a check for every route that I want to limit the user....

trpc context with clerk

hello guys im very new on clerk, and was wondering why the user return on trpc middleware still not return 401 any idea?

How to implement Domain Driven Design using Prisma?

Am I stuck with creating objects like this?
No description

App Router/RSC Experience

Whats y'all's experience with RSC's and App Router recently (plz also not the PCs you are using during development)

Storing and getting cookie in api

Anyone successfully created a login api and stored cookies using prisma and then created an API to fetch the cookie?

.env - adding global environment variable files

the default T3 project comes with an .env and .env.example file, but where is it defined what is picked and what is left? I would like to have a .development.env and a .test.env and tell my ".env-injector" what to pick, depending on the NODE_ENV. For my other projects, I am using dotenv, where I can configure what file should be picked depending on the NODE_ENV but how do you define and configure that in a T3 project?...

clerk user undefined

hi guys, im trying out clerk recently, and was wondering why the user return from the middleware return empty, thanks
No description

next 13 cookies

``` "use server"; import { UsersApi } from "../crud/user.api"; import apiFetch from "@/utils/api/shared/apiFetch";...
No description

zod form

https://github.com/juliusmarminge/t3-complete/blob/main/src/utils/zod-form.ts Here is hook made by julius. With new zod I get error: ```ts...
No description

Where do you guys put the Back-End logic?

More specifically, how do you organise it? It is just a bunch of functions inside functions.

How can I learn UI/UX?

Look at the projects of this guy => https://rishimohan.me/ And this other project => https://logsnag.com/ Both are absolute chads....