Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree Adoption Platform

A digital platform built using the MERN stack (MongoDB, Express.js, React.js, Node.js) to facilitate tree adoption, environmental awareness, and sustainability initiatives. Users can adopt trees, monitor their health, donate for tree plantation, and collaborate with volunteers to plant and maintain trees.

This platform aims to bring individuals and organizations together to combat deforestation and promote biodiversity.


Features

  • User Authentication: Login/Signup with JWT-based authentication.
  • Tree Adoption: Select and adopt trees for plantation, including details like species, location, and tree health status.
  • Donation: Donate funds for tree plantation drives.
  • Volunteer Notifications: Volunteers are notified about new adoptions and tree health updates.
  • Admin Dashboard: Admins can view reports, update tree health, and manage user activities.
  • Real-Time Data: Real-time updates on tree growth, adoption status, and health monitoring.
  • Reports: Generate reports for adoption trends, donations, and tree status.

Tech Stack

  • Frontend: React.js
  • Backend: Node.js, Express.js
  • Database: MongoDB
  • Authentication: JWT (JSON Web Tokens)
  • Payment Gateway: Stripe for donation processing
  • Map Integration: Geolocation APIs for tracking and pinning tree locations
  • Notifications: Email notifications using Nodemailer

Project Structure

/client                  # React frontend
  /src
    /components          # React components (e.g., Navbar, Footer, etc.)
    /pages               # Page components (e.g., Home, Dashboard, etc.)
    /services            # API services and helpers
    /styles              # Styles for the application
/server                  # Node.js backend
  /controllers           # Controller logic for API endpoints
  /models                # MongoDB schema models
  /routes                # Express routes for API requests
  /middleware            # JWT authentication middleware
  /config                # Configuration files (e.g., environment variables)
  /utils                 # Utility functions (e.g., email, payment gateway integration)
  /server.js             # Main server file to start the app

Installation

Prerequisites

Ensure that you have the following installed:

  • Node.js (LTS version recommended)
  • MongoDB (or use MongoDB Atlas)
  • npm or yarn (package manager)

Setup

  1. Clone the repository:

    git clone https://github.com/your-username/tree-adoption-platform.git
    cd tree-adoption-platform
  2. Install backend dependencies:

    Navigate to the backend directory (/server) and run:

    cd server
    npm install
  3. Install frontend dependencies:

    Navigate to the frontend directory (/client) and run:

    cd client
    npm install
  4. Set up environment variables:

    Create a .env file in the /server folder with the following keys:

    MONGO_URI=your_mongo_db_connection_string
    JWT_SECRET=your_jwt_secret_key
    SENDGRID_API_KEY=your_sendgrid_api_key_for_email_notifications
    STRIPE_SECRET_KEY=your_stripe_secret_key_for_payment
    

    Replace the placeholders with your actual keys.

  5. Run the project:

    • Start the backend server:

      cd server
      npm start
    • Start the frontend development server:

      cd client
      npm start

    The application should now be running at http://localhost:3000.


Usage

  1. Sign Up: Create a new account and log in to the platform.
  2. Adopt a Tree: Browse available trees for adoption, select a tree, and confirm adoption details.
  3. View Adopted Trees: Check your adoption history and tree health status.
  4. Donate: Choose to donate money to support tree plantation efforts.
  5. Admin Dashboard: Admins can log in and view reports, manage tree health, and approve/reject adoption requests.

Features in Development

  • Mobile App: A mobile version of the platform for better accessibility.
  • AI-powered tree health monitoring: Use machine learning to predict tree health patterns.
  • Blockchain Integration: For transparent tracking of donations and tree adoptions.

Contributing

We welcome contributions to the project! If you have any ideas, suggestions, or bug fixes, please feel free to open an issue or submit a pull request.

Steps to contribute:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature-name)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add new feature')
  5. Push to the branch (git push origin feature/your-feature-name)
  6. Create a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • MongoDB Atlas: For providing managed MongoDB hosting.
  • SendGrid: For email notification service.
  • Stripe: For secure donation processing.
  • React & Node.js: Core frameworks for the development of this platform.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages