Skip to content

AbabilX/EcoTrackBD

Repository files navigation

Eco Track Bangladesh

๐ŸŒ Eco Track Bangladesh

Empowering 160 million Bangladeshis to build a sustainable future โ€” one action at a time.

Quick Start โ€ข Features โ€ข Tech Stack โ€ข Contributing โ€ข License

React TypeScript Vite Tailwind License


๐ŸŒŠ The Challenge

Bangladesh is one of the world's most climate-vulnerable nations:

  • ๐ŸŒŠ 70% of the country is less than 1 meter above sea level
  • ๐ŸŒก๏ธ Increasing cyclones, floods, and extreme weather events
  • ๐Ÿญ Rapid urbanization driving air quality issues in major cities
  • โ™ป๏ธ Rivers like Buriganga among the most polluted globally

Eco Track Bangladesh transforms this challenge into an opportunity โ€” giving citizens the tools, knowledge, and community to drive meaningful environmental change.


โœจ Features

๐Ÿงฎ Carbon Calculator

Track your daily emissions from electricity, transportation, and waste. Visualize trends and get personalized recommendations.

๐Ÿ“š Interactive Quizzes

Learn about environmental topics with gamified quizzes. Multiple difficulty levels with detailed explanations.

๐ŸŽฏ Daily Challenges

Build sustainable habits with curated eco-challenges designed for the Bangladeshi context.

๐Ÿ‘ฅ Community Platform

Share tips, learn from fellow citizens, and build a network of eco-conscious individuals.

๐Ÿ—บ๏ธ Eco Locations & Events

Discover recycling centers, parks, and upcoming environmental events across Bangladesh.

๐ŸŒณ Tree Planting Tracker

Plant trees virtually with real-world impact tracking. Each tree absorbs 20-50 kg COโ‚‚/year.

๐Ÿ† Gamification & Progress

  • Badges & Achievements โ€” Earn rewards for completing challenges and reaching milestones
  • Leaderboards โ€” Foster friendly competition in your community
  • Personal Dashboard โ€” Comprehensive analytics of your environmental impact
  • Multilingual Support โ€” Available in English and Bengali (เฆฌเฆพเฆ‚เฆฒเฆพ)

๐Ÿš€ Quick Start

Prerequisites

  • Node.js v18+ or Bun
  • Backend API โ€” EcoTrack Backend (separate repository)

Installation

# Clone the repository
git clone https://github.com/yourusername/ecotrack_bd.git
cd ecotrack_bd

# Install dependencies
npm install
# or
bun install

# Configure environment
cp .env.example .env
# Edit .env with your API URL

# Start development server
npm run dev
# or
bun dev

Environment Variables

Create a .env file in the root directory:

VITE_API_URL=http://localhost:3000/api
Variable Description Default
VITE_API_URL Backend API base URL http://localhost:3000/api

๐Ÿ› ๏ธ Tech Stack

Layer Technology Purpose
UI Library React 18 Component-based UI
Language TypeScript Type safety
Build Tool Vite Fast development & bundling
Styling Tailwind CSS Utility-first CSS
Routing React Router 7 Client-side navigation
Charts Recharts Data visualization
Maps React Leaflet Interactive maps
Animations Framer Motion Smooth animations
Icons Lucide React Beautiful icon set

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ Navbar.tsx      # Navigation bar
โ”‚   โ”œโ”€โ”€ Footer.tsx      # Site footer
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ contexts/           # React context providers
โ”‚   โ”œโ”€โ”€ AuthContext.tsx # Authentication state
โ”‚   โ”œโ”€โ”€ ThemeContext.tsx# Dark/light mode
โ”‚   โ””โ”€โ”€ LanguageContext.tsx # i18n support
โ”œโ”€โ”€ pages/              # Route pages
โ”‚   โ”œโ”€โ”€ Home.tsx        # Landing page
โ”‚   โ”œโ”€โ”€ Dashboard.tsx   # User dashboard
โ”‚   โ”œโ”€โ”€ Calculator.tsx  # Carbon calculator
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ lib/                # Utilities & API
โ”‚   โ””โ”€โ”€ api.ts          # API client functions
โ””โ”€โ”€ utils/              # Helper functions

๐Ÿ”Œ API Endpoints

The frontend connects to a REST API with these main endpoints:

Endpoint Description
/api/auth/* Authentication (signup, login, verify)
/api/profile User profile management
/api/carbon Carbon footprint tracking
/api/challenges Daily eco-challenges
/api/community/* Posts, comments, likes
/api/quiz/* Quiz questions & attempts
/api/badges User achievements
/api/eco-locations Eco-friendly places
/api/eco-events Environmental events
/api/planting/* Tree planting system
/api/leaderboard User rankings

๐Ÿค Contributing

We welcome contributions from everyone! Here's how you can help:

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

Ways to Contribute

Area Description
๐ŸŒ Localization Improve Bengali translations
๐ŸŽจ UI/UX Enhance design and accessibility
๐Ÿ“ Documentation Improve guides and tutorials
๐Ÿ› Bug Fixes Report and fix issues
โœจ Features Propose and implement new features
๐Ÿงช Testing Add unit and integration tests

๐ŸŒŸ Impact Vision

๐Ÿ“Š Short-term

1,000+ active users
5,000+ quiz attempts
100+ trees planted

๐Ÿš€ Medium-term

500+ tons COโ‚‚ reduced
10,000+ registered users
50+ eco-events

๐ŸŒ Long-term

National recognition
Policy influence
100,000+ users


๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • The resilient people of Bangladesh ๐Ÿ‡ง๐Ÿ‡ฉ
  • Environmental organizations protecting our natural resources
  • The amazing open-source community
  • All contributors who make this project better

Built with ๐Ÿ’š for a greener Bangladesh

"The best time to plant a tree was 20 years ago. The second best time is now."

Report Bug โ€ข Request Feature

Releases

No releases published

Packages

 
 
 

Contributors

Languages