A modern, fully-featured CMS admin dashboard built with Next.js 16, React 19, and TypeScript. This dashboard provides a comprehensive interface for managing content, media, users, collections, plugins, and system settings.
- 🔐 Authentication - Secure login with Bearer token authentication
- 📝 Content Management - Create, edit, delete, and publish content
- 📁 Collections - Organize content into collections
- 🖼️ Media Library - Upload and manage media files
- 👥 User Management - Manage team members and permissions
- 🔌 Plugin System - Extend functionality with plugins
- ⚙️ Settings - Configure CMS behavior and appearance
- 🎨 Dark Theme - Beautiful dark UI with Tailwind CSS
- 📱 Responsive Design - Mobile-first responsive layout
- Framework: Next.js 16 (App Router)
- React: React 19
- TypeScript: Full type safety
- State Management: Zustand with persist middleware
- Data Fetching: SWR for server state management
- HTTP Client: Axios with interceptors
- UI Components: Radix UI primitives
- Styling: Tailwind CSS 4
- Icons: Lucide React
- Fonts: Geist Sans & Geist Mono
- Node.js 18+
- pnpm (recommended) or npm
- Clone the repository
- Install dependencies:
pnpm install- Create a
.env.localfile:
cp .env.example .env.local- Update the API base URL in
.env.local:
NEXT_PUBLIC_API_BASE_URL=http://localhost:3001pnpm devOpen http://localhost:3000 to access the dashboard.
pnpm build
pnpm start├── app/
│ ├── admin/
│ │ ├── layout.tsx # Admin layout with auth guard
│ │ ├── dashboard/ # Dashboard page
│ │ ├── content/ # Content management
│ │ ├── collections/ # Collections management
│ │ ├── media/ # Media library
│ │ ├── users/ # User management
│ │ ├── plugins/ # Plugin management
│ │ └── settings/ # System settings
│ ├── login/ # Login page
│ └── layout.tsx # Root layout
├── components/
│ ├── admin/ # Admin-specific components
│ │ └── admin-sidebar.tsx # Dynamic sidebar with plugins
│ ├── ui/ # Reusable UI components
│ └── providers.tsx # SWR and Theme providers
├── hooks/ # Custom hooks for data fetching
│ ├── useDashboard.ts
│ ├── useContent.ts
│ ├── useCollections.ts
│ ├── useMedia.ts
│ ├── useUsers.ts
│ ├── usePlugins.ts
│ └── useSettings.ts
├── lib/
│ ├── api.ts # API client with auth
│ ├── constants.ts # App constants
│ └── utils.ts # Utility functions
├── store/
│ └── authStore.ts # Zustand auth store
├── types/
│ └── index.ts # TypeScript type definitions
└── middleware.ts # Auth middleware
The dashboard integrates with the following backend API endpoints:
POST /admin/auth/login- User loginPOST /admin/auth/logout- User logoutGET /admin/auth/me- Get current user
GET /admin/dashboard/stats- Dashboard statisticsGET /admin/dashboard/recent-activity- Recent activity feed
GET /admin/content- List content (with pagination & filters)POST /admin/content- Create contentGET /admin/content/:id- Get content by IDPUT /admin/content/:id- Update contentDELETE /admin/content/:id- Delete content
GET /admin/collections- List collectionsGET /admin/collections/:id- Get collection by IDPOST /admin/collections- Create collectionPUT /admin/collections/:id- Update collection
GET /admin/media- List media filesPOST /admin/media- Upload media file(s)DELETE /admin/media/:id- Delete media file
GET /admin/users- List usersPOST /admin/users- Create userPUT /admin/users/:id- Update userDELETE /admin/users/:id- Delete user
GET /admin/plugins- List pluginsGET /admin/plugins/:id- Get plugin by IDPATCH /admin/plugins/:id- Toggle plugin enabled stateGET /admin/plugins/:id/settings- Get plugin settingsPUT /admin/plugins/:id/settings- Update plugin settings
GET /admin/settings- Get system settingsPUT /admin/settings- Update system settings
The dashboard uses Bearer token authentication with the following flow:
- User logs in via
/loginpage - Token is stored in Zustand store (localStorage) and cookie
- All API requests include
Authorization: Bearer {token}header - On 401 response, user is logged out and redirected to login
- Middleware protects
/admin/*routes
The sidebar automatically loads and displays menu items from enabled plugins, allowing for extensible navigation.
- API errors are caught and displayed to users
- Loading states for all async operations
- Proper error boundaries
Dark theme is enabled by default with support for system theme preferences.
Configure the backend API URL in .env.local:
NEXT_PUBLIC_API_BASE_URL=https://api.example.comModify Tailwind CSS configuration in app/globals.css to customize colors and styles.
MIT
For issues and questions, please open an issue on the repository.