A clean, sleek admin dashboard frontend built for a SaaS auth system. This UI is meant to be dropped into a Next.js + React + Tailwind app and then connected to your existing auth/admin logic.
- Responsive admin dashboard page
- Sidebar navigation
- Top search/filter bar
- KPI stat cards
- Recent users table
- Security activity feed
- Quick action buttons
- System safeguard status cards
- Next.js 14 or newer
- React 18 or newer
- Tailwind CSS 3.4 or newer
- TypeScript 5 or newer
Place the admin page in one of these locations depending on your setup:
app/admin/page.tsxpages/admin.tsxUsing npm:
npm installUsing pnpm:
pnpm installUsing bun:
bun installYour project should already have Tailwind configured. If not, set up Tailwind in your Next.js project first.
Copy the provided frontend code into:
app/admin/page.tsxor:
pages/admin.tsxnpm run devThen open:
http://localhost:3000/adminThis UI is only the frontend layer. You need to connect the buttons, table actions, and stats to your backend logic.
Add user→ create new team member or adminExport→ export users, logs, or reportsFilter→ open filter controls or query params
Manage→ open user details- Change roles
- Suspend or activate users
- Revoke sessions
- View login activity
Create admin userReview failed loginsRevoke active sessionsSuspend flagged account
Keep the UI separate from your auth logic.
Example structure:
/lib/admin.ts
/components/admin/AdminDashboard.tsx
/app/admin/page.tsxExample:
export async function getAdminStats() {}
export async function getRecentUsers() {}
export async function getSecurityEvents() {}
export async function suspendUser(userId: string) {}
export async function revokeSessions(userId: string) {}Then call those functions from your page or API layer.
Do not rely only on frontend checks.
You should protect /admin using:
- server-side session validation
- admin role check
- redirect non-admin users away from the page
- logging for sensitive admin actions
import { redirect } from "next/navigation";
export default async function AdminPageWrapper() {
const session = await getServerSession();
if (!session || session.user.role !== "admin") {
redirect("/login");
}
return <AdminPage />;
}Replace getServerSession() with your own auth method.
This UI uses:
- dark premium dashboard styling
- zinc neutral palette
- teal accent color
- rounded 2xl cards
- subtle borders and blur
- responsive grid layout
If you want to restyle it:
- change
bg-[#0a0a0b]and zinc classes for overall theme - replace teal utility classes with your brand color
- update sidebar labels to match your SaaS
- swap dummy data for live API data
The sample code includes static arrays like:
statsusersactivities
Replace those with fetched data from your backend.
Example:
const stats = await getAdminStats();
const users = await getRecentUsers();
const activities = await getSecurityEvents();You may want endpoints like:
GET /api/admin/stats
GET /api/admin/users
GET /api/admin/security-events
POST /api/admin/users/create
POST /api/admin/users/:id/suspend
POST /api/admin/users/:id/revoke-sessionsBefore shipping:
- protect the route server-side
- verify admin-only actions are blocked for normal users
- connect real data instead of static arrays
- add loading states
- add empty states
- add error handling
- log sensitive actions
- paginate large tables
- test mobile layout
- test dark theme contrast
You can extend this admin dashboard with:
- analytics charts
- audit log page
- user detail drawer
- organization management
- billing controls
- API key management
- feature flag controls
- role and permission editor
Use the included package manifest scripts:
npm run dev
npm run build
npm run start
npm run lintMake sure Tailwind is installed and your content paths include app/**/* or pages/**/*.
That is expected until you connect your backend handlers.
Add a server-side role check before rendering the page.
Remove unused imports or enable only the packages you actually use.
This frontend is intended to be bundled with your auth/admin product. Buyers can copy, paste, modify, and connect it to their own SaaS.