Admin Dashboard
The admin section provides platform-wide management tools. It is restricted to users with role === "admin" in their profile record. Non-admin users attempting to access any /admin route are redirected to /feed.
Route map
Section titled “Route map”| Route | File | Description |
|---|---|---|
/admin | (app)/admin/+page.svelte | Admin dashboard overview |
/admin/users | (app)/admin/users/+page.svelte | User management |
/admin/posts | (app)/admin/posts/+page.svelte | Post moderation |
/admin/products | (app)/admin/products/+page.svelte | Product moderation |
/admin/jobs | (app)/admin/jobs/+page.svelte | Job listing moderation |
/admin/ads | (app)/admin/ads/+page.svelte | Ad campaign management |
/admin/categories | (app)/admin/categories/+page.svelte | Category management |
/admin/blacklist | (app)/admin/blacklist/+page.svelte | Blacklisted words/terms |
/admin/reports | (app)/admin/reports/+page.svelte | User reports and flagged content |
All routes require admin role (authentication + onboarding + profile.role === "admin").
Layout
Section titled “Layout”The admin section has its own +layout.svelte and +layout.server.ts at (app)/admin/. The layout adds an admin-specific sidebar with navigation links to each sub-page, nested inside the standard app shell.
Route protection
Section titled “Route protection”The guard in hooks.server.ts checks admin routes in two steps:
isProtectedRoute(path)returnstruefor anything starting with/admin— requires authentication.isAdminRoute(path)triggers an additional database query to verifyprofile.role === "admin". If the role check fails, the user is redirected to/feed.
Dashboard (/admin)
Section titled “Dashboard (/admin)”The admin home page shows platform-level statistics and activity summaries — total users, recent signups, pending reports, active ads, and content counts.
Users (/admin/users)
Section titled “Users (/admin/users)”User management interface:
- Search and filter users by name, email, role, or status
- View user profiles and activity
- Suspend, ban, or delete accounts
- Change user roles (e.g., promote to admin)
Posts (/admin/posts)
Section titled “Posts (/admin/posts)”Post moderation tools:
- Browse all posts with filtering by status and flags
- Remove or hide posts that violate guidelines
- View reported posts with report reasons
Products (/admin/products)
Section titled “Products (/admin/products)”Product moderation:
- Review submitted products
- Approve or reject product listings
- Remove products that violate policies
Jobs (/admin/jobs)
Section titled “Jobs (/admin/jobs)”Job posting moderation:
- Review submitted job listings
- Approve or reject postings
- Flag or remove inappropriate listings
Ads (/admin/ads)
Section titled “Ads (/admin/ads)”Platform ad management:
- Review ad campaigns
- Approve or reject ad submissions
- Monitor ad performance and spending
Categories (/admin/categories)
Section titled “Categories (/admin/categories)”Global category management for organizing posts, products, jobs, and other content types. Admins can create, edit, reorder, and delete categories.
Blacklist (/admin/blacklist)
Section titled “Blacklist (/admin/blacklist)”Manage blacklisted words and phrases that are automatically filtered from user-generated content. This works alongside the Honeycomb moderation filters for community-level filtering.
Reports (/admin/reports)
Section titled “Reports (/admin/reports)”Review user-submitted reports for content violations:
- View report details (reporter, reported content, reason)
- Take action (warn, remove content, suspend user)
- Mark reports as resolved