Skip to content

URAYUSHJAIN/GenShakti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GenShakti Logo

GenShakti

AI-Powered Renewable Energy Planning & Optimization Platform
Empowering Communities with Smart Site Selection, Carbon Modeling, and Real-Time Energy Insights


๐ŸŒ About GenShakti

GenShakti is an AI-driven web platform aimed at solving the problem of unreliable and unsustainable energy access in communities around the world. By leveraging advanced geospatial analysis and machine learning, GenShakti provides optimal site recommendations, carbon emission simulations, and real-time integration of environmental and energy data.

๐Ÿ”ฅ Aligns with UN SDG 7 (Affordable and Clean Energy) & SDG 13 (Climate Action)

๐Ÿš€ Features

  • ๐Ÿง  Smart Site Selection โ€” AI-powered renewable energy site recommendations with interactive map visualization. Validates coordinates for India region with real-time error handling.
  • ๐Ÿ—บ Personalized Energy Roadmaps โ€” Generate 7-10 step action plans to reduce electricity bills with cost estimates in Indian currency (โ‚น).
  • ๐ŸŒฑ Carbon Modeling โ€” Estimate and visualize carbon emission reductions with detailed analytics.
  • ๐Ÿ“Š Real-Time Data Integration โ€” Weather and energy usage data for accurate insights and forecasting.
  • ๐Ÿ’ก Sustainable Suggestions โ€” Get 5 personalized energy-saving tips based on transport, energy, and waste inputs.
  • ๐Ÿ“ Geospatial AI โ€” Map-based location analytics using Leaflet with coordinate validation and bounds checking.
  • ๐Ÿ› ๏ธ Cost Savings Dashboard โ€” Track investment planning and savings with AI-generated recommendations.
  • โšก Renewable Capacity Analysis โ€” Real-time recommendations for solar, wind, hydro, geothermal, and biomass energy sources.
  • ๐Ÿ”„ Visual Roadmaps โ€” Interactive flow diagrams using ReactFlow for energy transition planning.

๐Ÿ”ง Tech Stack

Technology Purpose
React 18.3.1 + Vite 6.0.1 Frontend framework with hot reload
Tailwind CSS Styling and UI
JavaScript (ES6+) Core programming
HuggingFace Inference API AI-powered recommendations using Llama-3.2-3B-Instruct
Leaflet + React Leaflet Interactive map visualization
ReactFlow Visual roadmap generation
Firebase Deployment and hosting

โš™๏ธ Setup & Installation

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager
  • HuggingFace API key (Get one here)

Installation Steps

  1. Clone the repository

    git clone https://github.com/URAYUSHJAIN/genshkati2.0.git
    cd genshkati2.0
  2. Install dependencies

    npm install
  3. Configure environment variables

    Create a .env file in the root directory:

    VITE_HF_API_KEY=your_huggingface_api_key_here

    โš ๏ธ Important: Never commit .env to version control. It's already in .gitignore.

  4. Start development server

    npm run dev

    The app will be available at http://localhost:5173

  5. Build for production

    npm run build

    Output will be in the dist/ directory.


๐Ÿ— Project Structure

GenShakti/
โ”œโ”€โ”€ public/              # Static assets
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ””โ”€โ”€ img/        # Images and logos
โ”‚   โ”œโ”€โ”€ components/     # Reusable UI components (Header, Footer)
โ”‚   โ”œโ”€โ”€ pages/          # Feature pages
โ”‚   โ”‚   โ”œโ”€โ”€ ai.jsx                        # Energy reduction roadmap
โ”‚   โ”‚   โ”œโ”€โ”€ siteSelection.jsx             # Smart site selection with maps
โ”‚   โ”‚   โ”œโ”€โ”€ Sustainable-Suggestions.jsx   # Sustainability recommendations
โ”‚   โ”‚   โ”œโ”€โ”€ Roadmap.jsx                   # Visual energy roadmap
โ”‚   โ”‚   โ”œโ”€โ”€ Renewable Capacity.jsx        # Energy capacity dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ Cost Saving.jsx               # Cost analysis
โ”‚   โ”‚   โ””โ”€โ”€ ...more pages
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ””โ”€โ”€ aiProvider.js                 # Centralized AI utility (HuggingFace)
โ”‚   โ”œโ”€โ”€ App.jsx         # Main app component with routing
โ”‚   โ””โ”€โ”€ main.jsx        # Entry point
โ”œโ”€โ”€ .env                # Environment variables (not in git)
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ vite.config.js      # Vite config with HF API proxy
โ””โ”€โ”€ package.json

