EcoLife is an interactive and visually engaging platform created to promote environment protection, waste management, animal safety, and climate awareness. It encourages users β especially kids β to take part in real-life eco-friendly activities through education and quizzes.
Before starting any contribution, you MUST complete the registration form.
π Registration Form: https://forms.gle/2aVtenoaHg65qi4G7
Join our official Discord server to:
- Ask and clear doubts
- Discuss issues and Pull Requests
- Get guidance from mentors
- Collaborate with contributors
π Discord: https://discord.gg/3FKndgyuJp
- Adopt and support stray animals
- Learn how to protect endangered wildlife
- Animal First Aid Guide - Essential first aid techniques for common animal injuries and emergencies
- Wildlife Incidents Reporting - How and when to report wildlife sightings, injuries, and illegal activities
- Reduce, reuse & recycle with simple guidance
- Awareness for community clean-ups
- Learn how to reduce carbon footprint
- Save energy and plant more trees for a greener world
- Basic tips to take care of common plants
- Feed animals safely and responsibly
- Fun quiz for children to learn sustainability interactively
- Report environmental issues or animal abuse
- Contact page for assistance or volunteering
Before you begin, ensure you have the following installed:
| Tool | Version | Purpose |
|---|---|---|
| Git | Latest | Version control |
| Node.js | v18.x or higher | Backend runtime |
| npm | v9.x or higher | Package management |
| VS Code | Latest (recommended) | Code editor |
| MongoDB | Latest (optional) | Database for backend features |
-
Clone the repository
git clone https://github.com/motalib-code/Environment_Animal_Safety_Hub.git cd Environment_Animal_Safety_Hub -
Install dependencies
npm install
-
Set up environment variables
# Copy the example environment file cp .env.example .env # On Windows: copy .env.example .env # Edit .env with your configuration
-
Initialize the database (optional)
npm run init-db
-
Start the development server
npm run dev
-
View the application
- Backend API: http://localhost:3000
- Frontend: Open
frontend/index.htmlin your browser - Or use VS Code's Live Server extension for hot reloading
The official and primary backend entry point for this project is:
server.js (root directory)
This file is used by:
npm startnpm run dev- Production deployments
A previously existing file (backend/server.js) was reviewed and removed to eliminate duplication and architectural ambiguity.
All backend routes, middleware, and configurations are centralized and managed through the root-level server.js file.
Environment_Animal_Safety_Hub/
βββ π frontend/ # All frontend source code
β βββ π assets/ # Static assets
β β βββ π audio/ # Audio files
β β βββ π data/ # JSON data files
β β βββ π icons/ # Icon files (PNG, SVG)
β β βββ π images/ # Image assets
β β βββ π 3d/ # 3D illustrations
β β βββ π badges/ # Achievement badges
β βββ π components/ # Reusable HTML components
β βββ π css/ # Stylesheets
β β βββ π components/ # Component-specific styles
β β βββ π global/ # Global styles & variables
β β βββ π pages/ # Page-specific styles
β β βββ style.css # Main stylesheet
β βββ π js/ # JavaScript files
β βββ π pages/ # HTML pages
β β βββ style-guide.html # π Design System Reference
β βββ index.html # Main entry point
β βββ manifest.json # PWA manifest
βββ π backend/ # Backend routes, models & configuration
β βββ π api/ # API routes
β βββ π models/ # Database models
β βββ init-db.js # Database initialization
βββ π .github/ # GitHub templates & workflows
βββ π docs/ # Markdown documentation
β βββ CONTRIBUTING.md # Contribution guidelines
β βββ [topic]_README.md # Topic-specific docs
βββ package.json # Project dependencies
βββ server.js # Express server entry
βββ README.md # This file
| Directory | Description |
|---|---|
frontend/ |
Contains all frontend code (HTML, CSS, JS) |
frontend/css/ |
Stylesheets organized by scope |
frontend/css/global/ |
Design tokens, variables, resets |
frontend/css/components/ |
Component styles (navbar, footer, cards) |
frontend/js/ |
JavaScript modules and utilities |
frontend/pages/ |
Individual HTML pages |
frontend/assets/images/3d/ |
3D illustrations (WebP format) |
backend/ |
Server-side code and API |
The official and actively registered service worker file for this project is:
frontend/sw.js
This file is registered through:
frontend/js/global/main.js- Other feature-specific JavaScript files where applicable
The previously existing file:
frontend/service-worker.js
was reviewed and removed to eliminate duplication and architectural ambiguity.
All PWA caching, offline support, and background functionality are now centralized within sw.js.
This refactor ensures:
- Clear service worker ownership
- No caching conflicts
- Improved frontend maintainability
- Better onboarding clarity for contributors
We have a comprehensive Living Style Guide that documents all UI components.
π View Style Guide: Open frontend/pages/style-guide.html in your browser
| Color | Hex | CSS Variable | Usage |
|---|---|---|---|
| π’ Primary Green | #2E7D32 |
--primary-color |
Main brand color, buttons, links |
| π’ Primary Dark | #1b5e20 |
--primary-dark |
Hover states, emphasis |
| π’ Primary Light | #4caf50 |
--primary-light |
Highlights, gradients |
| π Secondary Orange | #ff9800 |
--secondary-color |
CTAs, accents |
| π΅ Accent Cyan | #00bcd4 |
--accent-color |
Special highlights |
- Font Family: Poppins (Google Fonts)
- Base Size: 16px
- Line Height: 1.6
| Icon | Class | Usage |
|---|---|---|
| π | fa-leaf |
Environment, sustainability |
| πΎ | fa-paw |
Animals, pets |
| π³ | fa-tree |
Nature, forests |
| β»οΈ | fa-recycle |
Recycling, waste |
| π± | fa-seedling |
Growth, planting |
| π | fa-globe-americas |
Global, world |
| π§ | fa-water |
Water conservation |
| ποΈ | fa-dove |
Peace, wildlife |
| Technology | Role |
|---|---|
| HTML5 | Structure & layout |
| CSS3 | Styling, responsiveness & UI design |
| JavaScript | Functional interactivity |
| Node.js | Backend runtime |
| Express.js | Web server framework |
| MongoDB | Database (optional) |
We welcome contributions! Please read our contribution guidelines before getting started.
- Fork the repository on GitHub
- Clone your fork
git clone https://github.com/your-username/Environment_Animal_Safety_Hub.git
- Create a feature branch
git checkout -b fix-issue-name
- Make your changes and test them
- Commit with a descriptive message
git add . git commit -m "Fix: short description of change"
- Push and create a Pull Request
git push origin fix-issue-name
For detailed guidelines, see CONTRIBUTING.md
We thank all our contributors for their valuable contributions to making EcoLife better!
| Name | Role |
|---|---|
| Jagrati | Project Owner & Developer |
| Nikhil Singh | Mentor |
Thanks to everyone supporting this initiative! π
For a detailed roadmap of planned features for v2.0, see ROADMAP.md.
- Admin dashboard to manage content
- User login & save quiz score feature
- Animations & interactive infographics
- Dark mode and accessibility improvements
- Style Guide:
frontend/pages/style-guide.html - API Documentation: See
backend/README.md - Component Documentation: See individual component files
This project is licensed under the MIT License - see the LICENSE file for details.
This project is created for educational & awareness purposes.
If you like this project, please give it a β on GitHub!
Together we can make Earth a better place! ππ


