Skip to content

piyushzingade/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Custom Theme Dashboard 🎨

A modern, customizable dashboard application built with Next.js, featuring multiple beautiful themes, interactive charts, and a comprehensive UI system.

Next.js TypeScript Tailwind CSS

🌐 Live Preview

Check out the live demo: https://dashboard.nexui.xyz/

✨ Features

  • Multiple Custom Themes - T3 chat, Amber, Lilac, Candy, Sky, and Default theme
  • Interactive Data Visualizations - Bar charts, line charts, radar charts, and sales graphs
  • Kanban Board - Drag-and-drop task management with smooth animations
  • Product Management - Server-side table with filtering, sorting, and pagination
  • Theme Selector - Dynamic theme switching with persistence
  • Responsive Design - Mobile-first approach with Tailwind CSS
  • Smooth Animations - Powered by Motion (Motion react)
  • TypeScript First - Full type safety throughout
  • Modern UI Components - Built with shadcn/ui
  • Authentication Ready - NextAuth.js integration
  • Database Integration - Prisma ORM with PostgreSQL support

πŸš€ Quick Start with CLI

The fastest way to get started is using our CLI tool:

npx nexui-dashboard my-dashboard

This will scaffold a complete dashboard with all themes and features in seconds!

πŸ“¦ Manual Installation

Prerequisites

  • Node.js 18+
  • npm, yarn, pnpm, or bun
  • PostgreSQL (optional, for full features)

Installation

git clone <repository-url>
cd dashboard
npm install

Environment Setup

Create a .env.local file in the root directory:

# NextAuth (optional)
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key-here"

# Database (optional)
DATABASE_URL="postgresql://user:password@localhost:5432/dashboard"

Database Setup (Optional)

# Generate Prisma Client
npx prisma generate

# Run migrations
npx prisma migrate dev

# Seed database
npx prisma db seed

Run Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser.

πŸ› οΈ Tech Stack

Technology Purpose
Next.js 14+ React framework with App Router
TypeScript Type-safe development
Tailwind CSS Utility-first styling
shadcn/ui Beautiful UI components
Recharts Data visualization library
Motion Animation library
NextAuth.js Authentication solution
Prisma Next-generation ORM
PostgreSQL Relational database
Lucide React Icon library
Tabler Icons Additional icons

πŸ“ Project Structure

dashboard/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── auth/          # NextAuth API routes
β”‚   β”‚   └── verify-captcha/
β”‚   β”œβ”€β”€ dashboard/         # Dashboard pages
β”‚   β”‚   β”œβ”€β”€ (account)/     # Account settings
β”‚   β”‚   β”œβ”€β”€ (general)/     # General pages
β”‚   β”‚   β”œβ”€β”€ calendar/      # Calendar page
β”‚   β”‚   β”œβ”€β”€ kanban/        # Kanban board
β”‚   β”‚   β”œβ”€β”€ overview/      # Main dashboard
β”‚   β”‚   β”œβ”€β”€ product/       # Product management
β”‚   β”‚   β”œβ”€β”€ reports/       # Reports page
β”‚   β”‚   └── transactions/  # Transactions page
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Home page
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ graphs/            # Chart components
β”‚   β”‚   β”œβ”€β”€ BarChart.tsx
β”‚   β”‚   β”œβ”€β”€ LineChart.tsx
β”‚   β”‚   β”œβ”€β”€ RadarChart.tsx
β”‚   β”‚   β”œβ”€β”€ Sales.tsx
β”‚   β”‚   └── TopCard.tsx
β”‚   β”œβ”€β”€ kanban/            # Kanban components
β”‚   β”œβ”€β”€ products/          # Product table components
β”‚   β”œβ”€β”€ ui/                # shadcn/ui components
β”‚   β”œβ”€β”€ active-theme.tsx   # Theme provider
β”‚   β”œβ”€β”€ ThemeSelector.tsx  # Theme selector
β”‚   β”œβ”€β”€ UpdateSoon.tsx     # Coming soon component
β”‚   └── ...                 # Other components
β”œβ”€β”€ constants/
β”‚   └── mock-api.ts        # Mock data and API
β”œβ”€β”€ hooks/                 # Custom hooks
β”œβ”€β”€ lib/                   # Utility libraries
β”œβ”€β”€ prisma/                # Database schema and migrations
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ theme.json         # Theme configurations
β”‚   └── ...                # Static assets
β”œβ”€β”€ types/                 # TypeScript types
└── ...

🎨 Theme System

The dashboard features a comprehensive theme system with 6 built-in themes:

  • Default: Clean, neutral theme
  • T3 chat: Warm purple tones
  • Amber: Golden yellow theme
  • Lilac: Soft purple and pink
  • Candy: Bright, playful colors
  • Sky: Twitter-inspired blue theme

Adding Custom Themes

  1. Add your theme configuration to public/theme.json
  2. Include light and dark variants
  3. The theme selector will automatically pick up new themes

Example theme structure:

{
  "your-theme": {
    "displayName": "Your Theme",
    "light": {
      "background": "#ffffff",
      "foreground": "#000000",
      // ... more color variables
    },
    "dark": {
      // ... dark mode colors
    }
  }
}

πŸ“Š Charts & Visualizations

Pre-built chart components:

  • BarChart: Animated bar chart with hover effects
  • LineChart: Partial line chart with dash patterns
  • RadarChart: Radar chart for multi-dimensional data
  • Sales: Recent sales component with avatars
  • TopCard: Animated KPI cards with trend indicators

πŸ”§ Customization

Adding New Components

Use shadcn/ui CLI:

npx shadcn-ui@latest add [component-name]

Modifying Themes

Edit theme variables in public/theme.json or add new themes.

Database Models

Update prisma/schema.prisma and run:

npx prisma migrate dev --name your-migration

πŸ“ Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run type-check   # TypeScript type checking

🚒 Deployment

Vercel

npm run build
vercel --prod

Other Platforms

Ensure environment variables are set for your deployment platform.

🀝 Contributing

  1. Star the repository
  2. Fork the repository
  3. Create a feature branch
  4. Make your changes
  5. Test thoroughly
  6. Submit a pull request

For Contributors: Syncing Template Changes

If you make changes to the main dashboard files (outside the cli/ directory), you need to sync these changes to the CLI template so they're included when users scaffold new projects.

Run this command after making changes:

cd cli
npm run sync

This will sync your latest changes to the template that gets distributed via npm.

Note: The template includes all dashboard features with authentication. Users can run npx nexui-dashboard [project-name] to instantly scaffold a new project.

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments


Built by ❀️ Piyush

About

A dashboard with custom theme selector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published