A comprehensive Next.js dashboard application with authentication, dynamic theming, and responsive design.
- 🔐 Authentication System - Login/logout with JWT tokens
- 🎨 Dynamic Theming - Light/dark mode with multiple color schemes
- 🎭 Font Customization - Multiple font family options
- 📱 Responsive Design - Works on all device sizes
- 🧭 Navigation - Collapsible sidebar with active states
- 📊 Dashboard Pages - Analytics, users, settings, and more
- 🔧 Modern Stack - Next.js 15, TypeScript, Tailwind CSS
frontend/
├── app/ # Next.js App Router
│ ├── (dashboard)/ # Dashboard route group
│ │ ├── dashboard/ # Main dashboard page
│ │ ├── users/ # Users management
│ │ ├── analytics/ # Analytics page
│ │ └── settings/ # Settings page
│ ├── api/ # API routes
│ │ ├── auth/ # Authentication endpoints
│ │ └── users/ # User management endpoints
│ ├── login/ # Login page
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page (redirects to dashboard)
├── components/ # Reusable components
│ ├── auth/ # Authentication components
│ ├── layout/ # Layout components (Header, Sidebar, Footer)
│ └── ui/ # UI components (ThemeSelector, etc.)
├── contexts/ # React contexts
│ ├── AuthContext.tsx # Authentication state management
│ └── ThemeContext.tsx # Theme state management
└── lib/ # Utility libraries
├── auth.ts # Authentication utilities
└── theme.ts # Theme configuration
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000
The app includes a mock authentication system. Use these credentials to log in:
- Admin: admin@example.com / password123
- User: user@example.com / password123
The application supports:
- Theme Modes: Light, Dark, System
- Color Schemes: Blue, Green, Purple, Orange, Red
- Font Families: Inter, Roboto, Poppins, Open Sans
All theme settings are persisted in localStorage and applied dynamically.
POST /api/auth
- Login/RegisterGET /api/auth
- Get current userGET /api/users
- Get users listPOST /api/users
- Create new user
- Create a new page in
app/(dashboard)/your-page/page.tsx
- Wrap content with
DashboardLayout
- Add navigation item to
components/layout/Sidebar.tsx
- Add color scheme to
lib/theme.ts
- Update
colorSchemes
object with your colors - Add option to
ThemeSelector
component
Replace the mock auth service in lib/auth.ts
with your preferred authentication provider (Auth0, Firebase, etc.).
- Next.js 15 - React framework with App Router
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- React Context - State management
- Next.js API Routes - Backend API
-
Build the application:
npm run build
-
Start the production server:
npm start
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this project for your own applications.