Thank you for your interest in contributing to ScrollMe! We welcome all contributions, whether it’s fixing bugs, implementing new features, or improving documentation.
Please take a moment to read through this guide before contributing. It will help you understand the contribution process and ensure smooth collaboration.
-
Fork the repository: Fork the project to your own GitHub account by clicking the "Fork" button at the top-right of the project page.
-
Clone your fork:
git clone [email protected]:saurabhbakolia/SCROLLME--ECOMMERCE-WEBSITE.git cd SCROLLME--ECOMMERCE-WEBSITE
-
Checkout the
develop
branchgit checkout develop
-
Install dependencies Run the following command to install project dependencies:
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
npm install
-
Create a branch from
develop
Create a new branch where your changes will be isolated from thedevelop
branch.git checkout -b feature/your-feature
If you find a bug or any issue, you can help by submitting a bug report.
- Search for existing issues: First, check if the issue has already been reported.
- Submit a new issue: If no existing issue matches, open a new issue with detailed steps to reproduce the bug, expected vs. actual behavior, and any error messages or logs.
We are always looking to improve ScrollMe Ecommerce Website! If you have ideas for new features:
- Check open issues: Search for existing feature requests.
- Open a feature request: If your idea is new, submit a feature request with a clear description of the feature, how it improves the project, and any alternatives you’ve considered.
Contributions to code are highly appreciated. Here’s how you can contribute code:
- Open an issue: First, discuss the change you wish to make by opening an issue.
- Work on the issue: After discussion and approval, you can start coding.
- Submit a pull request (PR): Once your work is done, submit a PR following the Pull Request Guidelines.
Ensure you have the required tools:
- Node.js: v14.x or higher.
- MongoDB: Ensure MongoDB is installed and running locally.
-
Set up backend environment variables: In the
backend/
directory, copy.env.example
to.env
and set the following variables:MONGODB_URI=mongodb://127.0.0.1:27017/scrollme MONGODB_DATABASE_NAME=scrollme PRODUCTS_COLLECTION_NAME=products SALT=10 JWT_SECRET=your_secret_key
-
Start the application: Run the following command to start both frontend and backend:
# Start the backend
cd backend
npm run start
# Start the frontend
npm start
To ensure a smooth pull request (PR) process, please follow these guidelines:
-
Create a PR from your branch: Push your feature branch to your forked repository, then create a pull request from your branch.
-
Describe your PR: Provide a detailed explanation of the changes and why they are necessary.
-
Link issues: If your PR addresses an issue, link it in your PR description (
Closes #issue_number
). -
Request a review: Assign reviewers to your PR.
-
Make changes if needed: Be open to feedback, and if adjustments are requested, push the necessary changes to your branch.
Note: Always create the PR to merge into the
develop
branch.
- Ensure your code follows established coding conventions.
- Maintain clear, readable, and modular code.
- Always test your code before submitting a PR.
Follow these simple rules when writing commit messages:
- Use the present tense: ("Add feature" not "Added feature").
- Capitalize the subject line: Ensure the first letter of the subject line is capitalized.
- Keep the subject line concise: Aim for 50 characters or fewer.
- Include a detailed explanation: If necessary, provide a detailed explanation in the commit body, wrapping lines at 72 characters.
- Reference issues and pull requests: Include references to any related issues or pull requests using
#issue_number
. - Use imperative mood: Start the message with a verb (e.g., "Fix", "Add", "Update", "Remove").
- Separate subject from body with a blank line: If your message has a body, leave a blank line between the subject and the body.
- Be consistent: Maintain consistency in style and format across your commit messages to improve clarity.
Use the following prefixes to categorize your commits:
- feat: A new feature (e.g.,
feat: add user login functionality
) - fix: A bug fix (e.g.,
fix: resolve issue with product search
) - chore: Routine tasks (e.g.,
chore: update dependencies
) - docs: Documentation changes (e.g.,
docs: update README with installation instructions
) - style: Formatting changes (e.g.,
style: fix whitespace issues
) - refactor: Code changes that neither fix a bug nor add a feature (e.g.,
refactor: simplify authentication logic
) - test: Adding or updating tests (e.g.,
test: add unit tests for product model
)