Skip to content

Unseencoderz/DataVisualization-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Data Vizualization Dashboard ✨

Live Demo GitHub Stars License PRs Welcome

Project Banner

Transform your data into stunning visual insights with our modern, responsive dashboard featuring glassmorphism design, dark mode, and advanced 3D visualizations.


πŸ† Key Highlights

🎨
Glassmorphism UI
Modern frosted glass effects
πŸŒ™
Dark/Light Mode
System-aware theming
πŸ“±
Fully Responsive
Mobile-first design
⚑
High Performance
Optimized rendering
πŸ”
Advanced Filtering
Multi-criteria search
πŸ“ˆ
3D Visualizations
Interactive charts
β™Ώ
Accessible
WCAG 2.1 AA compliant
πŸš€
Modern Stack
React 18 Node.js

πŸ› οΈ Tech Stack

Frontend

React Material-UI JavaScript CSS3 Plotly

Backend

Node.js Express.js MongoDB Mongoose

Tools & Deployment

Git VS Code Render Netlify


πŸš€ Quick Start

πŸ“‹ Prerequisites

Make sure you have the following installed:

  • Node.js (v14.0.0 or higher)
  • npm (v6.0.0 or higher) or yarn
  • MongoDB (v4.0.0 or higher)
  • Git

⚑ Installation

# 1️⃣ Clone the repository
git clone https://github.com/Unseencoderz/DataVisualization-server.git
cd DataVisualization-server

# 2️⃣ Install server dependencies
cd server
npm install

# 3️⃣ Install client dependencies
cd ../client
npm install

# 4️⃣ Set up environment variables
cd ../server
cp .env.example .env
# Edit .env with your configuration

# 5️⃣ Start the development servers
# Terminal 1 - Backend
cd server
npm run dev

# Terminal 2 - Frontend
cd client
npm start

πŸ”§ Environment Setup

Create a .env file in the server directory:

# Server Configuration
PORT=5000
NODE_ENV=development

# Database
MONGODB_URI=mongodb://localhost:27017/dataviz
DB_NAME=dataviz_pro

# Security
JWT_SECRET=your_super_secret_jwt_key
CORS_ORIGIN=http://localhost:3000

# API Configuration
API_VERSION=v1
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100

✨ Features

🎨 UI/UX Enhancements

Modern Design System

  • βœ… Glassmorphism Effects - Frosted glass aesthetics with backdrop-filter blur
  • βœ… Dark/Light Mode - System-aware theme switching with smooth transitions
  • βœ… Animated Backgrounds - Dynamic gradient backgrounds with floating particles
  • βœ… Modern Typography - Inter font family with improved readability
  • βœ… Responsive Design - Mobile-first approach with fluid breakpoints

Interactive Components

  • βœ… Statistics Cards - Real-time metrics with glassmorphism effects
  • βœ… Advanced Filtering - Multi-criteria search with visual feedback
  • βœ… Data Table - Sortable, searchable table with pagination
  • βœ… Loading States - Skeleton screens and smooth transitions
  • βœ… Error Handling - Graceful error states with retry options
πŸ“Š Advanced Visualizations

Chart Types

  • πŸ“ˆ 3D Scatter Plots - Interactive intensity/likelihood/relevance correlation
  • πŸ”₯ Heatmaps - Sector vs Region intensity mapping
  • 🍩 Enhanced Donut Charts - Sector distribution with center annotations
  • πŸ“Š Bar Charts - Responsive intensity visualization by year
  • πŸ“‰ Line Charts - Trend analysis with smooth curves

Visualization Features

  • βœ… Interactive Tooltips - Rich hover information with formatting
  • βœ… Zoom & Pan - Navigate through large datasets
  • βœ… Export Options - Download charts as PNG/SVG/PDF
  • βœ… Real-time Updates - Live data synchronization
  • βœ… Theme Integration - Charts adapt to dark/light mode
⚑ Performance Optimizations

Frontend Performance

  • ⚑ Component Memoization - Optimized re-renders with React.memo
  • ⚑ Lazy Loading - Code splitting for faster initial load
  • ⚑ Efficient State Management - Consolidated filter state
  • ⚑ Debounced Search - Optimized search performance
  • ⚑ Virtual Scrolling - Handle large datasets efficiently

