Hook

Their other posts in the index, biggest breakout first.
If you're building an app with different tiers of users. For example, you have some users who are admins and other users who have other roles, you have to correctly set all of that up. And by the way, what you're describing is role-based access control, or RBAC. And all it does is restrict access to specific authorized users. The best way I recommend to implement RBAC is with Clerk. If you don't know how to code that, that's fine. You can copy the markdown or open this file in different LLMs and it'll do it for you. When you're coding this, you have to remember to hide it on the front end, but then restrict it on the back end too. On the front end, Clerk gives you the show component where it shows and hides specific things. Remember back has the has method from off. So combining the front end boolean state and the back end permissions is how you set up RBAC securely. If you want to make sure your app is production ready as possible, make sure to follow along.