Admin Dashboard UI with shadcn/ui (Vite + Typescript)
A comprehensive, production-ready admin panel template built with modern React technologies. This template provides a solid foundation for building admin dashboards with authentication, user management, and customizable widgets.
- Shadcn/ui Components - Beautiful, accessible components
- Dark/Light Theme - System-aware theme switching
- Responsive Design - Mobile-first approach
- Clean Typography - Inter, Roboto, and Poppins fonts
- Login/Register pages
- Password reset functionality
- Protected routes
- Session management
- Role-based permissions
- Interactive dashboard widgets
- Drag-and-drop layout
- Customizable charts (Recharts)
- Real-time data visualization
- Grid-based widget system
- Collapsible sidebar
- Breadcrumb navigation
- Mobile-responsive header
- Tab-based account management
- Clean routing structure
- TypeScript support
- Form validation with Zod
- React Hook Form integration
- TanStack Query for data fetching
- Hot module replacement
- Comprehensive testing setup
- React
^19.1.1- Latest React with concurrent features - TypeScript
~5.9.3- Type-safe development - Vite
rolldown-vite@latest- Lightning-fast build tool with Rolldown
- Tailwind CSS
^4.1.16- Utility-first CSS framework - Shadcn/ui - High-quality React components
- Radix UI
^1.x- Unstyled, accessible components - Lucide React
^0.552.0- Beautiful icon library - Next Themes
^0.4.6- Theme management
- TanStack Query
^5.90.6- Powerful data synchronization - TanStack Router
^1.134.12- Type-safe routing - React Hook Form
^7.66.0- Performant forms - Zod
^3.25.76- Schema validation
- Recharts
^2.15.4- Composable charting library - React Grid Layout
^1.5.2- Draggable grid system
- ESLint
^9.36.0- Code linting - Vitest
^4.0.6- Unit testing - Playwright
^1.56.1- E2E testing - React Query Devtools
^5.90.2- Development tools
- Node.js 18+
- npm, yarn, or pnpm
# Clone the repository
git clone https://github.com/rohitsoni007/shadcn-admin.git
cd shadcn-admin
# Install dependencies
npm install
# Start development server
npm run dev
# Open http://localhost:5173# Development
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
# Testing
npm run test # Run unit tests
npm run test:watch # Run tests in watch mode
npm run test:ui # Run tests with UI
npm run test:e2e # Run E2E tests
npm run test:e2e:ui # Run E2E tests with UI
# Code Quality
npm run lint # Lint codesrc/
βββ components/ # Reusable UI components
β βββ ui/ # Shadcn/ui components
β βββ auth/ # Authentication components
β βββ dashboard/ # Dashboard widgets
β βββ layout/ # Layout components
β βββ theme-provider/ # Theme management
βββ contexts/ # React contexts
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ routes/ # TanStack Router routes
βββ types/ # TypeScript type definitions
βββ main.tsx # Application entry point
- Mock Authentication - Development-ready auth system
- Protected Routes - Route-level protection
- Role-based Access - Permission-based UI rendering
- Session Management - Automatic token refresh
- Draggable Layout - Rearrange widgets via drag & drop
- Resizable Widgets - Customize widget dimensions
- Chart Integration - Line charts, bar charts, stats cards
- Persistent Layout - Saves layout preferences
- Tabbed Interface - Profile, Password, Settings tabs
- Form Validation - Zod schema validation
- Theme Preferences - User-specific theme settings
- Security Settings - Password change, privacy controls
- Mobile Sidebar - Collapsible navigation
- Adaptive Layout - Optimized for all screen sizes
- Touch-friendly - Mobile gesture support
Create a .env.local file:
# API Configuration
VITE_API_BASE_URL=http://localhost:3000/api
VITE_APP_NAME=Admin Panel
# Authentication
VITE_AUTH_SECRET=your-secret-key
# Development
VITE_ENABLE_DEVTOOLS=trueThis project uses Tailwind CSS 4 with Vite plugin. Customize themes by:
- CSS Variables: Modify theme colors in
src/index.css - Component Variants: Update component styles in
src/components/ui/ - Theme Provider: Configure theme settings in
src/components/theme-provider.tsx
# Run all tests
npm run test
# Run specific test file
npm run test -- auth.test.tsx
# Run tests in watch mode
npm run test:watch# Run E2E tests
npm run test:e2e
# Run E2E tests with UI
npm run test:e2e:uinpm run buildnpm install -g vercel
vercel --prodnpm run build
# Upload dist/ folder to NetlifyWe welcome contributions! Here's how you can help:
- Fork the repository from rohitsoni007/shadcn-admin
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use TypeScript for all new code
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Ensure responsive design
- Follow accessibility best practices
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ using Vite + shadcn/ui
β Star this repo if you find it helpful!
