Blockchain-Based-Water-Quality-Monitoring-System

Live The Code 3.O Global Hackathon: Blockchain-Based Water Quality Monitoring System

WEB3

Team: The CodeRunners

Brief Explanation of Idea

Newly Integrated Features

Technical Architecture

  1. Smart Contract for Device Authorization: Manages the registration of IoT devices on the blockchain, controlled by regulators.

  2. Tampering Detection: Applies EWMA to forecast water usage and identifies deviations. Alerts are generated for unusual patterns.

  3. Smart Contracts for Water Quality Compliance: Enforces regulatory criteria on water processing, ensuring adherence to set standards.

  4. Data Storage on Blockchain: Provides immutable and transparent storage for water usage data.

  5. Tampering Alerts and Notifications: Automated alerts via SMS and email for detected tampering, supported by a tampering probability indicator.

Tech Stack

Screenshots

logo

Real-Time Monitoring Dashboard

Real-Time Monitoring Dashboard

Tampering Probability Indicator

Tampering Probability Indicator

Visual Tampering Indicator

Visual Tampering Indicator

Email and SMS Alerts

Email and SMS Alerts

Water Quality Dashboard ... ![]

How to Run the Project

  1. Clone the Repository
    git clone <repository-url>
    cd project-directory
    
  2. Install Dependencies
    npm install
    
  3. Set Up Environment Variables
    Create a .env file in the root of the project and add the following:
    TWILIO_ACCOUNT_SID=<Your-Twilio-Account-SID>
    TWILIO_AUTH_TOKEN=<Your-Twilio-Auth-Token>
    TWILIO_PHONE_NUMBER=<Your-Twilio-Phone-Number>
    SENDGRID_API_KEY=<Your-SendGrid-API-Key>
    ALERT_EMAIL_RECIPIENT=<Email-Recipient>
    
  4. Set Up Twilio for SMS Alerts
    • Create a Twilio Account.
    • Obtain your Account SID, Auth Token, and a Twilio Phone Number.
    • Add these details to the .env file.
  5. Set Up SendGrid for Email Alerts
    • Create a SendGrid Account.
    • Generate an API key from the SendGrid dashboard.
    • Add the API key and recipient email to the .env file.
  6. Run the Application
    npm run dev
    
  7. Access the Application Open your browser and navigate to http://localhost:8001 to view the real-time dashboard and manage tampering detection and alerts.

  8. Generate Reports
    npm run generate-report
    

Implementation Challenges

Contributors