Skip to content

karthu097/Voltoria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Voltoria - Advanced Power Management System

A comprehensive JavaFX desktop application for electricity bill management, power monitoring, and energy analytics. Built with modern Java technologies and featuring advanced UI/UX design with glassmorphism effects.

🌟 Key Features

πŸ” Authentication & User Management

  • Dual Login System: Separate interfaces for Admin and Customer users
  • Secure Authentication: bcrypt password hashing for enhanced security
  • Session Management: Automatic session handling with proper logout functionality
  • User Role Management: Admin can manage customer accounts and permissions

πŸ‘¨β€πŸ’Ό Admin Dashboard

  • Modern Glassmorphism UI: Beautiful, responsive design with gradient backgrounds
  • Customer Management: Add, edit, and manage customer accounts
  • Usage Data Entry: Admin can input electricity consumption data
  • System Settings: Configure application parameters and preferences
  • Reports & Analytics: Comprehensive reporting system with visual charts
  • Voltage Monitoring: Real-time voltage spike detection and alerts

πŸ‘€ Customer Portal

  • Personalized Dashboard: Welcome message with actual customer name
  • Voltage Spike Alerts: Real-time monitoring with color-coded status indicators
  • Energy Forecast: AI-powered consumption predictions and cost estimates
  • Carbon Footprint Analysis: Environmental impact tracking and sustainability goals
  • QR Code Payment System: Modern UPI payment integration with QR code generation
  • Billing System: View bills, payment history, and account status

πŸ“Š Advanced Analytics

  • Real-time Charts: Interactive LineCharts for voltage trends and consumption patterns
  • Weather Impact Analysis: Correlation between weather conditions and energy usage
  • Cost Breakdown: Detailed analysis of electricity costs, taxes, and fees
  • Smart Recommendations: AI-driven energy-saving tips and optimization suggestions

πŸ’³ Payment System

  • QR Code Generation: Automatic UPI payment link creation with QR codes
  • Multiple Payment Methods: Support for various UPI apps and payment gateways
  • Payment Timer: Time-limited payment sessions for security
  • Transaction Tracking: Complete payment history and status monitoring

πŸ› οΈ Technology Stack

Backend Technologies

  • Java 17: Latest LTS version with modern language features
  • JavaFX 17: Rich desktop UI framework with FXML support
  • MySQL 8.x: Robust relational database with advanced features
  • HikariCP: High-performance connection pooling
  • Maven 3.8+: Dependency management and build automation

Security & Encryption

  • bcrypt: Industry-standard password hashing
  • Session Management: Secure user session handling
  • Input Validation: Comprehensive data validation and sanitization

UI/UX Technologies

  • FXML: Declarative UI design with controller separation
  • CSS3: Advanced styling with glassmorphism effects
  • JavaFX Charts: Interactive data visualization
  • Responsive Design: Adaptive layouts for different screen sizes

Data Processing

  • PDF Generation: PDFBox for bill generation and reports
  • QR Code Generation: Custom QR code creation for payments
  • Data Analytics: Advanced forecasting and anomaly detection
  • Real-time Updates: Live data monitoring and alerts

πŸ“ Project Structure

