A modern, responsive sales analytics dashboard built with Next.js 15, TypeScript, and Tailwind CSS, featuring interactive data visualizations for chocolate sales data from 2022-2024.
🚀 Live Demo 🔗 Live Demo
📂 GitHub Repository 🔗 GitHub Repo
📸 Screenshots
- Interactive Charts: Multiple chart types (Line, Bar, Pie) with seamless switching
- Year Selection: Filter data by specific years (2022, 2023, 2024)
- Responsive Design: Optimized for both desktop and mobile devices
- Atomic Design: Component architecture following atomic design principles
- Real-time Updates: Dynamic data visualization with smooth transitions
- TypeScript: Full type safety throughout the application
The project follows atomic design principles with a clear component hierarchy:
src/components/
├── atoms/ # Basic building blocks
│ └── Heading.tsx
│
├── molecules/ # Simple combinations of atoms
│ ├── FilterInput.tsx
│ └── Kpi.tsx
├── organisms/ # Complex UI components
│ ├── KPISection.tsx
│ └── SalesCharts.tsx
└── ui/ # Specialized chart components
├── card.tsx
└── tooltip.tsx
- Framework: Next.js 15 with App Router
- Language: TypeScript for type safety
- Styling: Tailwind CSS
- Charts: Recharts for interactive data visualization
- Icons: Lucide React for consistent iconography
- Build Tool: Turbopack for fast development builds
- Node.js 18.0 or higher
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/tsujit74/sales-dashboard cd sales-dashboard -
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000to view the dashboard
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint for code quality
- Main Dashboard: Access via
/dashboardroute - Year Selection: Use the year buttons (2022, 2023, 2024) to filter data
- Chart Types: Switch between Line, Bar, and Pie charts using the chart type buttons
- Interactive Elements: Hover over chart elements for detailed tooltips
The dashboard displays four main KPIs:
- Total Sales: Current year sales volume
- Best Product: Current year Best Product
- Average Sales: Calculated monthly averages
- Top Month Seles: Month Sales
interface SalesData {
month: string;
year: number;
sales: number;
revenue: number;
product: string;
}- Update the mock data in
src/data/salesData.ts - Ensure the data structure matches the
SalesDatainterface - Update calculations in helper functions as needed
npm run build
npm run start- API Integration: Connect to real chocolate sales APIs
- Advanced Filtering: Date range pickers and product filters
- Export Functionality: PDF and CSV export capabilities
- User Authentication: Role-based access control
- Real-time Data: WebSocket integration for live updates
- Performance: Implement data virtualization for large datasets
- Accessibility: Enhanced ARIA labels and keyboard navigation
- Testing: Comprehensive unit and integration test suite
- Analytics: User interaction tracking and performance monitoring
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For questions, issues, or contributions, please:
- Open an issue on GitHub
- Contact the development team
- Check the documentation for common solutions
Built with ❤️ using Next.js 15, TypeScript, and modern web technologies

