# Admin panel solution docs

- [Designing an audit log for an admin panel](https://agenticboilerplate.com/cookbook/admin-panel/adding-an-audit-log): One append-only table, namespaced past-tense actions, emails copied in, and a clear rule for when the audit row can share a transaction with the change and when it cannot.
- [Bans that actually sign people out](https://agenticboilerplate.com/cookbook/admin-panel/bans-and-session-revocation): Setting banned = true stops the next sign-in, not the session already open. What Better Auth, Clerk and Supabase do on a ban, where caches and tokens let a banned user linger, and how to say so.
- [Empty states that are not sad](https://agenticboilerplate.com/cookbook/admin-panel/empty-states-that-are-not-sad): An empty state that only says "No data available" is a dead end. It should say what belongs here, why it is missing, and what to do next.
- [Making the first admin without a back door](https://agenticboilerplate.com/cookbook/admin-panel/first-admin-without-a-backdoor): A fresh deploy has no admin, and the admin page needs one to add one. Use a terminal script with database or API credentials, never an env list of emails or a first-user-wins rule.
- [impersonating-users-safely](https://agenticboilerplate.com/cookbook/admin-panel/impersonating-users-safely): 
- [Paginating admin tables without a client library](https://agenticboilerplate.com/cookbook/admin-panel/paginating-a-users-table): Offset pages with a total for the users table, keyset cursors for the audit log, both in the URL and rendered on the server. When to use which, and the details that make each correct.
- [Role checks that survive a layout refactor](https://agenticboilerplate.com/cookbook/admin-panel/role-checks-that-survive-a-refactor): A check that lives only in a layout disappears the day someone moves the page. Put the boundary where the route is, and check again where the work happens.
- [Route group or path segment: how to lay out an admin section](https://agenticboilerplate.com/cookbook/admin-panel/route-group-vs-path-segment): A route group shares a layout without touching the URL; a path segment is the URL. Admin panels need both, and confusing them produces public pages and 404s.

---

Agentic Boilerplate: A Next.js repo your agent already knows. Free during launch, then $99 once.

- Site map for agents: https://agenticboilerplate.com/llms.txt
- Public API: https://agenticboilerplate.com/openapi.json
- Contact: agenticstudio@gmail.com