Backend Performance

  • ⚑ Database Indexing - Optimized MongoDB queries
  • ⚑ Response Caching - Redis integration for faster responses
  • ⚑ API Rate Limiting - Prevent abuse and ensure stability
  • ⚑ Compression - Gzip compression for smaller payloads
  • ⚑ Error Logging - Comprehensive error tracking
β™Ώ Accessibility Features

WCAG 2.1 AA Compliance

  • βœ… Keyboard Navigation - Full keyboard accessibility
  • βœ… Screen Reader Support - Semantic HTML and ARIA labels
  • βœ… Color Contrast - High contrast ratios for readability
  • βœ… Focus Management - Visible focus indicators
  • βœ… Reduced Motion - Respects user motion preferences

πŸ–ΌοΈ Screenshots

πŸ“± Desktop & Mobile Views

Desktop Dashboard

Desktop Dashboard

Mobile Responsive

Mobile View

Dark Mode

Dark Mode

πŸ“Š Chart Visualizations

3D Scatter Plot

3D Scatter Plot

Interactive Heatmap

Heatmap

Statistics Cards

Stats Cards


🌐 API Documentation

πŸ“‘ API Endpoints

Base URL

https://your-api-domain.com/api/v1

Data Endpoints

GET /data

Retrieve all data entries with optional filtering.

// Request
GET /api/v1/data?sector=Energy&region=Asia&limit=100&page=1

// Response
{
  "success": true,
  "data": [
    {
      "_id": "507f1f77bcf86cd799439011",
      "title": "Energy Market Analysis",
      "sector": "Energy",
      "region": "Asia",
      "country": "India",
      "intensity": 4,
      "likelihood": 3,
      "relevance": 5,
      "published": "2024-01-15T10:30:00Z",
      "source": "Reuters",
      "url": "https://example.com/article"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 10,
    "totalItems": 1000,
    "hasNext": true,
    "hasPrev": false
  }
}

GET /data/stats

Get aggregated statistics for dashboard metrics.

// Response
{
  "success": true,
  "stats": {
    "totalRecords": 1000,
    "avgIntensity": 3.2,
    "avgLikelihood": 2.8,
    "avgRelevance": 3.5,
    "sectorDistribution": {
      "Energy": 250,
      "Technology": 200,
      "Healthcare": 150
    }
  }
}

Error Responses

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid sector parameter",
    "details": {
      "field": "sector",
      "value": "invalid_sector",
      "allowedValues": ["Energy", "Technology", "Healthcare"]
    }
  }
}
πŸ” Authentication

API Key Authentication

Include your API key in the request headers:

headers: {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
}

Rate Limiting

  • Limit: 100 requests per 15 minutes per IP
  • Headers: Rate limit info included in response headers

πŸ“ Project Structure

