Skip to content

AnmolBansalDEV/UIA-hackathon-project

Repository files navigation

UNESCO India Africa Hackathon - AquaSavvy

About UNESCO India Africa Hackathon

The UNESCO INDIA – AFRICA Hackathon is an annual 36 hours event that brings together students, educators, teachers, and the research community of India and its African partners to tackle the common challenges faced by their countries and serves as a facilitator for cultural amalgamation.

The UNESCO INDIA – AFRICA Hackathon provides a suitable platform allowing young innovators to come together and find solutions for social, environmental and technical problems faced by the collaborating nations. It serves as the foundation for creating potential start-ups with the potential to transform the world. It allows the participating students to unleash their creativity and explore new technologies to solve real-world problems under the guidance of experts - thus, spearheading business innovation in the modern world.

Problem Statement: Block chain for improved water resource management. (Decentralised water reuse system Blockchain for improved water resource management.)

By 2050 nearly 70 % of the world’s population will reside in cities. More than 90 % of this urban growth is projected to occur in emerging markets where large-scale, centralized infrastructure may not be feasible or advisable. whether due to financial constraints governance challenges and climate variability. Decentralized solutions can play a critical role in these settings to complement traditional approaches and expand access to safe water and sanitation services. Blockchain for improved water resource management. By providing a secure transparent and distributed ledger to record transactions between parties, blockchain-based technology fundamentally could transform the way water resources are managed and traded. First and foremost, harnessing this capability could enable everyone from households, industry consumers, water managers, and policymakers to access the same data on water quality and quantity and make more informed decisions. Such transparency would help inform consumer decisions around went to conserve or use water. In terms, it could help prevent corrupt behavior in situations where there may ban e incentive for local authorities to temper with or withhold water quality data.

Blockchain technology also could support peer-to-peer trading of water rides in a given basin, empowering water users who have enough or are willing to share their excess resources with others in the area to do so 24/7 without relying on a centralized authority/system. Imagine a scenario where farmers in the same water basin could decide to trade their allocation based on the latest weather data, crop rises, market trends, and long-term climate trends.

Solution: AquaSavvy - Empowering Water Resource Management with Blockchain and GeoMap

Introducing AquaSavvy, a revolutionary water resource visualization application designed to address the global challenge of tracking and managing water availability. Our platform provides a comprehensive solution for users to monitor water resources worldwide and facilitates the trading of water reserves. Leveraging the power of blockchain technology, we mint water reserves as non-fungible tokens (NFTs), enabling transparent and secure tracking of the entire water cycle.

Key Features:

  1. Global Water Tracking: AquaSavvy allows users to track water reserves from their origin, such as excavation from wells, to their destinations, including water treatment plants and aqueducts. The entire journey of water can now be traced and monitored through our blockchain-powered system.
  2. GeoMap Visualization: Our platform incorporates a GeoMap feature that provides a holistic view of available water reserves for sale. This data empowers governments to gain insights into water availability in different regions, aiding them in making informed decisions and formulating water management plans.
  3. Scalability and Collaboration: AquaSavvy is designed to work worldwide, benefiting from the inherent scalability of blockchain technology. We envision a seamless collaboration with governments worldwide, enabling efficient water resource management across borders.

Join us on AquaSavvy and be a part of the water management revolution. Together, we can ensure a sustainable and prosperous future for all, where water resources are managed responsibly and transparently.

playground user interface

Team ✨


Anmol Bansal
πŸ“– πŸ’»

Devyani Toshniwal
πŸ“– πŸ’»

FOFOU TCHINDA LEONEL
πŸ“– πŸ’»

Rapelang Mathibe
πŸ“– πŸ’»

Maria Marta Okomo Ovono Ada
πŸ“– πŸ’»

Tibutsile Dlamini
πŸ“– πŸ’»

Prerequisites πŸ‘¨β€πŸ’»

Install Node JS

Refer to https://nodejs.org/en/ to install nodejs

Cloning and Running the Application in local πŸ’»

Clone the project in localhost

git clone https://github.com/AnmolBansalDEV/UIA-hackathon-project.git

Install all the npm packages. Go into the web folder and type the following command to install all npm packages

npm install

In order to run the application in development mode type the following command

npm start

The Application Runs on localhost:3000

To deploy a new smart contract

Navigate to the main project folder in a seperate terminal. Then deploy the contract using

npx hardhat run scripts/deploy.js --network sepolia

If you don't want to deploy the contract rather just compile it then

npx hardhat compile

Setting up the env variables

For the project, we're using the Sepolia testnet for deploying the contract, for it to work please set up your achemy account from https://www.alchemy.com/ , your metamask wallet for interacting with the Dapp, also a Pinata account for uploading assets to IPFS(InterPlanetary File System). After this, paste the following in a .env file in the root of your project with your credentials.

REACT_APP_ALCHEMY_API_URL=<YOUR ALCHEMY API URL>
REACT_APP_PRIVATE_KEY=<YOUR METAMASK PRIVATE KEY>
REACT_APP_PINATA_KEY=<YOUR PINATA KEY>
REACT_APP_PINATA_SECRET=<YOUR PINATA SECRET>

How we built it πŸ§‘β€πŸ’»

We are proud to present AquaSavvy, built with a blend of cutting-edge technologies to create a powerful and seamless user experience.

Frontend

For the frontend, we utilized the popular Create React App (CRA) framework, enhanced further with React App Rewired to fine-tune CRA and significantly reduce build times. React served as the foundation for our user interface, enabling smooth interactions and dynamic content presentation.

Backend

