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

Session_ID in JWT

In my app I use JWT so I can verify that the token has not been tampered with, however the only information I store in it is the user's session_id. Nothing else, no user data, just the session id. Should I be just using a cookie or something similar? Thankyou!...

How do I get and save the access token from discord oauth create-t3-app

Hi, I have been searching around for a solution to this for 3 hours now, I am probably retarded. I am trying to get all the guilds from discord, but I need the access token for authorization using next auth in my t3-app. When adding the token to the session call back it errors out. I tried to use the jwt call back along with the session call back to see if thats what was needed with no luck. Link to solutions that I have tried:...

T3 is severless, yet uses prisma— how...?

Still confused about how database connections work from short-lived workers. Is https://prisma.io/docs/data-platform/data-proxy the only way? Say you have a t3 fullstack vercel app and a railway DB. You don't just plug the DB url into prisma client, do you?...

Using a CMS with the t3 stack?

Say I'm building an e-commerce site and I need to give the client the ability to add/delete/edit products, should I use a CMS or just write this on my own? I looked into Sanity, but it looks like everything defined there is fetched via a REST api so I basically lose all the meaning of an end-to-end typesafety and type completions

Using copilot to refactor entire files?

Say you have a function called findBoobies() beneath it I can for example write: // rewrite findBoobies to use .filter() function findBoobies2 ......

should i store otp in session or database?

I regularly use database though During the nextauth signing process i check if the user has a otp first on the db then check if it has expired if expired send new one and delete old otp Else send the old otp that hasn't expired...

using tailwindui notification components

how to use the tailwindui notification to be use other components(passing message and show boolean)

Using T3 + Fastify + Bun ?

Hey, like the title says, is anyone using the T3 stack + bun + fastify? I'm curious to find out what the current 'bleeding edge' is which is how I got here and it seems like this is the stack....

How to fix error about getting id params in router when ssr is true

I want to make this page SSR for better SEO so currently i use like this ``` export const getServerSideProps: GetServerSideProps = async context => { return { props: {...

Optimistic Updates with TRPC (react-query)?

I am not sure how I would do optimistic updates with trpc? Is this "built-in" or do I have to use react-query's useQuery hook? So far, I am trying it like so, but it's not working: ```js...

abort signal

Where/which file do i put the line abortOnUnmount: true in the t3 stack? https://trpc.io/docs/aborting-procedures#trpcreact-query...

TRPC QueryClient access in ct3a?

I want to disable windows focus refetching globally like here: https://tanstack.com/query/v4/docs/guides/window-focus-refetching How do I access the queryclient in the scaffolded trpc in ct3a?...

getting this error in nextAuth

even after providing the clientId and secrets. what's going on here?

Examples of projects with custom and well designed Tailwind theme?

I am looking for some good examples to learn how to structure a design system on my T3 app with Tailwind. A designer has built a full design system (in Figma) that I need to translate into my NextJS app, and I was wondering if anyone has examples of repos that I can follow along with. I specifically want to have Tailwind Intellisense autocomplete a lot of the custom classes and variants I will be styling my components with. Maybe some larger companies are using Tailwind in there open source apps? I'm looking for more than just a boilerplate set up. Some app that has a fully built, custom UI is ideal. Any help would be appreciated. Thanks!...

Framer Motion useInView()

const introContainerRef = useRef<HTMLDivElement>(null);
const introContainerRef = useRef<HTMLDivElement>(null);
```const introContainerInView = useInView(introContainerRef, { margin: "100px 0px 0px 0px", });...

Properly type `App` in Next

Hey All, I am having a problem typing the App page correctly, I am using react-query and the appWithTranslation the issue I am having is properly typing the sessionKey and dehydatedState I have tried these, any idea on how to properly type, without doing @ts-ignore

Stack choice

Hello, I am currently using Next.js, React, Typescript and Axios for my frontend stack and Nest.js, Typescript, Swagger (OpenAPI) and Prisma for backend stack. This way, I can generate the types based on the manual made classes (DTO etc.) that Swagger recognises. However, it is a bit of a mess to generate the types....

Hot reloading in Remix

Has anyone come across a good guide for adding hot reloading to a remix site? (Must be idiot proof)

Smooth Scrolling in Next

Hey, does anyone know a good way or a good library to implement smooth scrolling in React/Next. Talking about the scrolling that if you stop scrolling it continues a bit further down and doesnt stop directly...