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

is nest js the laravel of the javascript land?

I really love the laravel approach like all the batteries to implement nearly anything you want out of the box From queues to auth, etc, I am planning to rewrite a current project based on t3 stack. i really loved it, but things are getting too complex, so i want to break to backend and frontend separation type of thing ...

NEXT edge api routes: sending a json response

I'm currently migrating my app to work with edge worked fine so far until i tried to return json to the frontend, then the frontend was complaining with SyntaxError: Unexpected end of JSON input I just followed the examples from nextjs guide (pages router in particular), but it seems this isn't the right way to send json to the frontend, how should i do it? ...

What kind of headless CMS would you chose in 2023?

Hey out there 🙂 I am currently building a website, which needs some sort of Backend for users, in which they can create Posts or other custom content types, which then should be displayed on the page. Frontend/Design wise I am in a good state and now I want to create the backend for the site. ...

Is it possible to use t3env from a Drizzle config file?

I'm using create-t3-app but I'd like to use Drizzle instead of Prisma. I've managed to get it working, but the one pain point I have is that I can't get t3env to validate variables in my Drizzle config file. I've tried importing it normally but I'm hit with the error SyntaxError: Cannot use import statement outside a module in env.mjs, which I find odd since it is explicitly marked as an ES module and runs fine when building the page. Full Error: ```js Reading config file 'F:\Projects\PROJECTNAME\drizzle.config.ts'...

App dir + tRPC +

Hi, I am setting up a project with [create-t3-app@7.13.2-beta.ca0b017 + /app + tRPC (v10.27.1) + @tanstack/react-query (v5.0.0-alpha.58)], and I had a few questions about how this all works with the app directory. I saw that with the /pages directory, you would use the hoc trpc.withTRPC, a <trpc.Provider client={...}>, and a <QueryClientProvider client={...}> to pass the tRPC to the rest of the app, but in my project I see a trpc/client.ts which seems to create a similar client to above but uses experimental_createTRPCNextAppDirClient. Firstly, how do client calls to tRPC work without setting up any context (unless I'm missing something) and what is experimental_createTRPCNextAppDirClient doing?...

Tailwind - className did not match

I get this warning all the time: `` Warning: Prop className` did not match. Server: "fixed top-0 left-0 h-screen m-0 ease-in-out duration-300 w-52 flex flex-col bg-slate-700 text-slate-300" Client: "fixed top-0 left-0 h-screen m-0 ease-in-out duration-300 w-52 flex flex-col bg-slate-700 text-slate-300"...

Get Active Link from Server Component (Next.js 13.4)

I was making a basic Navigation for a Webpage. Since all React Components in Next 13.3 are by default Server Component if there a way to get the current page pathname from the server itself or do I have to use the 'use Client' and use the 'usePathname()'? I just want to highlight the active link in the navigation. Currently, usePathname() is the recommended way according to the Docs: https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#checking-active-links...

ServerActions and ISR

Hey, does anyone know how to do on demand revalidation (ISR) using the new AppRouter? mainly non fetch based data (db query, computing, etc).

How to make a monorepo using create-t3 app.

I need to have a script that can be run and access prisma, as well as the normal nextjs app. https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-monorepo I think I need to rebuild the whole project to make this work but I really have no idea. If it's really difficult I'll just rewrite the project in another language....

Prisma Date Day Off

Hello, I currently have the following: ```prisma model SomeModel {...
Solution:
I just added UTC after the day, got fixed, thanks 🙂

Prisma type issue

I'm having a difficult time figuring out why this error is occurring (pictured). I created a model within schema.prisma for the input ("address") to be pushed into. ```...
Solution:
The schema looks fine for what the error is showing for, so it's not related to the schema (although you should evaluate it logically to confirm it's what you want) Use your Code Editor's LSP: type ctx.prisma. and see how the URLData is being shown in it...

Portfolio website

Hey I am new to corporate world. Currently working as full stack developer and have 11 months of experience. I want to boost my learning by creating some portfolio website or some project from scratch. Can someone suggest backend and frontend framework/technology that I should try for good opportunities in future. Also I want to follow best practices of writing code, let me know what should I refer for the same, like any project/material etc.

Using JSZip with Zod and tRPC

I am making a uploadRouter for my website where a user can upload 5-10 images. I want to be able to zip those image and then upload it to a r2 endpoint. I never really worked with zipping and image schemas in Zod and tRPC so im not sure on what to do. Here is what I have so far ...

NextJS Website Bug

Hi so I coded up a simple website using Nextjs and TailwindCSS and it looks fine on localhost but once I uploaded it to vercel the font-size was completely different, parts where missing and my links in the menu bar where not working any more, giving me error 404 page not found?? When inspected it seemed like the html was empty. Does someone know why this could have happened and how to fix it? I will attach my githubrepo below. https://github.com/GeroWalther/gw-intech

DrizzleORM drops tables already in database when trying to add new tables?

Im trying to add some new tables to the DB with drizzle, but the db already had data in it through prisma. trying to push the schema is asking me to drop all of those tables? Anyone know why?

What is the point of learning Node.js?

I can build API just with t3 app, so why would I bother learning node?

ESLint changes don't show when running turbo build

Hi, in my .eslintrc.cjs file I've made some changes which include warning instead of throwing errors for certain rules, for example this is my file: ``` rules: { "@typescript-eslint/consistent-type-imports": [...

tRPC / React query noobish question

Hi, I have this Query: const { data: cardSetQuery, refetch: cardSetQueryRefetch } = api.example.getCardSet.useQuery( {...

Uploadthing + NextJS (App Dir) API Loop Bug

As shown in the video, i dont think there much else to say...

Default Discord Auth

This my first time using T3 Stack and i am facing this issue any help