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

Video and Audio Hosting

I am building a site with a major part being able to display video and podcast content what is the best place to host them which no to minimum amount...

Next-Auth default middleware redirect to signin page even when logged in.

NextAuth version: 4.18.8 Next version: 13.1.1 I want to make some pages that only logged in users can visit, but next-auth middleware redirect to the signin page even when logged in....

pm2 alternatives?

I use pm2 but i will need to view logs etc But turns out pm2 is paid Any free/open source alternatives out there? ...

MUI + Vercel => different CSS applied

When I use npm run dev to develop my website - my css is applied "as intended" - and I have styled my MUI-components to match my needs. However, when I push it to Vercel, it seems that the custom MUI-classes, gets added last (even though the order in class='' is the same). When rendered on Vercel, MUI-classes are the last classes in the cascade (viewed in Inspector), where as when rendered locally, MUI-classes are soms of the first in the cascade - this getting overwritten. This results in drastic different results on dev and prod....

Cant connect to localhost using t3 stack on windows

I've made a simple t3 app with discord for auth which was working great but randomly decided to stop working. Now every time I run the app and try and login it blocks localhost. I've tried all the recommended things like >changing to wsl2 >flushing the dns >restarting wsl Those seem to work temporarily but then it just goes back to refused localhost. I tried on firefox, edge, and chrome and all have the same issue. On my other laptop that runs ubuntu I've had no problems at all so I am assuming its something to do with WSL. ...

Nested routers

What amount of nested routers is recommended to use. Do we need more than 1 layer aka AppRouter and 1 layer of subrouters (like Controllers)?

create t3 app with pnpm issue

i just pnpm created a t3 app with the 4 pieces and im getting this error - Error: No QueryClient set, use QueryClientProvider to set one (did nothing yet)...

Neat background pattern images

Has anyone got any good resources for background patterns such as the grid used on tailwinds docs? Im mostly looking for subtle, simple, geometric patterns to use at low opacity on flat/subtle gradient background....

TinyMCE in react - generates wrong style syntax

I want to use TinyMCE text editor in react, but the text it generates uses style tags on the generated elements, that is written for html and not JSX. Anyone experienced with it?...

return relation in nested write in prisma

I have two models that looks as such: ```ts model Card { id String @id @default(uuid()) createdAt DateTime @default(now()) title String...

Type Errors when importing AppRouter from npm workspace TRPC server

I'm setting up a mono repo using npm workspaces where I have an api directory which has a trpc directory. When I import the AppRouter from my package, I get cryptic type error I can not understand, BUT when I copy the files directly into my next project, the type error goes away. So I think I'm exporting the correct AppRouter, but typescript is confused for some reason. Any ideas what might be going on?

Issues with 'pnpm install' using t3-turbo-and-clerk

I'm not sure if many people are using the 't3-turbo-and-clerk' template, but I'm having an issue where pnpm has very inconsistent and erroneous package installs. When I first cloned the repo, it was working correctly, but now when I run pnpm install it will install all packages to the root level node_modules. If I use a different version of pnpm it might install node_modules in the apps/packages, but it's an incorrect and incomplete installation. I've been stuck trying all kinds of things for a day now. I delete the pnpm-lock file and do a 'clean' before installing each time, but with no luck. Even pnpm clean only cleans the root level node_modules... I haven't touched pnpm-workspace.yaml or any config files, so I'm leaning on it being a PNPM issue, but I have no clue right now. Anyone have any thoughts? screenshot is an example of the incorrect installion I was talking about... in my apps/nextjs folder, this is what it installed for node_modules....

Iterate over an array and create a new sorted object.

I'm completely brain farting. I have data coming in like ```typescript...

`getServerSideProps` fails silently and returns 404

I’m currently tinkering with something and noticed that when an exception is thrown in getServerSideProps, the page just returns a 404 with nothing logged in either console. Is there a way to make it not fail silently and log the error? (I’ve tried putting it in a try catch block)

createProxyHelpers typing

hello all, in the project setup we get the context options and createContext function, I am wondering how to properly pass properties to be able to use getServerSideProps, I thought I could pass the req, res, but then It complains about missing cookies, is there something I am missing?

Slow cold start times in Vercel with my T3 App API

I'm trying to debug some really bad cold start times with my web app's api. The UI loads up really quickly and I haven't had a problem with it. However, my trpc api sometimes takes a full 10 seconds to return a response. My api performs fairly simple CRUD operations against a cloud firestore backend. I'm not really sure how to debug this. I got the webpack analyzer working and the results are... confusing: ```...

Is there any guide or tips for migrating a Blitzjs app?

Hey there 👋 I have a PWA Blitz.js app that would like to migrate to the t3 stack. I would like to know if someone else has done it before and if they have some tips, here are some random questions that pop my mind: Where should I start? ...

How to use getInitialProps within _app.tsx?

I'm trying to get the current color-scheme which is saved in a cookie into the app page. Is there a simple way to do that? I already tried different solutions, which did not work. Currently I have the following: ```tsx App.getInitialProps = async ({ ctx }: { ctx: GetServerSidePropsContext }) => ({...

Options of Video Chat APIs to use inside my NextJS app

Hey, I'm building an app which I want to include video chat, I don't think its very feasible to build and host my own video chat API (at least for the time being), anyone have any recommendations of Video Chat APIs, I would prefer consistency/reliability over video quality.