In the backend, we leveraged Hardhat, a robust web3 Ethereum development framework. This provided us with the tools and flexibility required to build a secure and efficient backend for AquaSavvy. To connect with the Sepolia testnet, we integrated Alchemy rpc, ensuring reliable and real-time interactions with the Ethereum network.

Smart Contract Integration

To link the frontend and backend seamlessly, we employed ethers.js, a powerful library for Ethereum interactions. This allowed us to integrate smart contracts seamlessly into our application, enabling secure water reserve trading and management.

Image Storage on IPFS

To ensure persistent and decentralized image storage, we integrated Pinata with our application. By storing images on IPFS (InterPlanetary File System), we guarantee that users can retrieve these images even if their addresses on the internet change.

Map Integration

To provide a visual representation of water reserves, we integrated the React Leaflet library, offering an interactive map with markers at the locations of water reserves. This empowers users to easily locate and explore available water resources.

Auto Suggestions (Currently Disabled)

We implemented auto suggestions using the Google Maps API to enhance user convenience. However, due to the expiry of our Google Cloud credits, this feature is temporarily disabled. We plan to reinstate it in the future to enrich user experience further.

AquaSavvy stands as a testament to the potential of innovation when powered by advanced technologies and creative problem-solving. Our team's dedication and collaboration have made this project a reality, and we are excited to share it with the world.

Challenges we ran into πŸ₯Ί

Building AquaSavvy presented us with various hurdles, each of which we tackled with determination and teamwork.

Novelty in DApp Development

None of us had prior experience with building a DApp, making the journey an exciting but challenging endeavor. While some team members were familiar with the development process, this was our first attempt at creating a decentralized application.

Custom Smart Contract Creation

Given the uniqueness of our DApp, we needed a custom smart contract tailored to our specific requirements. Designing and developing this smart contract posed its own set of challenges, but it also allowed us to create a solution perfectly aligned with our vision.

Integration with Metamask

Integrating the frontend with Metamask, a critical component for interacting with the Ethereum network, proved to be a formidable task. Numerous bugs emerged during the process, requiring thorough debugging and testing to ensure seamless connectivity.

Contract Deployment Struggles

Deploying the smart contract had its share of obstacles. The available faucets for testing had limitations, and we frequently encountered exhaustion of test Ether while deploying and testing the contract. This necessitated creative problem-solving and meticulous management of resources.

Google Cloud API Key Retrieval

Enabling location suggestions on our map required an API key from Google Cloud. However, obtaining this key presented a challenge, as none of us had billing set up with Google Cloud, which typically requires a credit card.

Despite these challenges, our team remained resilient and persevered through adversity. AquaSavvy stands as a testament to our commitment to innovation and a testament to the power of teamwork.

Accomplishments that we're proud of 😎

Throughout the challenging yet exhilarating 36-hour hackathon, AquaSavvy achieved remarkable accomplishments that fill our team with immense pride and satisfaction.

Diverse Team Collaboration

The beauty of our team lay in its diversity. Hailing from different African countries, each member brought unique perspectives and experiences to the table. Some team members were seasoned coders, while others were new to the world of programming. Additionally, language barriers added an extra layer of complexity, as not all team members were fluent in English. However, these differences turned into our greatest strengths as we fostered an environment of open communication and collaboration. Despite the initial challenges, we embraced our differences and worked harmoniously, harnessing each other's strengths and creativity.

Triumph in the Prestigious Hackathon

Against formidable odds, AquaSavvy emerged victorious in the fiercely competitive hackathon. Our unwavering dedication, relentless determination, and boundless passion for our project set us apart. The challenges we encountered only fueled our desire to excel, and with unwavering determination, we navigated the obstacles that came our way. We truly embodied the spirit of innovation and teamwork, and it was this spirit that propelled us to the top.

Awestruck Judges and Captivating Presentation

The culmination of our efforts was showcased in our awe-inspiring final presentation. With confidence and enthusiasm, we unveiled AquaSavvy to the judges, leaving them spellbound. The live demo of our application demonstrated the seamless integration of features and functionalities, impressing the judges with its smooth performance and impressive user experience. Our presentation was more than just a pitch; it was a reflection of our passion, hard work, and innovative thinking.

Meeting and Exceeding Criteria

AquaSavvy's live demo and presentation exceeded most of the criteria set forth by the hackathon organizers. From the elegant user interface to the seamless interaction with the Ethereum network through Metamask, our application showcased a level of sophistication that earned us accolades from the judges and fellow participants alike.

In conclusion, our journey with AquaSavvy exemplifies the power of unity, determination, and innovation. We proved that collaboration knows no boundaries, that language barriers cannot hinder creativity, and that passion can conquer any obstacle. AquaSavvy is not just a project; it is a testament to the extraordinary things that can be achieved when individuals come together, driven by a shared vision and purpose. We are immensely proud of our accomplishments and are inspired to continue pushing the boundaries of technology and making a positive impact on the world.

Built With πŸ’•

  • React
  • Node.js
  • JavaScript
  • Solidity
  • Hardhat (Ethereum development framework)
  • Alchemy (Ethereum RPC)
  • IPFS (InterPlanetary File System)
  • ethers.js (Ethereum library)
  • Google Cloud Platform
  • React Leaflet (Interactive map library)
  • Vercel (Deployment)
  • Git (Version control)

What's Next for AquaSavvy πŸš€

We're in talks with UNESCO and the Government of India to deploy AquaSavvy on a national scale. With their guidance, we aim to evolve AquaSavvy into a startup, fostering responsible water management and making a positive environmental impact. Stay tuned for our exciting journey ahead! 🌊