First off, thank you for considering contributing to Low-Price Center! 🎉 We welcome all contributions and are excited to see what you'll bring to the project.
- Contributing to CSES Low-Price Center
By participating in this project, you agree to uphold the Code of Conduct. Please read it to understand what actions will and will not be tolerated.
Note: You may have to restart terminal after installing each environment.
- Download git and git bash by following this link.
- Set up Git Bash as the shell for running command line prompts (in VSCode or directly openning Git Bash)
- Run:
This should output something like this:
git -v
git version 2.46.0.windows.1
- Download nvm (Node Version Manager). Follow the instructions on in this link for the details.
- Run:
This should output the version of nvm you installed.
nvm -v
- Install Node.js v18.20.4:
nvm install v18.20.4** - Switch to the installed version:
nvm use v18.20.4** - Run:
The results should be something like:
node -v npm -v
v18.20.4 10.7.0
- Fork the repository to your GitHub account.
- Clone the origin repository locally:
git clone https://github.com/CSES-Open-Source/LowPriceCenter.git
- Create a remote repository:
git remote add [your-username] https://github.com/[your-username]/LowPriceCenter.git
- Run:
The output should be something like the following:
git remote -v
[your-username] https://github.com/[your-username]/LowPriceCenter.git (fetch) [your-username] https://github.com/[your-username]/LowPriceCenter.git (push) origin https://github.com/CSES-Open-Source/LowPriceCenter.git (fetch) origin https://github.com/CSES-Open-Source/LowPriceCenter.git (push)
- Open an instance of git bash and run:
cd frontend - Install frontend libraries:
npm install
- Open another instance of git bash and run:
cd backend - Install backend libraries:
npm install
- Go to mongodb.com and create a new account (or login to an existing account if you already have one).
- Create a new project and name it Low-Price Center (or anything you like).
- Create a new cluster in this project by selecting M0 as the plan and deselect Automate security setup and Preload sample datase. Feel free to choose and name for the cluster and select any location that is closest to you.
- Go to Database Access (under security in the side bar) and create a new user for yourself. Make sure to select Atlas Admin as your role.
- Go to Network Access (under security again) and add a new IP address. Click on Allow access from anywhere.
- Go back to Database and click connect for the cluster you created. Then select Drivers and set the drivers to Node.js. Copy the link provided below.
- Create a new file in the local repo under the
backendfolder called.envand add the following to the file:Make sure to fill in theMONGODB_URI=[link-copied-from-mongodb] PORT=3500<db_password>field with the password of your account.
- Open an instance of git bash and run:
cd frontend - Install frontend libraries:
npm start
- Open another instance of git bash and run:
cd backend - Install backend libraries:
npm start
- Open the CSES OpenSource Low-Price Center Github Repo.
- Click on the issues tab (next to code).
- Create a new issue.
- Select Bug report as the type of issue.
- Fill in the title and description and submit the issue.
- Open the CSES Opensource Low-Price Center Github Repo.
- Click on the issues tab (next to code).
- Create a new issue.
- Select Feature request as the type of issue.
- Fill in the title and description and submit the issue.
- Create a new branch for the current issue you are working on:
git checkout -b origin/main [name-of-branch]
- Make changes to the branch and commit changes. I would recomment using VSCode version control or GitHub Desktop for making commits.
- Run lint in respective frontend and backend directories:
Make sure to fix all lint errors before pushing your code.
npm run lint-check
- Push the commits to your forked repository:
git push [your-username] HEAD
[your-username]is whatever you chose to set the name of your remote repository as. To check this type:git remote -v
- Go to your forked repository and make a pull request to the main branch of the original repository. Make sure to fill in the title and description of the pull request.
Please follow these coding style guidelines:
- We recommend using Prettier to format on save, and then running ESLint before making a pull request.
- Indent with tabs and use a 2-space indentation.
- Use semicolons and the end of each line.
- Write clear, concise comments where necessary.
- Use meaningful variable and function names.
- Create a feature branch from main (e.g., feat/add-postgres-stack).
- Use Conventional Commits (feat:, fix:, chore:) to keep history clean and readable.
- Include tests where applicable.
- Run linting and tests before submitting a pull request.
- Ensure your changes follow the existing project structure and registry-based stack system.
When opening issues or reviewing pull requests, please apply the most relevant label(s) to help maintainers triage and prioritize them. Here’s a basic guide:
| Label | When to Use |
|---|---|
bug |
A reproducible error, crash, or incorrect behavior in Taco. |
feature |
A new capability or enhancement that does not exist yet. |
enhancement |
Improvements to existing features, performance, or developer experience. |
docs |
Documentation updates, typos, or README/CONTRIBUTING changes. |
refactor |
Code cleanup or restructuring without changing behavior. |
ci |
Issues related to GitHub Actions, testing, or build pipelines. |
good first issue |
Small, well-scoped issues suitable for new contributors. |
Tips:
- Most issues should have one primary label.
- If an issue touches multiple areas (e.g., a feature that also needs docs), feel free to add more than one.
- PRs should ideally match the label of the issue they close.
Please write a rough description for the changes made in each commits
For any issues or questions, please contact Chase Peterson (cepeters@ucsd.edu) or UC San Diego CSES (cses@ucsd.edu).