Admin Panel
Tour the DirectoryLaunch /admin dashboard — approve submissions, reorder categories, manage users, run promotions, edit settings and view analytics.
The admin panel lives at /admin. Logged-in admins see a new link in the header; everyone else gets redirected.
Becoming an admin
In Supabase → Table Editor → users → set both is_admin = true and role = 'admin' on your row. See Authentication for the full note on why there are two fields.
Dashboard overview
The landing page shows at-a-glance stats: submissions this week, pending approvals, top categories, revenue, etc. Charts are powered by Recharts.
Pages
| Route | What you manage |
|---|---|
/admin | Overview dashboard with charts and analytics |
/admin/projects | Approve / reject / edit submissions (+ CSV import) |
/admin/categories | Categories and spheres (drag-and-drop) |
/admin/users | User roles, admin flag, bans |
/admin/advertising | Paid promotions and sponsor placements (one page) |
/admin/social-proof | Live counters and social-proof widgets |
/admin/changelog | Post updates that appear on /changelog |
/admin/design | Theme, layout/display settings, and map defaults (tabbed) |
Projects
Filter by status (pending / live / rejected), search by name, bulk-approve. Clicking a row opens the full project detail with edit fields.
Also supports CSV import — dump existing listings from a spreadsheet, map columns, import in one go.
Categories (drag-and-drop)
Uses @dnd-kit/*. Drag categories to reorder within a sphere or move them between spheres. Save auto-persists the new order.
Advertising (promotions & sponsors)
Paid promotions and sponsor placements are managed together on one page. Approve/reject purchases, set start dates, and manually extend or revoke placements. The checkout URL and price for the auto-submit banner are also set here.
Design panel
/admin/design is a tabbed control center for the look of your site. Changes persist to the site_settings table and apply site-wide without a redeploy.
| Tab | What it controls |
|---|---|
| Layout | Display settings — show/hide the logo and cover image independently on catalog cards and on the item page. Submitters are only asked to upload the media you enable. |
| Theme | Pick one of 14 color presets or define a custom theme (applies to everyone). See Theming. |
| Map | Default projection (globe / flat) and lighting mode. Only appears when the map feature is enabled. See Maps & Location. |
Each tab has a live preview, so you see the effect before saving.
Demo mode
Set NEXT_PUBLIC_APP_MODE=demo to let anyone open the admin panel and every page without signing in — useful for showcasing the product. All write operations are blocked, so nothing persists. Never enable demo mode on a real production site.
Access control
Admin routes are protected both client-side and server-side:
- Server components call
requireAuth()andisAdmin()→ redirect if not admin - RLS policies on sensitive tables use
role = 'admin' - Middleware does not enforce admin — individual pages do
See also
- Authentication — how to grant admin rights
- Admin Routes — the API behind the panel