Thank you for taking the time to contribute to our project. Please take a moment to read the following guidelines before contributing:
⚠️ IMPORTANTPull Requests having no issue associated with them will not be accepted. Firstly get an issue assigned, whether it's already opened or raised by you, and then create a Pull Request.
An automated process has been implemented to ensure the timely management of Pull Requests (PRs) on this platform.
PRs that have been open for a duration exceeding 45 days will be automatically closed, so please plan accordingly.
-
Open Source Etiquette: If you've never contributed to an open source project before, have a read of Basic etiquette for open source projects.
-
Basic familiarity with Git and GitHub: If you are also new to these tools, visit GitHub for complete beginners for a comprehensive introduction to them.
-
Make sure you have Node.js installed.
-
Make sure you have PNPM installed.
To get started, look at the existing Issues or create a new issue!
Follow these steps to setup LinksHub on your local machine
-
Fork the project
-
Clone the project to run on your local machine using the following command:
git clone https://github.com/<your_github_username>/LinksHub.git
-
Get into the root directory
cd LinksHub
-
Install all dependencies by running
pnpm install
-
Create your branch
git checkout -b <your_branch_name>
-
Run and view the application on localhost
pnpm run dev
P.S: If you have
docker
installed in your system, you can follow these steps to set up the environment:
- After forking and cloning the repo(as mentioned above), get into the project directory:
cd LinksHub/
- Start the docker container with:
docker-compose up
- Now start adding your changes. Note: You don't need to restart the container again and again after starting it once, because the changes you make will reflect in the container instantly.
-
Make your changes before staging them.
-
Stage your changes
git add <filename>
-
Commit your changes
git commit -m "<your-commit-message>"
-
Push your changes to your branch
git push origin "<your_branch_name>"
-
Create a PULL REQUEST 💣
Click compare across forks if you don't see your branch
You can suggest new categories by going to of the current categories on our website and click on the "Wanna Share Something?" button.
-
To add a newly created category or subcategory, include them in the data.ts & index.ts files located in the
database
folder. -
Each category has its own folder with its name
-
Ensure that every subcategory is placed in its respective category folder.
For example, if
images
is a subcategory, it should be inside thefrontend
folder, which is a category. -
To add a new category, create a folder with its name.
For example, create a folder named
Resources
-
If you want to add a new
subcategory
, add it in data.ts under the correct category, and provide the appropriateURL
. You can refer to the examples in the file. -
Make sure to export the newly created JSON file in the index file.
-
There are a couple of additional steps you need to follow:
-
Navigate to
types/index.ts
.-
If you are adding a category, include the name of the category used in
database/data.ts
in theCategory
type.For example, if you are adding a category called
open source
, add it to theexport type
statement in the appropriate style.
-
-
If you are adding a subcategory, go to
components/TopBar/CategoryDescriptions.ts
and add the subcategory name used when exporting the name indatabase/index.ts
, along with a concise description in the correct format.For example, if you export the subcategory name as
onlineCodeEditors
indatabase/index.ts
, add the same name toCategoryDescriptions.ts
using the following style:subcategory name:
description of this subcategory
-
Here's how it looks altogether:
//category subcategory name: `description of subcategory`,
-
Note
It's essential to add a description when submitting a pull request to add a subcategory to merge it in the codebase.
✨ You can also create issue(s) to suggest new links, and someone else will take care of them.
-
Choose the category and subcategory under which you want to add the resource.
-
Locate the appropriate structure:
database/category_name/subcategory_name.json
For example, to add a resource in the
fonts
subcategory under thefrontend
category, navigate todatabase/frontend/fonts.json
.
-
The values in the JSON file should follow this pattern for the subcategory object:
name:'', description:'', url:'', category:'', subcategory:''
-
name
: Name of the site -
description
: A brief description of what the site does -
url
: Add a valid URL of the site -
category
: Choose an existing category or create a new one following the instructions mentioned above. -
subcategory
: Choose an existing subcategory or create a new one following the instructions mentioned above. -
language
: This field is included for some of the resources, such as React resources or YouTube channel links. If multiple languages are involved, prioritize English if available. Otherwise, choose a language that you deem necessary. -
You can use JSONLint to check the correctness of the JSON to avoid failing tests during pull requests.
NOTE
When adding YouTube channel links, please specify the language of the channel they are using to teach for example English, Hindi, Spanish, etc. In cases where the language is not specified, then just remove the language
property.
⚠️ Important
- Do not make duplicate entries. Always confirm that an entry does not exist by searching through the JSON file.
- Ensure that your entries are error-free by double-checking before staging your changes.
- Your entries should follow the above structure.
✨ You can also create issue(s) to suggest new descriptions. The maintainers will review them and then assign them.
-
Choose the category and subcategory under which you want to add a description.
-
Locate the file:
components/TopBar/CategoryDescriptions.ts
-
Add or update the description in front of the subcategory name.
For example, to add the description of the
fonts
subcategory under thefrontend
category, you would do the following:const categoryDescriptions: CategoryDescriptions = { //frontend - //other subcatogery - fonts: 'New Description here', - - }
- Select an issue template from the issues tab. Otherwise, choose Other if it doesn't match what you're looking for.
- When creating an issue, make sure you fill up all the fields properly.
- Make sure that you are NOT raising a duplicate issue.
- If you want to work on the issue, please click on the I am willing to work on this issue checkmark.
- Add the point label that corresponds to the issue. See our levels chart to help you.
- Note: If you aren't the owner of the issue, please comment that you're willing to work on the issue and wait for maintainers to assign you the issue. Also, don't work on the issue if you're NOT assigned.
- Please do not start working on the issue if you aren't yet assigned and have the
ready 🚀
label. - Work on only ONE issue at a time.
Closing the issue 📍
- If you decide to close the issue, please leave a brief comment describing why(e.g., I'm busy with other obligations.) before you do.
- Note: If the Pull Request associated with the issue gets merged and the issue still remains open, it's your responsibility to close the issue.
We follow a standardized commit message format using Commitlint to ensure consistency and clarity in our commit history. Each commit message should adhere to the following guidelines:
-
Type: The commit type must be one of the following:
feat
: A new feature or enhancement.fix
: A bug fix.docs
: Documentation changes.style
: Code style changes (e.g., formatting, semicolons).refactor
: Code refactorings with no feature changes or bug fixes.test
: Adding or improving tests.chore
: General maintenance tasks, build changes, etc.
-
Scope (Optional): The scope provides context for the commit, indicating the specific part of the project being affected. Use a short description in lowercase (e.g.,
auth
,navbar
,README
). -
Description: A brief and meaningful description of the changes made. Start with a capital letter and use the imperative mood (e.g., "Add new feature" instead of "Added new feature").
-
Issue reference (Optional): Include the issue number associated with the commit (e.g.,
#123
).
feat: Add user authentication feature
fix(auth): Resolve login page redirect issue
docs: Update installation instructions
style: Format code according to project guidelines
refactor(navbar): Improve responsiveness
test: Add unit tests for API endpoints
chore: Update dependencies to latest versions
fix: Handle edge case in data processing (#456)
Added new stuff
Fixed a bug
Updated code
auth feature update
chore: fixed some stuff
git commit -m "feat(auth): Implement user signup process (#789)"
-
When you submit a pull request, several tests are automatically run as GitHub Actions. If any of these tests fail, it is your responsibility to try and resolve the underlying issue(s). If you don't know how to resolve the underlying issue(s), you can ask for help.
-
Each pull request should contain a single logical change or related set of changes that make sense to submit together. If a pull request becomes too large or contains too many unrelated changes, it becomes too difficult to review. In such cases, the reviewer has the right to close your pull request and ask that you submit a separate pull request for each logical set of changes that belong together.
-
Link the issue you have resolved in the Pull Request Template (e.g. Closes/Fixes #99).
-
Use our Commit messages Guidelines for your changes.
-
Do not re-open a pull request that a reviewer has closed.
- Make sure to tick the "Allow edits from maintainers" box. This allows us to directly make minor edits / refactors and saves a lot of time.
Note If your pull request has merge conflicts with the
main
branch (GitHub checks for this automatically and notifies you), you are responsible for resolving them. You can do this by merging themain
branch into your branch (git pull upstream main
), and then pushing the updated branch to your fork (git push
). If you need more tips, check out Resolving a merge conflict on GitHub.
- Make sure to tick the "Allow edits from maintainers" box. This allows us to directly make minor edits / refactors and saves a lot of time.
-
If something is missing here, or you feel something is not well described, either create a PR, raise an issue, or do a code review of the person’s PR (ensure that your review conforms to the Code of Conduct)
-
You can tag maintainers for any kind of difficulty using
@username
. You can find the list of maintainer usernames here.
We came up with this chart so you can gauge the issue's difficulty and pick ones that fit within your skillset:
Points | Contribution |
---|---|
priority: low : |
Addition of new links/categories or doing any small task (e.g fixing typos) |
priority: medium : |
Modifying an existing feature |
priority: high : |
Making completely new feature |