The dashboard uses simulated data that represents what would be returned from executing SQL queries against an e-commerce database. In a production environment, this data would come from actual database tables.
The project assumes a database schema with the following tables:
products: Product informationcustomers: Customer detailssales: Sales transactionssales_targets: Sales targets by category and quarteremployees: Employee informationemployee_sales: Employee sales performancefinancial_data: Financial metrics
Database → SQL Queries → Data Processing → API → Frontend → Visualizations
The frontend is built with:
- HTML5 for structure
- CSS3 for styling with custom properties for theming
- Vanilla JavaScript for interactivity
- Chart.js for data visualization
- Bootstrap 5 for responsive UI components
- Window Functions: Used for calculating running totals, moving averages, and growth rates
- Subqueries: Nested queries for complex comparisons and calculations
- Common Table Expressions (CTEs): Temporary result sets for complex queries
- Recursive Queries: For hierarchical and cumulative data analysis
- Performance Optimization: Indexing, partitioning, and query rewriting
- Line charts for trend analysis
- Bar charts for comparisons
- Radar charts for multi-dimensional analysis
- Stacked charts for composition analysis
- Create a new section in
index.html - Add the corresponding SQL code example
- Implement the chart in
js/main.js - Style as needed in
css/style.css
- Set up a backend API (Node.js, Python, etc.)
- Create endpoints that execute the SQL queries
- Modify the frontend to fetch data from these endpoints
- Update the visualizations to use the real data
The project uses CSS custom properties for theming. To change the color scheme:
- Modify the
:rootsection incss/style.css - Update the color variables to match your brand