src/
β”œβ”€β”€ main/
β”‚   β”œβ”€β”€ java/com/ebg/
β”‚   β”‚   β”œβ”€β”€ MainApp.java                 # Application entry point
β”‚   β”‚   β”œβ”€β”€ model/                       # Domain models
β”‚   β”‚   β”‚   β”œβ”€β”€ User.java               # User authentication model
β”‚   β”‚   β”‚   β”œβ”€β”€ Customer.java           # Customer information model
β”‚   β”‚   β”‚   β”œβ”€β”€ Bill.java               # Billing data model
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ dao/                        # Data Access Layer
β”‚   β”‚   β”‚   β”œβ”€β”€ UserDAO.java            # User data operations
β”‚   β”‚   β”‚   β”œβ”€β”€ CustomerDAO.java        # Customer data operations
β”‚   β”‚   β”‚   β”œβ”€β”€ BillDAO.java            # Billing data operations
β”‚   β”‚   β”‚   └── impl/                   # DAO implementations
β”‚   β”‚   β”œβ”€β”€ service/                    # Business Logic Layer
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthService.java        # Authentication services
β”‚   β”‚   β”‚   β”œβ”€β”€ BillingService.java     # Billing calculations
β”‚   β”‚   β”‚   β”œβ”€β”€ ReportService.java      # Report generation
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ ui/                         # User Interface Controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginController.java    # Login screen controller
β”‚   β”‚   β”‚   β”œβ”€β”€ UnifiedAdminPanelController.java  # Admin dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ CustomerDashboardController.java  # Customer portal
β”‚   β”‚   β”‚   β”œβ”€β”€ QRPaymentController.java # Payment system
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── util/                       # Utility Classes
β”‚   β”‚       β”œβ”€β”€ Session.java            # Session management
β”‚   β”‚       β”œβ”€β”€ QRCodeGenerator.java    # QR code creation
β”‚   β”‚       └── ...
β”‚   └── resources/
β”‚       β”œβ”€β”€ fxml/                       # FXML UI definitions
β”‚       β”‚   β”œβ”€β”€ Login.fxml              # Login screen
β”‚       β”‚   β”œβ”€β”€ UnifiedAdminPanel.fxml  # Admin dashboard
β”‚       β”‚   β”œβ”€β”€ CustomerDashboard.fxml  # Customer portal
β”‚       β”‚   β”œβ”€β”€ QRPaymentWindow.fxml    # Payment interface
β”‚       β”‚   └── ...
β”‚       β”œβ”€β”€ styles/                     # CSS styling
β”‚       β”‚   β”œβ”€β”€ enhanced-ui.css         # Modern glassmorphism styles
β”‚       β”‚   └── login.css               # Login screen styles
β”‚       └── application.properties      # Configuration
β”œβ”€β”€ test/                               # Test files
└── db/                                 # Database scripts
    β”œβ”€β”€ schema.sql                      # Database schema
    β”œβ”€β”€ seed_demo.sql                   # Sample data
    └── sample_users.sql                # User accounts

πŸš€ Quick Start Guide

Prerequisites

Database Setup

  1. Create Database and User:

    CREATE DATABASE voltorio;
    CREATE USER 'voltorio_user'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON voltorio.* TO 'voltorio_user'@'localhost';
    FLUSH PRIVILEGES;
  2. Initialize Database Schema:

    mysql -u root -p voltorio < db/schema.sql
  3. Load Sample Data:

    mysql -u voltorio_user -p voltorio < db/seed_demo.sql

Configuration

Edit src/main/resources/application.properties:

# Database Configuration
db.url=jdbc:mysql://localhost:3306/voltorio
db.user=voltorio_user
db.password=your_password

# Application Settings
co2_factor=0.82
app.name=Voltoria
app.version=1.0.0

Build and Run

  1. Build the Project:

    mvn clean compile
  2. Run the Application:

mvn javafx:run
  1. Alternative - Package and Run:
    mvn clean package
    java --module-path "path/to/javafx/lib" --add-modules javafx.controls,javafx.fxml -cp target/classes com.ebg.MainApp

πŸ‘₯ User Accounts

Default Admin Account

  • Username: admin
  • Password: password
  • Access: Full system administration

Default Customer Accounts

  • Username: alice

  • Password: password

  • Role: Consumer

  • Username: bob

  • Password: password

  • Role: Consumer

🎯 Feature Walkthrough

1. Login System

  • Modern Login Interface: Clean, responsive design with glassmorphism effects
  • Role-based Redirection: Automatic routing to appropriate dashboard
  • Session Management: Secure login with automatic session handling

2. Admin Dashboard

  • Customer Management: Add, edit, and manage customer accounts
  • Usage Data Entry: Input electricity consumption data for customers
  • System Settings: Configure application parameters
  • Reports & Analytics: Generate comprehensive reports with charts
  • Voltage Monitoring: Real-time voltage spike detection

3. Customer Portal

  • Personalized Welcome: Dynamic welcome message with customer name
  • Voltage Monitoring: Real-time voltage status with color-coded indicators
  • Energy Forecast: AI-powered consumption predictions
  • Carbon Footprint: Environmental impact analysis
  • QR Payment: Modern UPI payment with QR code generation

