Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: UPDATE Of Contributing.md #37 #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 243 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,264 @@
# Contributing Guidelines
Welcome to our project! We're thrilled to have you contribute. Your efforts, big or small, make a difference. Please ensure that you follow our [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions.

Thank you for considering contributing to our project! We welcome contributions from everyone, whether it's filing a bug report, submitting a feature request, or creating a pull request. Your involvement helps to make this project better for everyone.
<br>

NOTE: PLEASE GO THROUGH THE README FILE FOR THE DEATILS OF THE PROJECT.
# Need Help with the Basics? 🤔

## Bug Reports and Feature Requests
If you're new to Git and GitHub, no worries! Here are some useful resources:

If you encounter any bugs or have ideas for new features, please [open an issue](https://github.com/your_username/your_project/issues/new) on GitHub. When creating an issue, please provide as much detail as possible, including steps to reproduce for bugs and a clear description for feature requests.
- [Forking a Repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
- [Cloning a Repository](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request)
- [How to Create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github)
- [Getting Started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6)
- [Learn GitHub from Scratch](https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources)

## Pull Requests

We appreciate your interest in contributing code to this project! To ensure a smooth process, please follow these guidelines when submitting a pull request:
# Project Structure 📂

1. **Fork the Repository**: If you haven't already, fork the repository to your GitHub account and create a new branch for your changes.
```bash
Ether-Wheels/
├── .github/ # Configuration files for GitHub, including issue templates
│ ├── ISSUE_TEMPLATE/ # Issue templates for reporting bugs and feature requests
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows/ # CI/CD workflows
│ └── pr_validation.yml
├── blockchain/ # Smart contracts for the blockchain application
│ ├── contracts/ # Solidity contracts
│ │ ├── CarPooling.sol
│ │ └── PriceConverter.sol
│ └── deploy/ # Deployment scripts
│ └── 01-deploy-carpooling.js
├── deployments/ # Deployment configurations
│ ├── localhost/
│ └── sepolia/
├── scripts/ # Utility scripts
│ ├── bookRide.js
│ ├── cancelRide.js
│ ├── createRide.js
│ └── getRide.js
├── utils/ # Utility functions and helpers
│ └── verify.js
├── .gitignore # Git ignore file for untracked files
├── README.md # Main README file with project details
├── hardhat.config.js # Hardhat configuration file
├── helper-hardhat.config.js # Helper configuration for Hardhat
├── package.json # Project dependencies and scripts
├── yarn.lock # Yarn lock file for dependency management
├── frontend/ # Frontend application files
│ ├── app/ # Application components
│ │ ├── api/ # API routes
│ │ │ └── route.jsx
│ │ ├── create-ride/ # Create ride components
│ │ │ ├── layout.jsx
│ │ │ └── page.jsx
│ │ ├── get-rides/ # Get rides components
│ │ │ ├── layout.jsx
│ │ │ └── page.jsx
│ │ ├── my-rides/ # My rides components
│ │ │ ├── layout.jsx
│ │ │ └── page.jsx
│ │ └── register/ # User registration components
│ │ ├── driver/
│ │ │ └── page.jsx
│ │ └── passenger/
│ │ └── page.jsx
│ └── styles/ # CSS styles
│ ├── enlarged-card-modal.module.css
│ ├── get-rides.module.css
│ ├── my-rides-card.css
│ └── user-registration.module.css
├── test/ # Test files
│ ├── ui/ # UI tests
│ │ ├── chatbot.css
│ │ ├── layout.jsx
│ │ ├── loading.jsx
│ │ └── page.jsx
│ └── components/ # Component tests
│ ├── EnlargedCardModal.jsx
│ ├── GetRidesCard.jsx
│ ├── Header.jsx
│ ├── MyRidesCard.jsx
│ └── PrimaryButton.jsx
├── public/ # Public assets
│ ├── images/ # Image assets
│ │ ├── car.png
│ │ ├── car2.png
│ │ ├── carpooling.svg
│ │ ├── driver.jpg
│ │ ├── ewLogo.ico
│ │ ├── ewLogo.jpeg
│ │ ├── ewLogo.png
│ │ └── passenger.jpg
│ ├── favicon.ico # Favicon for the application
│ ├── next.svg # SVG assets
│ └── vercel.svg
├── utils/ # Additional utilities
│ ├── CarPooling.json
│ ├── CarPoolingcamp.json
│ ├── cars-final.csv
│ └── toastService.js
├── .env.example # Example environment variables file
├── jsconfig.json # Configuration for JavaScript
├── next.config.mjs # Next.js configuration file
├── package-lock.json # Lock file for npm dependencies
├── CODE_OF_CONDUCT.md # Code of conduct for contributors
├── CONTRIBUTING.md # Guidelines for contributing to the project
├── Contributors.md # List of contributors
└── LICENSE # License file for the project
```

2. **Make Your Changes**: Implement your changes or additions to the project. Please ensure your code follows the project's coding standards and conventions.
# First Pull Request ✨

3. **Test Your Changes**: Before submitting your pull request, test your changes thoroughly to ensure they work as intended. If applicable, update any relevant documentation or tests.
1. **Star this repository**
Click on the top right corner marked as **Stars** at last.

4. **Submit Your Pull Request**: Once your changes are ready, submit a pull request to the `main` branch of the original repository. Provide a clear description of your changes, including any relevant context or motivation.
2. **Fork this repository**
Click on the top right corner marked as **Fork** at second last.

5. **Review Process**: Your pull request will undergo review by project maintainers. They may request additional changes or provide feedback before merging your changes into the main codebase.
3. **Clone the forked repository**

6. **Continuous Integration**: Your pull request will be automatically tested using continuous integration tools. Please ensure all tests pass before requesting a review.
```bash
git clone https://github.com/<your-github-username>/Ether-Wheels.git
```

4. **Navigate to the project directory**

7. **Be Patient and Responsive**: Be patient during the review process and respond promptly to any feedback or requests for changes. Collaboration and communication are key to successful contributions.
```bash
cd Ether-Wheels
```

## Frontend Contributions
5. **Create a new branch**

If you are interested in contributing only to the frontend, you can work on it by having a minimum requirement of a MetaMask wallet. While you won't be able to interact fully with the project's functionality without adding Sepolia Ethers, you'll still be able to work on the UI components.
```bash
git checkout -b <your_branch_name>
```

## Blockchain Contributions
6. **To make changes**

For blockchain contributions, you'll need to familiarize yourself with Solidity and the Ethereum blockchain. You can suggest some code changes that provide better efficiency with the same outputs.
```bash
git add .
```

7. **Now to commit**

```bash
git commit -m "add comment according to your changes or addition of features inside this"
```

8. **Push your local commits to the remote repository**

```bash
git push -u origin <your_branch_name>
```

9. **Create a Pull Request**

10. **Congratulations! 🎉 you've made your contribution**

<br>

# Alternatively contribute using GitHub Desktop 🖥️

1. **Open GitHub Desktop:**
Launch GitHub Desktop and log in to your GitHub account if you haven't already.

2. **Clone the Repository:**
- If you haven't cloned the repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the repository from the list of repositories on GitHub and clone it to your local machine.

3. **Switch to the Correct Branch:**
- Ensure you are on the branch that you want to submit a pull request for.
- If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting the desired branch.

4. **Make Changes:**
Make your changes to the code or files in the repository using your preferred code editor.

5. **Commit Changes:**
- In GitHub Desktop, you'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
- Enter a summary and description for your changes in the "Summary" and "Description" fields, respectively. Click the "Commit to <branch-name>" button to commit your changes to the local branch.

6. **Push Changes to GitHub:**
After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.

7. **Create a Pull Request:**
- Go to the GitHub website and navigate to your fork of the repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.

8. **Review and Submit:**
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
- Once you're satisfied, click the "Create pull request" button to submit your pull request.

9. **Wait for Review:**
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the repository.

<br>


# Good Coding Practices 🧑‍💻

1. **Follow the Project's Code Style**

- Maintain consistency with the existing code style (indentation, spacing, comments).
- Use meaningful and descriptive names for variables, functions, and classes.
- Keep functions short and focused on a single task.
- Avoid hardcoding values; instead, use constants or configuration files when possible.

2. **Write Clear and Concise Comments**

- Use comments to explain why you did something, not just what you did.
- Avoid unnecessary comments that state the obvious.
- Document complex logic and functions with brief explanations to help others understand your thought -process.

3. **Keep Code DRY (Don't Repeat Yourself)**

- Avoid duplicating code. Reuse functions, methods, and components whenever possible.
- If you find yourself copying and pasting code, consider creating a new function or component.

4. **Write Tests**

- Write unit tests for your functions and components.
- Ensure your tests cover both expected outcomes and edge cases.
- Run tests locally before making a pull request to make sure your changes don’t introduce new bugs.

5. **Code Reviews and Feedback**

- Be open to receiving constructive feedback from other contributors.
- Conduct code reviews for others and provide meaningful suggestions to improve the code.
- Always refactor your code based on feedback to meet the project's standards.

<br>

# Pull Request Process 🚀

When submitting a pull request, please adhere to the following:

1. **Self-review your code** before submission.
2. Include a detailed description of the functionality you’ve added or modified.
3. Comment your code, especially in complex sections, to aid understanding.
4. Add relevant screenshots to assist in the review process.
5. Submit your PR using the provided template and hang tight; we'll review it as soon as possible! 🚀

<br>

# Issue Report Process 📌

To report an issue, follow these steps:

1. Navigate to the project's issues section :- [Issues](https://github.com/StephCurry07/Ether-Wheels/issues)
2. Provide a clear and concise description of the issue.
3. **Avoid spamming** to claim an issue. Patience is key!
4. Wait until someone looks into your report.
5. Begin working on the issue only after you have been assigned to it. 🚀

<br>

# Thank you for contributing 💗

We truly appreciate your time and effort to help improve our project. Feel free to reach out if you have any questions or need guidance. Happy coding! 🚀

##

## Code of Conduct

Please note that by contributing to this project, you agree to abide by the project's [Code of Conduct](CODE_OF_CONDUCT.md). We expect all contributors to uphold these standards of behavior and create a positive and inclusive community.

Thank you for your interest in contributing to our project! If you have any questions or need assistance, feel free to reach out to the project maintainers.
9 changes: 0 additions & 9 deletions Contributors.md

This file was deleted.