{"id":26631039,"url":"https://github.com/ashesbloom/water-and-electricity-tracking-application","last_synced_at":"2026-02-02T21:43:20.874Z","repository":{"id":284092907,"uuid":"953785723","full_name":"ashesbloom/Water-and-Electricity-Tracking-application","owner":"ashesbloom","description":"Tracking water and electricity usage can help households and businesses manage their resources more effectively. This project aims to develop a water and electricity tracking app that monitors consumption, provides insights on usage patterns, and helps users optimize their resource consumption.","archived":false,"fork":false,"pushed_at":"2025-11-12T08:25:45.000Z","size":8050,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-12T10:21:01.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashesbloom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T04:30:46.000Z","updated_at":"2025-11-12T08:25:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"8cd54700-c1eb-44fc-b2b1-9b53d4807352","html_url":"https://github.com/ashesbloom/Water-and-Electricity-Tracking-application","commit_stats":null,"previous_names":["ashesbloom/water-and-electricity-tracking-application"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashesbloom/Water-and-Electricity-Tracking-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashesbloom%2FWater-and-Electricity-Tracking-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashesbloom%2FWater-and-Electricity-Tracking-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashesbloom%2FWater-and-Electricity-Tracking-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashesbloom%2FWater-and-Electricity-Tracking-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashesbloom","download_url":"https://codeload.github.com/ashesbloom/Water-and-Electricity-Tracking-application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashesbloom%2FWater-and-Electricity-Tracking-application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29021031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-24T14:39:22.595Z","updated_at":"2026-02-02T21:43:20.847Z","avatar_url":"https://github.com/ashesbloom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GridSync\n\nA web application for AI‑enhanced tracking of water (L) and electricity (kWh) usage. GridSync helps users log daily readings, visualize consumption patterns, and receive insights to optimize resource use.\n\n## Table of Contents\n1. [Overview](#overview)\n2. [Core Features](#core-features)\n3. [Technology Stack](#technology-stack)\n4. [Project Structure](#project-structure)\n5. [Installation \u0026 Setup](#installation--setup)\n6. [Operational Guide](#operational-guide)\n7. [Future Enhancements](#future-enhancements)\n8. [Contribution Guidelines](#contribution-guidelines)\n\n## Overview\nGridSync unifies manual data entry with AI‑driven recommendations, promoting cost savings and sustainability through detailed consumption insights.\n\n## Core Features\n- **Authentication:** Secure registration, login, hashed passwords, session management.  \n- **Usage Input:** Timestamped water and electricity readings via `add_usage.php`.  \n- **Dashboard:** Interactive charts (Chart.js) showing hourly/daily usage (`electTodayUse.php`, `waterTodayUse.php`).  \n- **Profile Management:** Username/password updates and avatar uploads (`profile.php` → `htdocs/asset/uploads/`).  \n- **AI Assistant:** Chat interface backed by Node.js for usage analysis (`chatbot.php`, `ai_backend/`).  \n- **Theming:** Light/dark mode toggle stored in `localStorage`.  \n- **3D Globe:** Placeholder Three.js visualization in `Statistics.php`.  \n- **MVC‑Style Backend:** Controllers in `src/controllers/` for maintainable code.\n\n## Technology Stack\n- **Backend (PHP):** PHP 8.x, PDO, MySQL/MariaDB, Composer (optional)  \n- **AI Backend:** Node.js 16+, Express, dotenv, OpenAI (or equivalent)  \n- **Frontend:** HTML5, Tailwind 3.x, Vanilla JS (ES6+), Chart.js, Three.js  \n- **Build Tools:** npm, Tailwind CLI  \n- **Server:** Apache/Nginx with URL rewriting\n\n## Project Structure\n```\n. ├── ai_backend/ # Node.js AI chatbot service\n│ ├── server.js\n│ ├── package.json\n│ └── .env.example # env template for API keys \u0026 PORT\n├── config/ # Global configuration\n│ ├── database.php # PDO connection setup\n│ └── schema.sql # users \u0026 usage_records tables\n├── htdocs/ # Public web root\n│ ├── index.php # Front controller\n│ ├── asset/ # Static assets\n│ │ ├── logo.png\n│ │ └── uploads/ # User‐uploaded avatars\n│ ├── views/ # PHP templates\n│ │ ├── partials/ # headers, footers, etc.\n│ │ └── *.php # page‑specific files\n│ ├── js/ # Frontend scripts\n│ ├── css/ # Compiled CSS (Tailwind output)\n│ └── .htaccess # URL rewrite rules\n├── src/ # Application source (MVC)\n│ ├── controllers/ # Request handlers\n│ ├── models/ # Data layer (optional)\n│ ├── input.css # Tailwind source\n│ └── output.css # Tailwind build artifact\n├── vendor/ # Composer dependencies\n├── composer.json # PHP package manifest\n├── package.json # Node.js/Tailwind manifest\n└── README.md # Project documentation\n```\n\n# Installation \u0026 Setup\n### Clone and PHP backend\n```bash\ngit clone https://github.com/your-username/gridsync.git\ncd gridsync\ncomposer install                     # if needed\nmysql -u user -p gridsync_db \u003c config/schema.sql\n```\n### AI backend\n```bash\ncd ai_backend\nnpm install\ncp .env.example .env                # configure API_KEY and PORT\nnpm start\n```\n### Tailwind CSS (optional)\n```bash\nnpm install                         # in project root\nnpx tailwindcss -i ./src/input.css -o ./src/output.css --watch\n```\n### Permissions\n```bash\nchmod -R 755 htdocs/asset/uploads/\n```\n## Operational Guide\n\n- **Register** at `/signup` and **Login** at `/signin`.\n- **Add Usage**: Use the *Add Usage* form to log daily usage readings.\n- **Dashboard**: Visit `/homepage` or *Statistics* for graphical usage data.\n- **Chatbot**: Chat with the AI via `/chatbot` for smart energy insights.\n- **Profile**: Update your user info on `/profile`.\n- **Theme**: Toggle light/dark mode from the header.\n\n---\n\n## Future Enhancements\n\n- Bind AI chatbot to actual usage data for tailored insights.\n- Implement backend logic for *Contact* and *Feedback* forms.\n- Fetch live news or updates from external APIs.\n- Replace placeholder globes with live energy or usage stats.\n- Build detailed usage breakdown and goal tracking pages.\n- Add password recovery via email or OTP.\n- Improve validation, error handling, and testing workflows.\n- Persist goal-setting data in the database for continuity.\n\n---\n\n## Contribution Guidelines\n\nWe welcome contributions from the community!\n\n- Fork the repository.\n- Create a new feature branch.\n- Open a pull request describing your changes.\n- Report bugs or suggest features through the [issue tracker](../../issues).\n\nThanks for helping us improve!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashesbloom%2Fwater-and-electricity-tracking-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashesbloom%2Fwater-and-electricity-tracking-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashesbloom%2Fwater-and-electricity-tracking-application/lists"}