πŸ—οΈ Folder Organization
πŸ“¦ /DataVisualization-server
β”œβ”€β”€ πŸ“ client/                          # Frontend React Application
β”‚   β”œβ”€β”€ πŸ“ public/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ index.html
β”‚   β”‚   β”œβ”€β”€ πŸ“„ manifest.json
β”‚   β”‚   └── πŸ“ icons/
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/              # Reusable UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Dashboard.js         # Main dashboard component
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ StatsCard.js         # Statistics display cards
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ LoadingSpinner.js    # Loading states
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ FilterPanel.js       # Advanced filtering
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ChartContainer.js    # Chart wrapper
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ DataTable.js         # Data table with features
β”‚   β”‚   β”‚   └── πŸ“„ AdvancedCharts.js    # 3D visualizations
β”‚   β”‚   β”œβ”€β”€ πŸ“ styles/                  # CSS Stylesheets
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Dashboard.css        # Main dashboard styles
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ globals.css          # Global styles
β”‚   β”‚   β”‚   └── πŸ“„ themes.css           # Theme configurations
β”‚   β”‚   β”œβ”€β”€ πŸ“ utils/                   # Utility functions
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ api.js               # API client
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ helpers.js           # Helper functions
β”‚   β”‚   β”‚   └── πŸ“„ constants.js         # App constants
β”‚   β”‚   β”œβ”€β”€ πŸ“ hooks/                   # Custom React hooks
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ useTheme.js          # Theme management
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ useApi.js            # API calls
β”‚   β”‚   β”‚   └── πŸ“„ useLocalStorage.js   # Local storage
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.js                   # Main App component
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.css                  # App styles
β”‚   β”‚   └── πŸ“„ index.js                 # Entry point
β”‚   β”œβ”€β”€ πŸ“„ package.json                 # Dependencies & scripts
β”‚   └── πŸ“„ .env.example                 # Environment variables template
β”œβ”€β”€ πŸ“ server/                          # Backend Node.js Application
β”‚   β”œβ”€β”€ πŸ“ controllers/                 # Route controllers
β”‚   β”‚   β”œβ”€β”€ πŸ“„ dataController.js        # Data operations
β”‚   β”‚   β”œβ”€β”€ πŸ“„ statsController.js       # Statistics operations
β”‚   β”‚   └── πŸ“„ authController.js        # Authentication
β”‚   β”œβ”€β”€ πŸ“ models/                      # Database models
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Data.js                  # Data model schema
β”‚   β”‚   └── πŸ“„ User.js                  # User model schema
β”‚   β”œβ”€β”€ πŸ“ routes/                      # API routes
β”‚   β”‚   β”œβ”€β”€ πŸ“„ dataRoutes.js            # Data endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ statsRoutes.js           # Statistics endpoints
β”‚   β”‚   └── πŸ“„ authRoutes.js            # Auth endpoints
β”‚   β”œβ”€β”€ πŸ“ middleware/                  # Custom middleware
β”‚   β”‚   β”œβ”€β”€ πŸ“„ auth.js                  # Authentication middleware
β”‚   β”‚   β”œβ”€β”€ πŸ“„ errorHandler.js          # Error handling
β”‚   β”‚   β”œβ”€β”€ πŸ“„ logger.js                # Request logging
β”‚   β”‚   └── πŸ“„ rateLimiter.js           # Rate limiting
β”‚   β”œβ”€β”€ πŸ“ config/                      # Configuration files
β”‚   β”‚   β”œβ”€β”€ πŸ“„ database.js              # Database connection
β”‚   β”‚   β”œβ”€β”€ πŸ“„ cors.js                  # CORS configuration
β”‚   β”‚   └── πŸ“„ environment.js           # Environment setup
β”‚   β”œβ”€β”€ πŸ“ utils/                       # Utility functions
β”‚   β”‚   β”œβ”€β”€ πŸ“„ validation.js            # Input validation
β”‚   β”‚   β”œβ”€β”€ πŸ“„ helpers.js               # Helper functions
β”‚   β”‚   └── πŸ“„ constants.js             # Server constants
β”‚   β”œβ”€β”€ πŸ“„ app.js                       # Express app setup
β”‚   β”œβ”€β”€ πŸ“„ server.js                    # Server entry point
β”‚   β”œβ”€β”€ πŸ“„ package.json                 # Dependencies & scripts
β”‚   └── πŸ“„ .env.example                 # Environment variables template
β”œβ”€β”€ πŸ“ docs/                            # Documentation
β”‚   β”œβ”€β”€ πŸ“„ API.md                       # API documentation
β”‚   β”œβ”€β”€ πŸ“„ DEPLOYMENT.md                # Deployment guide
β”‚   └── πŸ“„ CONTRIBUTING.md              # Contribution guidelines
β”œβ”€β”€ πŸ“„ README.md                        # This file
β”œβ”€β”€ πŸ“„ FRONTEND_IMPROVEMENTS.md         # Frontend enhancement docs
β”œβ”€β”€ πŸ“„ LICENSE                          # MIT License
β”œβ”€β”€ πŸ“„ .gitignore                       # Git ignore rules
└── πŸ“„ docker-compose.yml               # Docker configuration

🎯 Usage Guide

πŸš€ Getting Started

1. Dashboard Overview