Key Files

  • src/utils/aiProvider.js: Centralized AI utility using HuggingFace's Llama-3.2-3B-Instruct model for all AI-powered features
  • vite.config.js: Includes proxy configuration to handle CORS during development
  • .env: Stores sensitive API keys (VITE_HF_API_KEY)

๐Ÿงญ Process Flow

  1. User Input โ€“ Energy type, location, usage, etc.
  2. AI Analysis โ€“ Optimal site detection using geospatial data.
  3. Roadmap Generation โ€“ Electricity bill reduction strategies.
  4. Carbon Modeling โ€“ Emissions simulation and dashboard.
  5. Sustainability Insights โ€“ Tailored green energy tips.

๐ŸŒ Live Demo & Media


๐Ÿ”ฎ Future Scope

  • ๐Ÿ“ฑ Flutter Mobile App with Google Maps & real-time energy insights.
  • ๐ŸŒ Expanded Energy Types: Enhanced hydro & biomass modeling.
  • ๐Ÿง  Advanced AI Models: Experiment with larger LLMs for more precise recommendations.
  • ๐Ÿ  IoT Integration: Smart home devices for automated energy optimization.
  • ๐Ÿค Strategic Partnerships: Energy firms, governments, NGOs for wider adoption.
  • ๐ŸŒ Multilingual Support: Reach non-English speaking communities.
  • ๐ŸŽฎ Gamification: Reward users for achieving sustainability milestones.
  • ๐Ÿ“ˆ Analytics Dashboard: Historical tracking and predictive modeling.
  • ๐Ÿ”’ User Authentication: Save and track personal energy goals over time.

๐Ÿšจ Troubleshooting

API Issues

  • 401 Unauthorized: Check if VITE_HF_API_KEY is correctly set in .env
  • CORS Errors: Make sure Vite dev server is running (proxy handles CORS)
  • Model Errors: The app uses meta-llama/Llama-3.2-3B-Instruct which is deployed on HuggingFace router

Build Issues

  • Clear cache: rm -rf node_modules dist && npm install
  • Check Node version: node -v (should be 18.x or higher)

Map Not Loading

  • Verify Leaflet CSS is included in your HTML
  • Check browser console for coordinate validation errors

๐Ÿ“ Environment Variables

Variable Description Required
VITE_HF_API_KEY HuggingFace API key for AI features โœ… Yes

๐Ÿ’ก Tip: For production deployment on Vercel/Netlify, add environment variables in their dashboard.


๐Ÿš€ Deployment

Vercel/Netlify

  1. Push code to GitHub
  2. Connect repository to Vercel/Netlify
  3. Add environment variable: VITE_HF_API_KEY
  4. Build command: npm run build
  5. Output directory: dist

Firebase (Current)

npm run build
firebase deploy

๐Ÿ‘ฅ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is open source and available for educational and research purposes.


๐Ÿ™ Acknowledgments

  • HuggingFace for providing the Inference API
  • React and Vite communities for excellent tooling
  • Leaflet for map visualization capabilities
  • All contributors and supporters of sustainable energy initiatives

About

GenShakti is an AI-driven tool for smart renewable energy planning, carbon modeling, and sustainable living insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors