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

Add token requirement to public TRPC endpoint to add to DB (create-t3-app)

I've created a public TRPC endpoint on the exampleRouter like so: ``` export const exampleRouter = createTRPCRouter({ // ... other routes create: publicProcedure...

Javascript / Typescript ORMs like Drizzle or Prisma

Guys sorry i know this is a very beginner question. I've been mostly a backend developer most of my life and just started getting into development with Vue. Are ORM based on javascript/Typescript meant for the back end front end or both?
If its meant for front end i have a bad feeling. I mean a front end app sending sql queries directly to a database just doesn't seem that secure and seems very likely to be abused. Where would you store connection info for the database? In javascript sent to the browser? Maybe if its meant if your running backend javascript (either node or SSR with whatever framework)....

VSCode Debugging - Does Client Side debugger break points work?

So I've got server side debugging working in VSCode with breakpoints but I can't for the life of me get it to work for the frontend even when I'm opened using the VSCode Chrome extension. Does this just not work?

Data fetching in NextJs 13.4+

I have a question about this statement - In this new model, we recommend fetching data directly in the component that needs it, even if you're requesting the same data in multiple components, rather than passing the data between components as props. I thought the server component paradigm was fetch in a server component and pass the data to the client component leaves. As a simple example, say you were populating a drop down list from an api call. I assumed the server component would request the data and pass it into whatever client component is going to create the interactive list. Is that the wrong way to think about it? ...

UPLOADTHING_URL is still set to localhost:3000

I have my app on vercer server and I'm still getting this error: Access to fetch at 'http://localhost:3000/api/uploadthing' from origin 'https://thymotion.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. even when I set the UPLOADTHING_URL the error is the same... ...

Session recording tools?

Hey! I want to monitor my next app, and before I look for a logging and tracking solution, I want a session recording tool. There are known tools like logrocket and sentry, or lesser known like vwo and inspectlet, which offer 2500-5000 sessions on the free tier. But there's also a completely free tool by microsoft called clarity. Do you have any input on the matter? Thanks!...

What is the name of the service cname.vercel-dns.com hosted on?

I’m wanting to have a multi tenant app, so I need to configure my own nameserver that tenants point their domain to rather than having them point to cname.vercel-dns.com so that if I move platforms, they don’t have to update their configs. So I essentially want to tell them to point their domain to something like dns.example.com and then have that forward it to cname.vercel-dns.com but I’m not really sure what type of service this is called, any ideas?...

How to use google fonts in a T3 app

Looking for recommendations for what you think is the best way to use google fonts in a T3 app

Can i front a (non-prod) netlify(or other providers) app with cloudflare?

Netlify has just been blocked where i live, i can't access any site with **.netlify.app Is it possible to add my development site such that it proxies to cloudflare for now? If i'm right, i would(might) be able to access my netlify site right? I did try adding the site for now but it's a bit confusing rn, all the instructions i've found seem to indicate that i need to buy a domain name first. So i was wondering if it's possible to do without having to buy a domain name first....

How should we handle errors in zact? What should I return when the user is unauthorized for example?

How should we handle errors in zact? What should I return when the user is unauthorized for example?

WARNING: Text content did not match...

/* data.ts */
export const data = [...] // array of items
export const randomNumGen = //Generator function that yields a random number between 0 and max each time. Refer to the image 1
export const data = [...] // array of items
export const randomNumGen = //Generator function that yields a random number between 0 and max each time. Refer to the image 1
...

Fetching a font on edge

Hi! I have a pretty bizarre bug: I am fetching a font from my assets folder as shown below to use it in an ImageResponse. The problem is that the request fails when the url is a variable (?) (Code below)...

CKEditor 5 and Next.js integration - working in development environment but not in production

I'm trying to use the CKEditor 5 online builder (https://ckeditor.com/ckeditor-5/online-builder/) in my Next.js application. I downloaded the customized editor file, added it to my application folder, at the same level as
node_modules
node_modules
, then ran the
yarn add file:ckeditor5
yarn add file:ckeditor5
command, as instructed here: https://github.com/ckeditor/ckeditor5/issues/7376#issuecomment-802460193. In development environment, it works perfectly fine. All features are performing according to my needs, and no errors occur. The issue arises when I try to ship this code to production. The
buildspec.yml
buildspec.yml
file has these commands: (image #1) ...

What to use instead of "getServerSideProps" in NextJS?

As most of you might be aware of getServerSideProps is slow and hard to use. Is there a better alternative method to use instead? Like using react-query maybe? I am not sure about it. I'd appreciate any recommendation 🙏

how to remove query from Next js 13 app url without reloading?

how to remove query from next js 13 app url without reloading?

Revalidate using App Dir tRPC

I am wondering how to trigger a revalidation to occur after a mutation is made ```ts export const pressButton = publicProcedure.mutation(async ({ ctx }) => { const added = ctx.db.insert(presses).values({});...

which database will you recommend i use for storing jobs for queues

I would have loved to use redis, but i am scared someone may reboot the server, and everything will be lost I have so many juniors, etc...

Publish iOS App on Testflight

Hello, I want to publish app on testflight for my client. He added me on team on app store connect as Admin, but in xcode I can't see that team and I can't Archive my app because of that. Does anybody maybe know how I can fix this. I tried to log out and log in, restart my mac and delete cache memory from xcode but it didn't help?

T3 Turbo Build Issue

hey guys im getting this strange error when trying to build t3 turboafter i upgraded from expo 47 to 48 https://cdn.discordapp.com/attachments/943205994123657246/1116227528688939018/image.png Has anyone else had something similar before?...

router.refresh is not working in first load

can anyone tell me why if(!firstTime) is not working ? when i put it inside setTimout for 10s it start working but when i am throttling the network it again stops working? Does anyone have reliable solution for this? ```js "use client";...