itslekan
Explore posts from serversCCConvex Community
•Created by itslekan on 12/17/2024 in #support-community
Database Structure Help
Hey I need a little help trying to structure my database. I'm making a tenant management app. There are multiple managers and each manager can create multiple properties and add one tenant per property. There is a page that allows the manager to view all his tenants but for that to work I need to get all their properties and then get all the tenants under each property
It feels really tedieous and I was wondering if there is a smarter more proper way to do this
I feel like the tenant should also have a manager_id field but I don't know if that's how it should be done
The tree normally looks like manager -> property -> tenant but now it's make it
manager-> property -> tenant
but also manager -> tenant
13 replies
TTCTheo's Typesafe Cult
•Created by itslekan on 12/10/2024 in #questions
bunx shadcn@latest init
I prompted v0.dev to create a starter template and I copied the command and changed the npx to bunx --bun and ran it only to find this error
I only just installed bun so maybe I didn't configure something write. bunx works for other things like
bunx --bun prettier foo.js
so I'm sure the problem is a shadcn@latest one.
Any help would be appreciated thank you.6 replies
CCConvex Community
•Created by itslekan on 12/10/2024 in #support-community
Error: `headers` was called outside a request scope.
I recently switched devices and I wanted to continue working on my project. So I pulled all the code from github and ran convex dev. Everything seemed to be working find and even the env's got filled in as well. This project is currently running in production on vercel so I know it works. But when I try to run it I keep getting this error
After some debugging. I've norrowed down the problem to be in the
convexAuthNextjsMiddleware
. I cleared my previous middleware and copy pasted the default middleware and still the same error. I can't figure out what I'm doing wrong.
I'll appreciate any help I could get. Thank you.3 replies
CCConvex Community
•Created by itslekan on 11/30/2024 in #support-community
nextjs handling server-side errors in error page
I'm using Nextjs, and I've setup a catch all error page to handle all errors, I've set it up to show formatted convex Errors if it's
instanceof ConvexError
see code below:
This works fine when the error comes from client side, but it completely breaks for server side requests like fetchQuery
. I've looked through the docs and this is not addressed at all.
here's the error. As you can see it's not the usual that has the data
key.
Any help with this would be appreciated.
Thanks6 replies
CCConvex Community
•Created by itslekan on 10/18/2024 in #support-community
Server ErrorUncaught Error: Uncaught TypeError: "pkcs8" must be PKCS#8 formatted string
I keep getthing this error when I try to sign in with convex auth "Password"
Any Ideas
6 replies
TTCTheo's Typesafe Cult
•Created by itslekan on 11/13/2023 in #questions
Should I make a separate REST api or use my Next project as the api backend
I built a dashboard to allow admins to add products and view orders. What I want to do now is to create a separate project, an e-commerce website for, say stationaries. I want this project to simply call an api for all the backend work. I don't know if I should build the api in the Nextjs project where I did the dashboard or create a separate REST or graphql project. I'm leaning more towards separating it but I want to hear more opinions before I commit to something thanks
16 replies