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

Resend Email

hey, I'm created an enquiries page for people to send an email to the enquiries email address, I want to send the email from the email address they provided to my enquiries account, is this possible? this is my nextjs API route which is using Resend, ```ts import { env } from "@/env.mjs"; import { type ErrorResponse } from "resend"; import { z } from "zod"; import { resend } from "@/lib/resend";...

does anyone have a create-t3-app and shadcn starter repo?

I'm trying to install create-t3-app and then shadcn on top of that. However running into styling errors, like picture attached when combining the two. Any thoughts on how to fix this?...

Backend equivalent to Create T3 App

Hi everyone, is there a backend equivalent to create T3 app for example with express/typescript/eslint installed? Thanks.

Cannot find module error in building turbo repo

Hi, I am new to using turborepo. When I try to deploy my project from apps folder I keep getting the following error on every alternate build. And if I try to rebuild the failed build without the build cache, then it builds without any error. Am I missing to setup any turbo config in my project?
Type error: Cannot find module '@nimbleuikit/atoms/utils' or its corresponding type declarations.
Type error: Cannot find module '@nimbleuikit/atoms/utils' or its corresponding type declarations.
...

nextauth google provider not properly creating account

I have deployed my app to vercel and configured my environment variables, however I always get these error screens when I try to login on my app

Deployed default nextjs app on vercel - doesn't have perfect "Real Experience Score", why?

To test out vercel I deployed default nextjs app, why it doen't have perfect Real Experience score though?

Opinions on code style preference in a library project I'm working on for enum replacements

So for the sake of boredom and seeing a lot of content related to enums lately pop up, I asked myself. "Hey, can I make a better version of enums?" And the truth is, I have no idea but its been an interesting journey to try to figure out. The bulk of the idea is fleshed out for my generative enums and the final step is probably adding support for custom object shapes rather than a transformative string or incremental index. However before that, I was just wondering if I could get some thoughts on preference in code style, especially in a library aiming to replace something as simple and concise as enum....

download file from a folder

I have a folder on my machine with some reports. I want my connected users to be able to download these files. How can I create a protected api route that send the files, so it can be download from the client ? here is what I tried : ```typescript...
Solution:
You should change to base64 and decode on frontend

T3 & Uplaodthing mass Upload

I am currently faced with following: * Mass Upload regulary (every Month) ~1000 PDF documents. Sized between 1-4MB * Parse the original file name to match to a user key * Create a DB Record for every file uploaded, containing the uploaded filepath and some meta data...

react-icons or one of the underlying libraries?

do people care about stylistic consistency and stick to one icon library or just pick and choose from react-icons?

Eslint config is not picked up??!

Hi! I have some rules added to the .eslintrc.cjs inside the T3 app, but any rule I add is not getting picked up by Eslint. Restarting Eslint server etc etc does not work either. Unsafe member access .enabled on an any value.eslint@typescript-eslint/no-unsafe-member-access ...

How do you deal with dynamic classes ?

I found out that using dynamic classes requires you to add the given class to the safe list as Tailwind is only loading classes statically present in the className attribute. As this is obviously heavy for maintenance (if you want to keep the size optimised, stripped from unused CSS), how do you deal with this ? Here is an example, how would you make classes static ? ```typescript...
Solution:
OK, I didn't find this page from the doc which is exactly about the issue: https://tailwindcss.com/docs/content-configuration...

cookie

cookie being sent on development server but not on production

adobe react spectrum

Has anyone had any experience using Adobe React Spectrum? Searching didn't bring up anything much except a short discussion on DatePicker components. I've just started a person T3 stack project and wanted to give Adobe react-aria-components a go. I've just gone to add a Form (https://react-spectrum.adobe.com/react-spectrum/Form.html) and as far as I can tell Adobe's Spectrum is an overall style provider, which sounds like ChakraUI to me so I'm a bit hesitant to use it. I rabbit-holed myself using ChakraUI in a work project, which I seriously regret using, after getting a fair way in and hitting UX limitations I'm not experienced enough to build my way out of....

Ecommerce dummy question: Product Cart Stock Managment?

Hi, I'm doing an ecommerce and I need to make a decision about whether add/remove a product in the cart should update the stock in the inventory of that product or not. I'm waiting some ecommerce god help me with this decision. I search in google and forums but i found both answers so i´m confused.

Ecommerce dummy question:

Hi, I'm doing an ecommerce using t3 stack and I need to make a decision about whether adding a product to the cart should reduce the stock in the inventory or not. Currently I do reduce the amount of inventory stock by adding a product and with a cron job setting a time limit for that cart. But I know that there are arguments against this so I would like to have more opinions to see.

pagination from multiple sources?

So I've been trying to figure out a way to combine two paginated sources into 1 paginated feed. Essentially the current functionality pulls in a list of things from an outside api. We also have our own list of things that we'd like to start including in the same feed that we display the outside data....

What is the best strategy to deal with JWT in Nextjs?

With React, I retrieve user and token information with context or local storage anywhere in the app. How to get context data in a server component?

Client Side Functionality?

Hey all, I'm aware that client side rendering is a thing with use client (or a handful of other ways), but I'm curious if client side functionality is a thing. For example, a button that does a client-side action: The rendering of the button doesn't require any client side features, but the 'onClick' method does. Is there a way to SSR the button, and associate it with some functionality client-side? ...

What is the correct way to generate SEO metadata in t3 app

I have been using <Head> tag in index.tsx file to add all my page meta tags, but it turns out it cannot show this metadata in search engines. So what is the correct way to add the meta tags in t3 app....