A modern, beautiful dashboard starter template with mock authentication and a complete UI component library. Built with React, TypeScript, TanStack Router, and Tailwind CSS.
- π¨ Beautiful UI Components - Full shadcn/ui component library with dark/light theme
- π Zustand Authentication - Mock auth using Zustand with localStorage persistence
- π’ Organization Management - Multi-organization support with switcher
- π± Responsive Design - Works perfectly on desktop, tablet, and mobile
- β‘ Fast Development - Hot reload with Vite
- π― Type Safe - Full TypeScript support
- π¨ Customizable - Easy to modify and extend
- π Command Palette - Quick navigation with keyboard shortcuts
- π Cursor AI Ready - Comprehensive rules for AI-assisted development
- Framework: React 19
- Build Tool: Vite 7
- Routing: TanStack Router
- Styling: Tailwind CSS 4
- UI Components: Radix UI + shadcn/ui
- State Management: Zustand
- Icons: Lucide React
- Type Checking: TypeScript
- Node.js 18+
- npm or yarn
- Clone or navigate to the dashboard-starter directory:
cd dashboard-starter- Install dependencies:
npm install- Start the development server:
npm run devThe app will open at http://localhost:5173 (or another port if 5173 is in use).
dashboard-starter/
βββ src/
β βββ components/
β β βββ auth/ # Authentication forms (signin, signup)
β β βββ layout/ # Layout components (sidebar, header, footer)
β β βββ shared/ # Shared components (theme provider, toggle)
β β βββ ui/ # UI component library (shadcn/ui)
β βββ hooks/
β β βββ use-auth.ts # Authentication hook (uses Zustand)
β β βββ use-organization.ts # Organization management hook
β β βββ use-mobile.ts # Mobile detection hook
β β βββ use-command-palette.ts # Command palette hook
β βββ lib/
β β βββ mock-data.ts # Mock data (users, organizations, stats)
β β βββ utils.ts # Utility functions
β βββ routes/
β β βββ __root.tsx # Root route
β β βββ index.tsx # Home page (redirects)
β β βββ (auth)/ # Auth routes (login, signup)
β β βββ (app)/ # Protected app routes
β β βββ layout.tsx # App layout with sidebar
β β βββ overview/ # Overview dashboard page
β βββ stores/
β β βββ index.ts
β β βββ auth-store.ts # Authentication state (Zustand)
β β βββ organization-store.ts # Organization state (Zustand)
β βββ main.tsx # App entry point
β βββ index.css # Global styles
β βββ vite-env.d.ts
βββ public/ # Static assets
βββ index.html
βββ package.json
βββ vite.config.ts
βββ tsconfig.json
βββ README.md
The dashboard uses Zustand for state management with localStorage persistence. Authentication is mocked - you can sign in with any email and password (minimum 8 characters).
Store: src/stores/auth-store.ts
Hook: useAuth() from src/hooks/use-auth.ts
Login: Navigate to /login
Signup: Navigate to /signup
See ZUSTAND_AUTH.md for detailed documentation.
All data is mocked and stored in src/lib/mock-data.ts. This includes:
- User Data: Name, email (stored in localStorage after login)
- Organizations: Demo Company, Acme Corp, Tech Startup
- Dashboard Stats: Projects count, team members, etc.
- Create a new route file in
src/routes/app/:
// src/routes/app/settings/index.tsx
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute('/app/settings/')({
component: SettingsPage,
});
function SettingsPage() {
return (
<div>
<h1>Settings</h1>
{/* Your content */}
</div>
);
}- Add the route to the sidebar in
src/components/layout/sidebar.tsx:
const navigationItems = [
{
title: "Overview",
url: "/overview",
icon: LayoutDashboard,
},
{
title: "Settings",
url: "/settings",
icon: Settings,
},
]Edit src/index.css to modify the color scheme:
@layer base {
:root {
--primary: 262.1 83.3% 57.8%;
/* ... other colors */
}
}Edit src/lib/mock-data.ts to change default organizations, stats, or user data.
Replace the mock authentication with your real API:
- Update
src/stores/auth-store.tsto call your backend API - Add JWT token management to the auth store
- Update
src/hooks/use-organization.tsto fetch real data - Remove
src/lib/mock-data.tsonce you have real data
See ZUSTAND_AUTH.md for integration examples.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The dashboard includes a complete UI component library from shadcn/ui:
- Buttons, Inputs, Forms
- Dialogs, Modals, Popovers
- Tables, Cards, Badges
- Navigation, Menus, Breadcrumbs
- Charts, Progress bars
- And many more...
All components are fully typed and customizable. See src/components/ui/ for the complete list.
Cmd/Ctrl + K- Open command palette
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
MIT License - feel free to use this starter for your projects!
For questions or issues, please open an issue in the repository.
Note: This is a frontend-only dashboard starter. All data is mocked and stored in localStorage. You'll need to integrate with your backend API to make it production-ready.
This starter includes comprehensive Cursor AI rules in .cursor/rules/:
project_guide.mdc- Main guide with architecture, patterns, and best practicesauthentication.mdc- Authentication patterns and integration guidescomponents.mdc- Component conventions and styling patternsrouting.mdc- TanStack Router conventions and examples
The AI automatically uses these rules to provide context-aware assistance:
"How do I add a new protected page?"
"Show me the authentication pattern"
"How should I structure this component?"
See .cursor/rules/README.md for complete documentation.
- Add Your Backend API - Replace mock data with real API calls
- Add More Pages - Build out your dashboard with additional routes
- Customize Styling - Adjust colors, fonts, and layouts to match your brand
- Add Analytics - Integrate analytics tracking
- Deploy - Deploy to Vercel, Netlify, or your preferred hosting platform
Happy building! π