4. Payment System

  • QR Code Generation: Automatic UPI payment link creation
  • Multiple Payment Methods: Support for various UPI apps
  • Payment Timer: Time-limited payment sessions
  • Transaction History: Complete payment tracking

πŸ”§ Advanced Features

Real-time Monitoring

  • Voltage Spike Detection: Automatic detection of voltage anomalies
  • Live Charts: Interactive LineCharts for data visualization
  • Status Indicators: Color-coded status indicators (Green/Yellow/Red)
  • Alert System: Custom-styled popup notifications

Data Analytics

  • Consumption Forecasting: AI-powered energy usage predictions
  • Weather Correlation: Analysis of weather impact on consumption
  • Cost Analysis: Detailed breakdown of electricity costs
  • Carbon Footprint: Environmental impact tracking

Modern UI/UX

  • Glassmorphism Design: Modern glass-like effects with transparency
  • Gradient Backgrounds: Beautiful color gradients throughout the app
  • Hover Effects: Interactive button animations
  • Responsive Layout: Adaptive design for different screen sizes
  • Consistent Typography: Professional font styling

πŸ›‘οΈ Security Features

  • Password Hashing: bcrypt encryption for secure password storage
  • Session Management: Secure user session handling
  • Input Validation: Comprehensive data validation
  • SQL Injection Prevention: Parameterized queries
  • Access Control: Role-based permissions

πŸ“Š Database Schema

Core Tables

  • users: User authentication and roles
  • customers: Customer information and accounts
  • bills: Billing data and payment history
  • consumption_readings: Electricity usage data
  • voltage_data: Voltage monitoring data
  • settings: Application configuration

Relationships

  • Users are linked to customers via customer_id
  • Bills are associated with customers
  • Consumption readings track usage over time
  • Voltage data provides real-time monitoring

🚨 Troubleshooting

Common Issues

  1. Database Connection Error:

    • Verify MySQL is running
    • Check database credentials in application.properties
    • Ensure database ebg exists
  2. JavaFX Runtime Error:

    • Ensure Java 17 is installed
    • Check JavaFX modules are available
    • Use mvn javafx:run instead of direct execution
  3. FXML Loading Error:

    • Verify FXML files are in src/main/resources/fxml/
    • Check controller class names match FXML references
    • Ensure all imports are correct
  4. CSS Parsing Warnings:

    • These are non-critical warnings about gradient syntax
    • Application will still function correctly
    • Can be ignored for development

Performance Optimization

  1. Database Optimization:

    • Use connection pooling (HikariCP)
    • Index frequently queried columns
    • Regular database maintenance
  2. Memory Management:

    • Monitor heap usage
    • Close resources properly
    • Use appropriate data structures

πŸ”„ Development Workflow

Adding New Features

  1. Create Model: Add domain model in com.ebg.model
  2. Create DAO: Implement data access in com.ebg.dao
  3. Create Service: Add business logic in com.ebg.service
  4. Create UI: Design FXML and controller in com.ebg.ui
  5. Add Styling: Update CSS in src/main/resources/styles

Testing

  1. Unit Tests: Test individual components
  2. Integration Tests: Test component interactions
  3. UI Tests: Test user interface functionality
  4. Database Tests: Test data operations

πŸ“ˆ Future Enhancements

  • Mobile App: React Native or Flutter mobile application
  • Web Interface: Spring Boot web application
  • API Integration: RESTful API for third-party integrations
  • Advanced Analytics: Machine learning for better predictions
  • IoT Integration: Real-time sensor data integration
  • Multi-language Support: Internationalization
  • Cloud Deployment: AWS/Azure cloud deployment options

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check the troubleshooting section
  • Review the demo documentation

πŸŽ‰ Acknowledgments

  • JavaFX Team: For the excellent UI framework
  • MySQL Team: For the robust database system
  • Maven Community: For the build automation tools
  • Open Source Contributors: For the various libraries used

Built with ❀️ using Java 17, JavaFX, and MySQL

Last updated: October 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages