Skip to content

Latest commit

 

History

History
181 lines (138 loc) · 6.44 KB

Learn.md

File metadata and controls

181 lines (138 loc) · 6.44 KB

Learn.md ✍

PrithWe 🌍

PrithWe is a full-stack web application built on the PERN stack (PostgreSQL, Express, React, Node.js) designed to help households and businesses calculate their carbon footprints. This project was developed as a college project to promote environmental awareness and action.

Table of Contents

  1. Introduction
  2. Tech Stack
  3. Contributing
  4. Setting Up on your machine
  5. Usage
  6. Resources for Beginners
  7. Documentation
  8. Code Reviews
  9. Feature Requests
  10. Spreading the Word
  11. Motivation

Introduction 🖥️

PrithWe allows users to calculate their carbon footprint based on various parameters. It provides detailed insights and suggestions on how to reduce their carbon emissions. The name "PrithWe" is derived from "Prithvi" (Earth) and "We," emphasizing collective action and collaboration. Visit the live application here.

Tech Stack 🗃️

  • Frontend: React.js, Tailwind CSS
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • Hosting: Render
  • Version Control: Git, GitHub

Contributing 📝

Raise and issue; Get assigned and then work on fixing the issue. We welcome contributions to PrithWe! Follow these steps to contribute:

  1. Fork the Repository: Create your own copy of the repository on your GitHub account. image

  2. Clone the Repository : Clone the repository for making commits.

    git clone https://github.com/adarsh-singh01/PrithWe.git

image

  1. Create a New Branch for your feature or bug fix: Make a separate branch to work on specific features or fixes and switch to the correct branch.
git checkout -b <new-branch-name>
  1. Make Changes and commit them: Implement your changes and save them with a descriptive commit message.
git add .
git commit -m "Describe your changes"
  1. Push Your Changes to your fork: Upload your committed changes to your GitHub fork.
    git push origin <branch_name>
  2. Create a Pull Request ✅: Propose your changes to be merged into the original repository.

image

Development Workflow

  • Always work on a new branch for each issue or feature.
  • Keep your branch up to date with the main repository's master branch.
  • Write clear and descriptive commit messages.
  • Test your changes thoroughly before submitting a pull request.

Issue Report Process

  1. Go to the project's issues section.
  2. Select the appropriate template for your issue.
  3. Provide a detailed description of the issue.
  4. Wait for the issue to be assigned before starting to work on it.

Pull Request Process 🚀

  1. Ensure that you have self reviewed your code.
  2. Make sure you have added the proper description for the functionality of the code.
  3. I have commented my code, particularly in hard-to-understand areas.
  4. Add screenshot it help in review.
  5. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon.

Setting Up on your machine ⚙️

Follow these steps to set up the project locally:

  1. Clone the repository:

    git clone https://github.com/yourusername/prithwe.git
  2. Navigate to the project directory:

    cd prithwe
  3. Install backend dependencies:

    npm install
  4. Install frontend dependencies:

    cd ./client
    npm install
  5. Set up environment variables:

    Create a .env file in the server directory and add your database details:

    PG_USER=your_user_name 
    PG_HOST=your_host_name 
    PG_DATABASE=your_database_name 
    PG_PASSWORD=your_password
    PG_PORT=5432
    SESSION_SECRET=your_secret
  6. Start the backend server:

    cd ./server
    node index.js
  7. Start the frontend development server:

    cd ./client
    npm run dev
  8. Open your browser and navigate to http://localhost:5173.

Usage

  1. Register a new account or log in with an existing account.
  2. Choose whether you want to calculate the carbon footprint for a household or a business.
  3. Fill in the required information in the form.
  4. View the calculated carbon footprint and suggestions for reducing emissions.

Resources for Beginners 📚

Basics of Git and GitHub 📂

📍Documentation

  • Document any significant changes or additions to the codebase.
  • Provide clear explanations of the functionality, usage, and any relevant considerations.

Code Reviews 🔎

  • Be open to feedback and constructive criticism from other contributors.
  • Participate in code reviews by reviewing and providing feedback.

Feature Requests 🔥

  • Suggest new features or improvements that would enhance the project.

Spreading the Word 👐

  • Share your experience and the project with others.
  • Spread the word about the project on social media, developer forums, or any relevant community platforms.

Motivation 🏆

It was a college project and the motivation behind PrithWe is to provide a tool that helps individuals and businesses become more aware of their environmental impact. By understanding their carbon footprint, users can take actionable steps towards reducing their emissions and contributing to a healthier planet.

Thank you for contributing to PrithWe! Together, we can make a significant impact. Happy coding! 🚀

Don't forget to ⭐ the repository!