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

All of my tRPC requests returns 404 using create-t3-app.

Hey, guys! As the title says, I'm having a 404 for all my requests. It's my first time using create-t3-app and tRPC, so I bet it's a stupid fucking mistake -- but I'll allow myself since this is the first time I use this thing. I attached the code to the message. Any tips?...

Tiptap Rich Text Editor data validation (alternatives welcome)

Hi. I'm using TipTap to provide a rich text editor for my app. Has anyone ever validated the data going into / out of tiptap? I'm not sure how to write a zod parser for it or if theres a more reasonable way to check the data.

NextAuth login with Youtube scopes

I've been trying to use nextauth to have the user consent to some scopes for the youtube Data API v3. Everything works fine but Google returns error. ``` GoogleProvider({ clientId: env.GOOGLE_CLIENT_ID,...

Hosting shop on vercel

Hey guys, I have a quick question. My girlfriend wants a website where she can sell her art pieces and I want to make a web for her. Is it possible to host it on vercel?

How to type object like this as props

Heyy I play a little with trpc and optimistic updates and I wonder how can I type object like this when I pass it as props. ```js const addTodo = api.todos.createTodo.useMutation({ async onMutate(newTodo) { // Cancel outgoing fetches (so they don't overwrite our optimistic update)...

Does Prisma has Multi-tenant feature? 👀

If you could suggest any alternative solution that will be helpful too!

Vercel Timeouts 😶🌫 What can I do if I need longer server functions?

I have some tRPC mutations that take over 10 seconds and closer to 1 minute to complete. Currently they are getting timed out by Vercel. I can see that I can buy a Team plan but that isn't favorable. What are your recommendations? How do you deal with this?...

Best ways to render a React component conditionally with Next (based on build time conditions)

Hey guys, does someone can help find the best way to render a component based on a build time condition (like process.env.NODE_ENV), and will this impact the runtime ? A try :...

NextAuth with a Rest API

So I have 3 Servers: - API (should handle login with nextauth) - Admin - Customer ...

Getting issues with navigation added to next13 layout

So I am getting this error when I try to run my new nextjs 13 app. You'll notice that the nav bar appears to be rendering at the bottom instead of at the top like I would expect. I have layout.tsx and page.tsx, which I assume is acting as my index.tsx for a new next13 app....

How to use react-query with the create-t3-app starter (non-TRPC call) ?

Hey ! I wanted to know if someone know how to use react-query with the create-t3-app starter. The starter seems to use react-query but there is no QueryClientProvider in the _app.tsx.

Is not providing deps array for useEffect ok?

in attached image you can see I have used // eslint-disable-next-line react-hooks/exhaustive-deps to disable deps array eslint annoying warning. I don't want to provide a deps array because it will blow my code up is there any way of doing this without disabling eslint rule...

undefined session in _app.tsx file

I want to get the session in the app file but undefined always appears, however the hooks work and return the session

| undefined on tRPC procedures

This is a pretty noob question about typescript but a lot of the tRPC return types union a undefined type. Is there a better way of dealing with this linting error besides casting it to the type or giving it a conditional back up like ```...

Error: Cannot find module '@tailwindcss/typography'

How can I resolve this error? I've updated tailwind.config.cjs to require it, it throws no errors but when I save a file this error is shown in the output tab of vscode....

App Dir + tRPC + Edge

Anyone have an example repo combining these three? Basically looking for emojer but in a public repo.

Unknown Variables

Hello, can anyone say what these two variables are and what I should paste in there for them?

How to structure pages and components for a simple web app using t3 stack?

I am new to front-end development and I am using the t3 stack to create a simple web app for our customers to view their data. The homepage of the app consists of a login screen and once logged in, the user is taken to their dashboard. Currently, the dashboard has two pages: "My Lines" and "Billing". My question is: how should I structure the pages and components directories? I was thinking of creating a dashboard page with a header and a sidebar, which will render the other pages for the user. Specifically, my folder structure would look like this: ```markdown...

API documentation tools?

I am looking for good tools to document an API. The result should be something like the t3 docs or tailwind

Astro extension doesn't use `prettier-plugin-tailwindcss` when formatting

Ran into a weird issue when setting up automatic Tailwind class sorting inside a pnpm-based Astro project. I tried to resolve it, but I was unable to find a solution myself; could anyone point me in the right direction, please 🥺 I have prettier and prettier-plugin-tailwindcss installed as devDependencies: ```json {...