Ben
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Ben on 10/3/2024 in #questions
Max Connection Issue with Supabase + Vercel
Ya... it's been a painful welcome :sadCat:
We are using the Supabase built in bouncer/connection pooler
We do have one instance, using the XL machine size
12 replies
TTCTheo's Typesafe Cult
•Created by Ben on 6/3/2024 in #questions
Does saving files incur a cost on Vercel?
12 replies
TTCTheo's Typesafe Cult
•Created by Ben on 6/3/2024 in #questions
Does saving files incur a cost on Vercel?
Ya I'm trying to think how we could reduce bandwidth because it does feel like I'm doing a lot of repeated uploading of the same file:
1) Upload the file to uploadthing so I have somewhere to store it
2) Download the file from uploadthing on our Server
3) Chunk the audio using the above code
4) Send the chunks from the server to whisper to get a transcription
Not sure if their is a step to be skipped here? But if I understand correctly, for a 20mb file, I'm actually incurring 60mb of bandwith cost?
That said I'm already on the pro tier, so it looks like I have a fair amount of bandwith to use? I'm actually confused as to which category this fits into on their current pricing table.
12 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
I think Clerk docs specifically just aren't the best, especially made more confusing by the fact that they just had a total revamp of their API with Core 2
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
I think docs are just getting worse lol
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
Ya I agree, they have "Roles and Organizations" front and center on the dashboard, but for like 90% of people what they really need is the implentation in this article that's tucked away at the bottom of their docs :facepalm:
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
For your use case
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
So you mean the right way is with RBAC as per the article above right?
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
@Yaki
21 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/12/2024 in #questions
Weird Clerk behavior(user is null) with new API
Apparently my issue was because I was trying to hit the API from a server component. And it just doesn't work from Server to Server. So I had to make the call from a client component, or do everything directly in the RSC.
In regards to role based auth, read this https://clerk.com/docs/guides/basic-rbac to make sure you actually need organizations and not just metadata based roles
21 replies
TTCTheo's Typesafe Cult
•Created by mvpopuk on 5/28/2024 in #questions
import { api } from '~/utils/api';
Keep in mind, it's
import { api } from @/trpc/react
when you are fetching data in a client component, but it's import { api } from @/trpc/server
when you are fetching data in a server component4 replies
TTCTheo's Typesafe Cult
•Created by Deleted_user_f8439ab4ed59 on 5/21/2024 in #questions
Noob, I tried to follow along with the docs but got a different file structure.
I guess be a little careful following that tutorial exactly because he’s not using create-t3-app, which creates a fair amount of the files and schemes you need for next-auth, for you. You can follow that tutorial but avoid duplicating any files T3 already creates for you
11 replies
TTCTheo's Typesafe Cult
•Created by Deleted_user_f8439ab4ed59 on 5/21/2024 in #questions
Noob, I tried to follow along with the docs but got a different file structure.
I’m assuming you’re using next-auth? Just search up “next-auth NextJS 14 tutorial” and you should find a guide to walk you through it.
I know Cody sets it up in the this tutorial around the 34 minute mark
https://youtu.be/xF2WvGuI5Ww?si=snthdeZffmOJDU-4&t=10011
11 replies
TTCTheo's Typesafe Cult
•Created by Deleted_user_f8439ab4ed59 on 5/21/2024 in #questions
Noob, I tried to follow along with the docs but got a different file structure.
Yup no worries, you're welcome to use the pages directory, though like I said if you're learning all this for the first time, it might make more sense to use app dir(even if you need to find a different tutorital) becuase it's pretty much what everyone has switched over to.
11 replies
TTCTheo's Typesafe Cult
•Created by Deleted_user_f8439ab4ed59 on 5/21/2024 in #questions
Noob, I tried to follow along with the docs but got a different file structure.
The pages folder(often called pages directory or pages dir) is an older alternative to the app directory. To get a project that uses the pages dir, answer "no" when asked "Would you like to use the Next.js App Router?" by the CLI. You answered "Yes" to that question when using the T3 CLI, so your project was created the app folder. Honestly would recommend using the app directory, as it's the more modern approach. Most of the tutorials and stuff you see will be using that
Docs should get updated to reflect this though, so good job catching that!
11 replies
PPrisma
•Created by Ben on 5/14/2024 in #help-and-questions
Prisma Migrate Diff coming back when it shouldn't
Bumping to see if anyone might have an answer
3 replies
TTCTheo's Typesafe Cult
•Created by Ben on 5/14/2024 in #questions
Prisma Migrate Diff coming back when it shouldn't
Very weirdly, I ran Prisma migrate diff locally, and it came up with these same diffs, as well as another change from a sperate branch that was present on my development DB.
I then ran npx prisma db push, re-ran the
migrate diff
and it came back as clean. This indicates the state of my DB is having some sort of impact on this migrate diff
command, which makes no sense since I'm checking Prisma.schema against my migrations folder, not against the current state of my DB 🤕3 replies
PPrisma
•Created by Ben on 5/14/2024 in #help-and-questions
Prisma Migrate Diff coming back when it shouldn't
Very weirdly, I ran Prisma migrate diff locally, and it came up with these same diffs, as well as another change from a sperate branch that was present on my development DB.
I then ran npx prisma db push, re-ran the
migrate diff
and it came back as clean. This indicates the state of my DB is having some sort of impact on this migrate diff
command, which makes no sense since I'm checking Prisma.schema against my migrations folder, not against the current state of my DB 🤕3 replies
TTCTheo's Typesafe Cult
•Created by fotoflo on 4/29/2024 in #questions
Optimistic Updates with TRPC Hook
Would be curious to see your working implementation as I have a similar use case
7 replies
TTCTheo's Typesafe Cult
•Created by Ben on 4/24/2024 in #questions
Uploadthing Image not showing up
Ah ok, I had skipPolling={true} for my UploadDropzone, I didn't fundamentally understand what that was doing (I just thought, "oooh, this make app go brrrr"), once it was set to false everything is working as intended
6 replies