After starting the application, you'll see the main dashboard with:

  • Statistics Cards: Key metrics at the top
  • Filter Panel: Left sidebar for data filtering
  • Charts Section: Various visualizations
  • Data Table: Detailed data view at the bottom

2. Using Filters

  1. Open Filter Panel: Click on any filter dropdown
  2. Select Criteria: Choose from available options
  3. Apply Filters: Data updates automatically
  4. Clear Filters: Use the clear button to reset

3. Interacting with Charts

  • Hover: View detailed tooltips
  • Zoom: Use mouse wheel on 3D charts
  • Pan: Click and drag to navigate
  • Toggle: Click legend items to show/hide data

4. Theme Switching

  • Auto Mode: Follows system preference
  • Manual Toggle: Use the theme switch in the navbar
  • Persistence: Theme preference is saved locally
πŸ“Š Chart Types Guide

Bar Chart - Intensity by Year

Shows intensity values grouped by publication year.

  • Use Case: Trend analysis over time
  • Interactions: Hover for exact values
  • Filtering: Responsive to all filters

3D Scatter Plot - Multi-dimensional Analysis

Displays intensity, likelihood, and relevance correlation.

  • Use Case: Complex relationship analysis
  • Interactions: Rotate, zoom, and hover
  • Color Coding: By relevance values

Heatmap - Sector vs Region

Shows intensity distribution across sectors and regions.

  • Use Case: Geographic and sector analysis
  • Color Scale: Darker = higher intensity
  • Interactions: Hover for exact values

Donut Chart - Sector Distribution

Displays the proportion of records by sector.

  • Use Case: Distribution analysis
  • Center Annotation: Total record count
  • Interactions: Click to filter by sector

🀝 Contributing

πŸ› οΈ Development Setup

Prerequisites for Contributors

  • Node.js (v14)
  • MongoDB (v4)
  • Git
  • Code editor (VS Code recommended)

Development Workflow

# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/Unseencoderz/DataVisualization-server.git

# 3. Create a feature branch
git checkout -b feature/amazing-feature

# 4. Install dependencies
npm run install:all

# 5. Start development servers
npm run dev

# 6. Make your changes
# 7. Run tests
npm run test

# 8. Commit your changes
git commit -m "Add amazing feature"

# 9. Push to your fork
git push origin feature/amazing-feature

# 10. Create a Pull Request
πŸ“‹ Contribution Guidelines

Code Standards

  • βœ… Follow ESLint configuration
  • βœ… Use Prettier for formatting
  • βœ… Write meaningful commit messages
  • βœ… Add JSDoc comments for functions
  • βœ… Include unit tests for new features

Pull Request Process

  1. Update Documentation: Include relevant docs updates
  2. Add Tests: Ensure new features have test coverage
  3. Check Performance: No significant performance regression
  4. Update Changelog: Add entry for your changes
  5. Request Review: Tag maintainers for review

Issue Reporting

When reporting issues, please include:

  • Environment: OS, Node.js version, browser
  • Steps to Reproduce: Detailed reproduction steps
  • Expected Behavior: What should happen
  • Actual Behavior: What actually happens
  • Screenshots: If applicable
πŸ† Contributors

🌟 Hall of Fame

This project is proudly built and maintained solo with πŸ’»β€οΈ by @Unseencoderz.

Unseencoderz contribution graph

Made with contrib.rocks β€” though it’s a solo act, every commit counts!


πŸ“œ License

βš–οΈ MIT License
MIT License

Copyright (c) 2024 DataViz Pro Dashboard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ“ž Contact & Support

🀝 Get in Touch

Email LinkedIn Twitter GitHub

πŸ’¬ Community

Discord Slack

πŸ› Bug Reports & Feature Requests

GitHub Issues GitHub Discussions


🌟 Show Your Support

If this project helped you, please consider giving it a ⭐ on GitHub!

GitHub stars GitHub forks GitHub watchers


Built with ❀️ by Sahil gautam

Β© 2024 DataVisualization-server Pro Dashboard. All rights reserved.

About

This repository contains the Node.js/Express backend for our data visualization and management application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published