▲ 0 r/Firebase
The login page was easy. Roles and permissions are what I'm stuck on.
Built the frontend of my client portal in Cursor + Claude. Login screen, dashboard, file upload, all the screens look right. The problem is I have three roles: admin, client user, regular user, and I have no clue how to actually wire that up. What I want:
- admin can see everything, edit users, change settings - client user only sees their own projects + invoices - regular user gets a stripped down view i keep starting and getting stuck on the same questions:
- is the role check something I do in routing, in middleware, or in the database itself with row level security? - if a regular user types the admin url do I just redirect, or hide the routes entirely? - do you store role as a column on the user, split it into a separate table, or let the auth provider handle it? i'm checking a few builders, including Enter, mostly because the docs talk about auth/database/backend pieces in the same product world. but the pattern is what I am trying to learn first. if you've done this with an ai-built app, what did you pick and why.
u/InfluenceConfident42 — 2 days ago