{"id":49592655,"url":"https://github.com/siyabuilds/carbon-footprint-logger","last_synced_at":"2026-05-04T01:39:35.439Z","repository":{"id":300727896,"uuid":"1006910815","full_name":"siyabuilds/carbon-footprint-logger","owner":"siyabuilds","description":"Full-stack carbon footprint tracker with auth, user logs, and community averages.","archived":false,"fork":false,"pushed_at":"2025-09-26T09:07:05.000Z","size":811,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-04T01:39:22.294Z","etag":null,"topics":["axios","express","full-stack","mongodb","vitejs"],"latest_commit_sha":null,"homepage":"https://carbontrackr.vercel.app","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siyabuilds.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-23T07:19:21.000Z","updated_at":"2026-01-29T12:06:00.000Z","dependencies_parsed_at":"2025-08-27T20:21:20.103Z","dependency_job_id":"93ae1679-fad9-48a7-923f-9e34802d71b0","html_url":"https://github.com/siyabuilds/carbon-footprint-logger","commit_stats":null,"previous_names":["siyabuilds/carbon-footprint-tracker","siyabuilds/carbon-footprint-logger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siyabuilds/carbon-footprint-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyabuilds%2Fcarbon-footprint-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyabuilds%2Fcarbon-footprint-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyabuilds%2Fcarbon-footprint-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyabuilds%2Fcarbon-footprint-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siyabuilds","download_url":"https://codeload.github.com/siyabuilds/carbon-footprint-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyabuilds%2Fcarbon-footprint-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: 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":["axios","express","full-stack","mongodb","vitejs"],"created_at":"2026-05-04T01:39:34.840Z","updated_at":"2026-05-04T01:39:35.415Z","avatar_url":"https://github.com/siyabuilds.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Banner + TL;DR Intro --\u003e\n\u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026color=gradient\u0026customColorList=12\u0026height=120\u0026section=header\u0026text=CarbonTrackr\u0026fontSize=40\u0026fontColor=fff\u0026animation=fadeIn\" width=\"100%\" alt=\"CarbonTrackr Wave Banner\"/\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n## 🌱 CarbonTrackr - Your Personal Carbon Footprint Logger\n\n\u003e **TL;DR:**  \n\u003e Track, analyze, and reduce your carbon footprint with our sleek full-stack web app! Real-time data visualization, streak tracking, reduction targets, and personalized tips to help you become more eco-friendly.\n\u003e\n\u003e _Let's make the planet greener, one log at a time!_ 🌍\n\n\u003c/div\u003e\n\n---\n\n\u003c!-- Badges --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/🌱-Carbon_Tracking-32CD32?style=for-the-badge\u0026logo=leaf\u0026logoColor=white\" height=\"30\" alt=\"Carbon Tracking Badge\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/⚡-Vite_Powered-646CFF?style=for-the-badge\u0026logo=vite\u0026logoColor=white\" height=\"30\" alt=\"Vite Badge\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/🚀-TypeScript_Backend-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\" height=\"30\" alt=\"TypeScript Badge\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/📊-Real_Time_Charts-FF6384?style=for-the-badge\u0026logo=chartdotjs\u0026logoColor=white\" height=\"30\" alt=\"Charts Badge\"/\u003e\n\u003c/p\u003e\n\n---\n\n\u003cimg src=\"https://readme-typing-svg.herokuapp.com?font=Fira+Code\u0026size=28\u0026pause=1000\u0026color=32CD32\u0026center=true\u0026vCenter=true\u0026width=900\u0026lines=🌍+Track+Your+Carbon+Footprint;📊+Visualize+Environmental+Impact;🎯+Set+%26+Achieve+Reduction+Goals;🏆+Build+Sustainable+Habits;⚡+Real-time+WebSocket+Updates;🔥+Full-stack+TypeScript+Power\" alt=\"Typing Animation\"/\u003e\n\n---\n\n## 🎮 Featured Project Overview\n\n**CarbonTrackr** is a modern, full-stack web application designed to help users track, analyze, and reduce their carbon footprint. Built with modern technologies and a focus on user experience and security, it makes environmental responsibility engaging and achievable.\n\n---\n\n## 🚀 Epic Features \u0026 Superpowers\n\n\u003cimg align=\"right\" src=\"https://user-images.githubusercontent.com/74038190/229223263-cf2e4b07-2615-4f87-9c38-e37600f8381a.gif\" width=\"300\" alt=\"Features Animation\"/\u003e\n\n```yaml\nauthentication: \"🔐 Secure JWT-based login \u0026 registration\"\nactivity_logging: \"📝 Track daily carbon-producing activities\"\ndata_visualization: \"📊 Interactive Chart.js powered dashboards\"\nreduction_targets: \"🎯 Set \u0026 track weekly/monthly reduction goals\"\nstreak_tracking: \"🔥 7-day activity streaks \u0026 achievements\"\nleaderboard: \"🏆 Compete with others for lowest emissions\"\nreal_time_tips: \"💡 WebSocket-powered personalized suggestions\"\nweekly_summaries: \"📈 Automated weekly analysis \u0026 insights\"\ncategory_filtering: \"🔍 Filter by Transport, Food, Energy, etc.\"\nresponsive_design: \"📱 Beautiful UI that works everywhere\"\n```\n\n---\n\n## 🖥️ Terminal Mode - Project Architecture\n\n```bash\n┌─[developer@carbontrackr]─[~/carbon-footprint-logger]\n└──╼ $ tree -I node_modules\n📁 carbon-footprint-logger/\n├── 📁 client/                    # Frontend (Vite + Vanilla JS)\n│   ├── 📄 API_DOCS.md            # Complete API documentation\n│   ├── 📄 package.json           # Frontend dependencies\n│   ├── 📄 index.html             # Main HTML template\n│   ├── 📁 public/                # Static assets\n│   └── 📁 src/                   # Source magic happens here\n│       ├── 📄 main.js            # App entry point \u0026 initialization\n│       ├── 📄 activity-data.js   # Emission factors database\n│       ├── 📄 calculations.js    # CO₂ calculation engine\n│       ├── 📄 api.js             # Axios instance \u0026 interceptors\n│       ├── 📄 auth.js            # Authentication logic\n│       ├── 📄 authEvents.js      # Auth form handlers\n│       ├── 📄 logging.js         # CRUD operations \u0026 API calls\n│       ├── 📄 ui.js              # DOM manipulation \u0026 rendering\n│       ├── 📄 chart.js           # Chart.js integration\n│       ├── 📄 filter.js          # Category filtering\n│       ├── 📄 form.js            # SweetAlert2 modals\n│       ├── 📄 socket.js          # WebSocket management\n│       ├── 📄 targets.js         # Reduction targets logic\n│       └── 📁 utils/             # Helper utilities\n└── 📁 server/                    # Backend (Node.js + TypeScript)\n    ├── 📄 package.json           # Backend dependencies\n    ├── 📄 tsconfig.json          # TypeScript configuration\n    ├── 📄 docker-compose.yml     # Docker setup\n    ├── 📄 Dockerfile             # Container definition\n    ├── 📁 public/                # API documentation site\n    └── 📁 src/                   # Server-side powerhouse\n        ├── 📄 server.ts          # Express app \u0026 socket setup\n        ├── 📁 db/                # Database initialization\n        ├── 📁 middleware/        # Auth middleware\n        ├── 📁 models/            # MongoDB schemas\n        ├── 📁 routes/            # API endpoint definitions\n        ├── 📁 sockets/           # WebSocket event handlers\n        ├── 📁 jobs/              # Scheduled weekly analysis\n        └── 📁 utils/             # Server utilities\n\n┌─[developer@carbontrackr]─[~/status]\n└──╼ $ git status\n On branch main\n 🔥 Status: Production ready \u0026 actively maintained\n 📈 Features: Activity logging, targets, real-time tips\n 🎯 Next: Advanced analytics, AI insights\n```\n\n---\n\n## 🛠️ Tech Arsenal \u0026 Superpowers\n\n### Frontend Magic ✨\n\n![JavaScript](https://img.shields.io/badge/JavaScript-%23F7DF1E.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=black)\n![Vite](https://img.shields.io/badge/Vite-%23646CFF.svg?style=for-the-badge\u0026logo=vite\u0026logoColor=white)\n![Chart.js](https://img.shields.io/badge/Chart.js-%23FF6384.svg?style=for-the-badge\u0026logo=chartdotjs\u0026logoColor=white)\n![SweetAlert2](https://img.shields.io/badge/SweetAlert2-%23E91E63.svg?style=for-the-badge\u0026logoColor=white)\n![Axios](https://img.shields.io/badge/Axios-%235A29E4.svg?style=for-the-badge\u0026logo=axios\u0026logoColor=white)\n![CSS3](https://img.shields.io/badge/CSS3-%231572B6.svg?style=for-the-badge\u0026logo=css3\u0026logoColor=white)\n![HTML5](https://img.shields.io/badge/HTML5-%23E34F26.svg?style=for-the-badge\u0026logo=html5\u0026logoColor=white)\n\n### Backend Power 🔧\n\n![TypeScript](https://img.shields.io/badge/TypeScript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Node.js](https://img.shields.io/badge/Node.js-%23339933.svg?style=for-the-badge\u0026logo=nodedotjs\u0026logoColor=white)\n![Express](https://img.shields.io/badge/Express-%23000000.svg?style=for-the-badge\u0026logo=express\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-%2347A248.svg?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n![Socket.io](https://img.shields.io/badge/Socket.io-%23010101.svg?style=for-the-badge\u0026logo=socketdotio\u0026logoColor=white)\n![JWT](https://img.shields.io/badge/JWT-%23000000.svg?style=for-the-badge\u0026logo=jsonwebtokens\u0026logoColor=white)\n\n### DevOps \u0026 Tools 🚀\n\n![Docker](https://img.shields.io/badge/Docker-%232496ED.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![Git](https://img.shields.io/badge/Git-%23F05032.svg?style=for-the-badge\u0026logo=git\u0026logoColor=white)\n![Linux](https://img.shields.io/badge/Linux-%23FCC624.svg?style=for-the-badge\u0026logo=linux\u0026logoColor=black)\n![VS Code](https://img.shields.io/badge/VS%20Code-%23007ACC.svg?style=for-the-badge\u0026logo=visual-studio-code\u0026logoColor=white)\n![Vercel](https://img.shields.io/badge/Vercel-%23000000.svg?style=for-the-badge\u0026logo=vercel\u0026logoColor=white)\n\n---\n\n## 🚀 Quick Start - Get Running in Minutes!\n\n### 🔧 Prerequisites\n\n- **Node.js** (v18+ recommended) - The JavaScript runtime\n- **npm or yarn** - Package manager of choice\n- **MongoDB** - Database (or use Docker setup)\n- **Docker** (optional) - For containerized deployment\n\n### 📁 Cloning the Repository\n\n**Important:** This project uses Git submodules for modular architecture!\n\n```bash\n# Clone with all submodules\ngit clone --recurse-submodules https://github.com/siyabuilds/carbon-footprint-logger.git\n\n# Or if already cloned without submodules\ngit submodule update --init --recursive\n```\n\n### 🎨 Frontend Setup (Client)\n\n```bash\ncd client\nnpm install                    # Install dependencies\nnpm run dev                    # Start dev server\n```\n\n🌐 Open [http://localhost:5173](http://localhost:5173) - Frontend ready!\n\n### 🏗️ Backend Setup (Server)\n\n```bash\ncd server\nnpm install                    # Install dependencies\nnpm run dev                    # Start development server\n```\n\n⚡ Backend running on [http://localhost:3000](http://localhost:3000)\n\n### 🐳 Docker Deployment (One-Click Setup)\n\n```bash\ncd server\ndocker-compose up --build      # Magic happens here!\n```\n\n🎉 **Backend:** `localhost:4500` | **MongoDB:** `localhost:27017`\n\n---\n\n## 📊 App Features Deep Dive\n\n### 🔐 Authentication System\n\n- Secure JWT-based login/registration\n- Email or username login support\n- Auto-logout on token expiration\n- Protected routes and API endpoints\n\n### 📝 Activity Logging\n\n- Track activities across 6+ categories (Transport, Food, Energy, etc.)\n- Real-time CO₂ calculations\n- Activity history with timestamps\n- Bulk delete and management\n\n### 🎯 Reduction Targets\n\n- Set weekly/monthly reduction goals\n- Percentage or absolute emission targets\n- Progress tracking and visualization\n- Target history and management\n\n### 📈 Data Visualization\n\n- Interactive Chart.js powered dashboards\n- Category breakdowns and totals\n- Progress charts and trends\n- Real-time updates\n\n### 🏆 Leaderboard \u0026 Social\n\n- Compare with other users\n- Lowest emission rankings\n- Activity streak tracking\n- Achievement system\n\n### ⚡ Real-time Features\n\n- WebSocket-powered live updates\n- Personalized eco-tips after logging\n- Real-time progress notifications\n- Live activity feed\n\n---\n\n## 🔌 API Endpoints Quick Reference\n\n| Method   | Endpoint                      | Description                 |\n| -------- | ----------------------------- | --------------------------- |\n| `POST`   | `/api/register`               | Create new user account     |\n| `POST`   | `/api/login`                  | User authentication         |\n| `GET`    | `/api/validate`               | Validate JWT token          |\n| `GET`    | `/api/activities`             | Get user's activities       |\n| `POST`   | `/api/activities`             | Log new activity            |\n| `DELETE` | `/api/activities/:id`         | Delete specific activity    |\n| `GET`    | `/api/activities/leaderboard` | Get rankings                |\n| `GET`    | `/api/streaks`                | Get 7-day activity streak   |\n| `GET`    | `/api/summaries/current`      | Current week summary        |\n| `GET`    | `/api/targets`                | Get active reduction target |\n| `POST`   | `/api/targets`                | Create reduction target     |\n| `PUT`    | `/api/targets/:id`            | Update reduction target     |\n\n📚 **Full Documentation:** See [`client/API_DOCS.md`](https://github.com/siyabuilds/carbontrackr-frontend/blob/main/API_DOCS.md) for complete API reference!\n\n---\n\n## 🏆 Project Achievements\n\n\u003cdiv align=\"center\"\u003e\n\n| Achievement          | Status | Description                            |\n| -------------------- | ------ | -------------------------------------- |\n| **🌱 Eco-Friendly**  | ✅     | Carbon footprint tracking \u0026 reduction  |\n| **⚡ Real-time**     | ✅     | WebSocket integration for live updates |\n| **📊 Data Viz**      | ✅     | Interactive charts \u0026 analytics         |\n| **🎯 Goal Setting**  | ✅     | Reduction targets \u0026 progress tracking  |\n| **🏆 Gamification**  | ✅     | Streaks, leaderboards \u0026 achievements   |\n| **🔐 Secure**        | ✅     | JWT authentication \u0026 protected routes  |\n| **🐳 Containerized** | ✅     | Docker \u0026 docker-compose ready          |\n| **📱 Responsive**    | ✅     | Mobile-friendly design                 |\n\n\u003c/div\u003e\n\n---\n\n## 🌍 Environmental Impact\n\n\u003cimg src=\"https://user-images.githubusercontent.com/74038190/212284115-f47cd8ff-2ffb-4b04-b5bf-4d1c14c0247f.gif\" width=\"300\" alt=\"Environmental Impact\"/\u003e\n\n### 📈 Success Metrics\n\n- Activities logged and CO₂ calculated\n- Reduction targets set and achieved\n- User streaks and engagement\n- Community leaderboard participation\n\n---\n\n## 🛠️ Development \u0026 Contributing\n\n### 🔄 Development Workflow\n\n1. **Fork** the repository\n2. **Clone** your fork with submodules\n3. **Create** a feature branch\n4. **Develop** your amazing feature\n5. **Test** thoroughly\n6. **Submit** a pull request\n\n### 🚀 Deployment\n\n- **Frontend:** Deploy to Vercel/Netlify\n- **Backend:** Deploy to Render/Heroku/DigitalOcean\n- **Database:** MongoDB Atlas for production\n\n---\n\n## 📚 Learning Resources\n\n### 🎯 Tech Stack Deep Dives\n\n- [Vite Documentation](https://vitejs.dev/) - Lightning fast build tool\n- [Chart.js Guide](https://www.chartjs.org/) - Beautiful data visualization\n- [Express.js Tutorial](https://expressjs.com/) - Web framework for Node.js\n- [Socket.io Docs](https://socket.io/) - Real-time communication\n- [MongoDB University](https://university.mongodb.com/) - Database mastery\n\n---\n\n## 🌍 Let's Connect \u0026 Build a Greener Future Together!\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://github.com/siyabuilds/carbon-footprint-logger\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/GitHub-%23181717.svg?style=for-the-badge\u0026logo=github\u0026logoColor=white\" height=\"40\" alt=\"GitHub\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003csub\u003e\u003cb\u003eSource Code\u003c/b\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://carbontrackr.vercel.app\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Live_Demo-%2300C7B7.svg?style=for-the-badge\u0026logo=vercel\u0026logoColor=white\" height=\"40\" alt=\"Live Demo\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003csub\u003e\u003cb\u003eTry CarbonTrackr\u003c/b\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"mailto:siyabonga.lukhele@umuzi.org\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Contact-%23EA4335.svg?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\" height=\"40\" alt=\"Contact\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003csub\u003e\u003cb\u003eGet In Touch\u003c/b\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://siyabuilds.tech\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Portfolio-%2347A3F3.svg?style=for-the-badge\u0026logo=safari\u0026logoColor=white\" height=\"40\" alt=\"Portfolio\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003csub\u003e\u003cb\u003eMore Projects\u003c/b\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### 💬 Let's Collaborate On\n\n- 🌱 **Environmental tech solutions**\n- 🚀 **Full-stack development projects**\n- 📊 **Data visualization innovations**\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026color=gradient\u0026customColorList=12\u0026height=120\u0026section=footer\u0026text=Thanks%20for%20Going%20Green!\u0026fontSize=35\u0026fontColor=fff\u0026animation=fadeIn\" width=\"100%\" alt=\"Footer Banner\"/\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with 💚 for a sustainable future**\n\n_\"The best time to plant a tree was 20 years ago. The second best time is now.\"_ 🌳\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiyabuilds%2Fcarbon-footprint-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiyabuilds%2Fcarbon-footprint-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiyabuilds%2Fcarbon-footprint-logger/lists"}