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

Protecting PDF

I want to create a project where people can upload PDFs, but I only want users to be able to see certain pages of a PDF unless they meet certain requirements. I can't do this on the client since people would obviously be able to check their network tab and get the PDF's URL from there 😛 I've been checking other websites that do something similar and it seems they fetch each page of the PDF as HTML instead of the entire file... Any idea how I could do something similar or if there is another way...

NextJS 13 tailwind responsive websites

I'm trying to make a simple responsive website with nextjs 13 and tailwind, but the media queries aren't working as expected. When on mobile "md:" classes is triggered. Is this a bug?

Automatic account linking after credential provider login

I have a credential provider setup for a standard email + password login. I also have the twitter provider setup. When my users first sign up via the credentials provider and later via twitter, the accounts get automatically linked to the same user. This is actually intended behavior but is there anyway to not have the linking happens? Thanks!...

How to change the input type in trpc call

For context, i want to try to update the user's profile but i cant seem to add both the ctx argument and the input as a z.object (like in the example on their docs https://trpc.io/docs/v9/react-mutations ). I am not really sure what is wrong, any pointers would be appreciated.

best approach to load 2 tables that has no relationship but rather has a foreign key

i need to load user all user table with finyMany and also in the process attach all the wallet table balances for each user. The wallet table has a foreign key of user_id which is the id on the row on the User table...

Best practice how to store settings in MySQL?

Hi. I would like to store some settings / preferences in the database, but don't know what's the common structure, to do so. Would it be something like so? ```prisma...

Create-T3-App tRPC 9

Can I create a project with tRPC 9 via CTA or do I have to use 10 beta? If so how?

when to have an actual backend?

With the t3 stack we just deploy a single repo that contains both our "server" and "page". At what point should one have a dedicated backend to handle requests?...

Typescript Property 'pull' does not exist on type 'ObjectId[ ]'

moongose
moongose
typescript
typescript
I want to remove from an Array list and this is the error I am getting when I tried to use the
PULL
PULL
method, please how do i resolve this error ?

Trpc array of strings validation

I am currently receiving following errors while trying to save a post ``ts next-dev.js?a272:20 TRPCClientError: Invalid prisma.customer.create()` invocation: ...

Flutter vs. the world

Hey everyone I saw you guys seem to hate flutter, and I don't want to use this either Are there some cool techs out there to build small iOS & Android app? What do you use? I just want to play around a little bit and try things on mobile (never did mobile dev, wanna try out), are PWAs a viable option or maybe React Native? ...

Turborepo vs Yarn Workspaces

I've used yarn workspaces for a few projects, and recently been interested in turborepo. However, it seems like the tools are very similar. Are there any major advantages/disadvantages to using one or the other? Is it worth moving to Turborepo instead of workspaces for any reasons?

Error Unsupported Server Component type undefined

Hey, I'm playing around with Next 13 rn and I encountered an issues. I have my root layout.tsx Which only has the default stuff in it + my Navbar Component The page.tsx uses a server side component to fetch data from my database and display it....

share state array between pages

Hey guys so the idea is pretty simple but I'm kinda stuck to achieve this. So I have functionality when I click a button I add id to the array, when I click it again I remove the id from the array. But now I want to use this array also in different page. For context I'm trying to build a "favorite list" so I probably need to preserve this array somehow, maybe with local storage? How should I go about this?

Simple nodemailer app

So, since Gmail took the "allow less secure apps" feature off, I've been kinda lost in how to set up a free mailer with nodemailer. Does anyone have any alternative? I've tried with protonmail, but didn't work. And I don't think SendGrid solves my problem....

Next 13

With next 13 do you just replace getserverside props with the use api and leave Trpc the same for mutations / client side requests etc. ? Not planning on using it right now, just as a general question for the future...

Should I use next 13 or t3 stack for my current project (long term project)

if i do use t3, how difficult would it be to update to next 13 when it does become stable. also worried about how to use tRPC. i also def need the nested routing

React Query + Next 13 + Vercel?

Has anyone been able to deploy a site with RQ and Next 13 to Vercel? I am able to use RQ locally, both in dev and build, but when deploying to vercel, the page would return error 500. Not sure what could be the cause for me...

SWC compiler allows const variable re-assignment

I was trying out the SWC playground and I am getting no errors when I reassign a const variable. PS: when the function is not arrow function or when the code is out of that function, it throws the appropriate error....