Skip to content

Latest commit

Β 

History

History
52 lines (45 loc) Β· 1.72 KB

File metadata and controls

52 lines (45 loc) Β· 1.72 KB

Energy Monitoring System (Backend)

A robust backend system built with CodeIgniter 4 to monitor energy consumption, predict bills using Gemini AI, and provide energy-saving tips.

πŸš€ Features

  • Real-time Monitoring: Collects and stores sensor data (current, voltage, temperature).
  • AI-Powered Insights: Uses Google Gemini AI to predict monthly electricity bills and generate personalized energy-saving tips.
  • Firebase Integration: Synchronizes data seamlessly with Firebase for real-time updates.
  • RESTful API: Provides a clean and documented API for frontend consumption.
  • Automated Sync: Support for cron-job based synchronization of sensor data.

πŸ› οΈ Tech Stack

  • Framework: CodeIgniter 4
  • Database: MySQL
  • AI Integration: Google Gemini API
  • External Services: Firebase
  • Language: PHP 8.2+

πŸ“‚ Documentation

βš™οΈ Setup Instructions

  1. Clone the repository:
    git clone https://github.com/iMuhammadAbdullahAwan/backend-code.git
    cd backend-code
  2. Install dependencies:
    composer install
  3. Configure Environment:
    • Copy env to .env.
    • Set your app.baseURL.
    • Configure database.default settings.
    • Add your GEMINI_API_KEY and FIREBASE_URL.
    • Set SYNC_SECRET for protected endpoints.
  4. Run Migrations:
    php spark migrate
  5. Start Development Server:
    php spark serve

🀝 Contributing

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

πŸ“„ License

This project is licensed under the LICENSE file.