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 there T3-stack alternative that doesn't use Next.js?

I like the idea, but not Next.js. Can't it be replaced?

T3 - pass current tenant slug into TRPC context

I'm trying to create a Saas product with T3 and I need to have the tenant slug in the TRPC context so that I can try to do the operations in the correct tenant. I was able to use headers from the react client to pass in the slug, but I don't know a good way to solve this for server components. Does anyone have a good example or can provide some guidance for this?...

Dockerizing t3 app with mysql database

Hello, im struggling with dockerizing my t3 app and.. idk how to handle that correctly :/ Ive read article on t3 website but i cannot handle running my database/app simultanously, im getting error like that on screen. My first touches with docker, do you have any idea what will be wrong? 🤔 ...
No description

Error when trying to spin up turbo repo

Can anyone shed some light on this issue. It's a new project using the supabase t3turbo setup. I have everything configured including the github auth and get server error when trying to navigate to localhost...
No description

Client side SDK

I need to use a in browser sdk for connecting to our dymo printers and dymo provides as JS sdk for us to use however I’m not sure the best way to add this to a next js app Using t3 (ts) and app router. Can anyone advise? The framework makes local requests to a piece of software installed on the local machine so it will never be possible for nextjs to run it on server or build. I assumed that client components would be the route but not getting anywhere...

Anyone know how to fix svelte-query

``` Cannot find module '//node_modules/@tanstack/svelte-query/dist/types' imported from //node_modules/@tanstack/svelte-query/dist/index.js at finalizeResolution (node:internal/modules/esm/resolve:264:11) at moduleResolve (node:internal/modules/esm/resolve:917:10) at defaultResolve (node:internal/modules/esm/resolve:1130:11)...
Solution:
I fixed it just needed to restart sveltekit

fresh install - prisma db:push fails when using .env.development & .env.production

Previous T3 apps I've created an .env.development and .env.production file and prisma has worked fine.
Setup a fresh install of T3 today and while db:push works if I have the environment file named simply as .env, as soon as I change to having .env.development and .env.production, it reports the following error: ```Prisma schema loaded from prisma/schema.prisma...

application running costs

Anyone done a costing sheet for calculating the per user cost (at enterprise level) of their app with all the bells and whistles (excluding payment costs)? I’ve done got a rough estimate of $0,1 per user

favicon not showing on google search

The favicon of my website is not showing on google search although i think it definitely met the requirement of having the <link rel="icon' .../>
No description

TypeScript NX Async Server Component TypeScript Error

Hello everyone! I'm seeking advice on a TypeScript issue within a Next.js project managed by NX Workspaces. Despite following the official guidelines (https://nextjs.org/docs/app/building-your-application/configuring/typescript#async-server-component-typescript-error), I'm still running into problems. Here's the version info of the main tools and libraries I'm using: TypeScript Version: ~5.3.2 NX Version: 18.1.3 Next.js Version: Integrated with NX 18.1.3...

Error with Uploadthing file renaming

I tried using both Rename types: Rename || Rename[] Whenever I try to send this request: ```...

trpc with nextjs app router

Im creating an web app for my own startup, and using nextjs 14.2.3 with app router, so is trpc makes sense with the app router or not? If yes then how it makes sense?

Shared MimeType config for Uploadthing

Hi, I would like to define allowed MimeType - .jpeg, .png, .pdf and also I would like to define min and max file count, but shared across the mime types. e.g. I have minimum 5 files and maximum 10, so I would like to be able to select 3x .pngs, 2x .jpegs and 1x .pdf I currently defined the router config like this ```"image/jpeg": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 }, "image/png": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 },...

does anyone have a good guide/tutorial on how to make links embedable

To be specific i mean the way youtube videos are playable in a component (idk)

next 14 Showing image fallback on public folder image 404

I am using next 14, and storing some images in my app's public folder. These images are then requested by <img> elements in some of my client components. If the requested resource does not exist, I would like to show a 'default image' which is effectively a file that is guarnateed to exist in the public folder. To try and do this I have written a simple client component that wraps the img element....
No description

Code seems to stop execution

Im trying to send an email using resend. Locally, the email sends just fine, but when I host it on Vercel, it looks like the function stops execution. One moment the code is running spitting out logs and then it goes silent. It stops right when i get to the call to send the email. I don't see any timeouts so im confused as to why it fails. It is kind of strange the way I call the function and that is the only thing i can think. Its a server action that calls a server side trpc query. That query fires off a chain of functions that should result in an email....

Api Route or Server Action for ImageKit upload

I am currently trying to make a form and on submit want to upload an image to Imagekit. Currently I am trying to do it with a server action, but am not sure if I should use a api route instead. That is because of the following error:
Error: Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.
Error: Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.
My code looks like this: ```tsx function onSubmit(values: z.infer<typeof formSchema>) { let res = fileUpload(values.image[0]);...

Docker help -> writing to file in a seperate container

I have 2 docker file/containers where one is a next app and another one is a go server, is there a way in which I can manipulate my next js files from my golang container, chatgpt says a shared volume, but I am not able to make it work (see the next js dir and write to it ). if you want my docker-compose.yaml ->
services: go_app: restart: always build:...

How to get TRPC mutation type?

Does anyone know how to get the useMutation return type for a TRPC mutation? I want to pass a mutation down as props but cannot get the types working ```...

Setting up ecs with alb on container with sockets.

So i am new to cloud and I want to create a application with ecs and alb. But this application or container use socket( more precisely socket.io). How to setup this. I have setup this but i can only access normal routes. But when trying to connect to websocket it cannot be connect...