Skip to content

Commit 67dc178

Browse files
committed
docs: update contributing-guidelines
Included Environment Setup for GitHub API access. Clarified Contributing Workflow (fork, branch, commit, push, PR). Added Formatting commands (lint, format, build). Updated Branding & Naming Conventions.
1 parent 1abe99e commit 67dc178

File tree

1 file changed

+136
-27
lines changed

1 file changed

+136
-27
lines changed

community/contributing-guidelines.md

Lines changed: 136 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,18 @@ sidebar_label: Contributing Guidelines
55
sidebar_position: 2
66
---
77

8-
Thank you for considering contributing to recode hive! We welcome contributions from everyone. Whether you're a seasoned developer or just starting out, there are many ways to get involved and help improve recode hive. This document outlines the guidelines for contributing to this project.
8+
## Table of Contents
99

10-
## Getting Started
10+
- [Local Setup Guide](#local-setup-guide)
11+
- [Environment Setup (for GitHub API access)](#environment-setup-for-github-api-access)
12+
- [Contributing to recode hive](#contributing-to-recode-hive)
13+
- [Formatting](#formatting)
14+
- [Branding & Naming Conventions](#branding--naming-conventions)
15+
- [License](#license)
1116

12-
To get started with contributing to recode hive, please refer to our [Contributing Guidelines](/community/contributing-guidelines).
17+
## Local Setup Guide
1318

14-
Follow these steps:
15-
16-
```mermaid
17-
flowchart LR
18-
Fork[Fork the project]-->branch[Create a New Branch]
19-
branch-->Edit[Edit file]
20-
Edit-->commit[Commit the changes]
21-
commit -->|Finally|creatpr((Create a Pull Request))
22-
```
19+
### How to set up recode hive:
2320

2421
1. **Clone the repository:**
2522

@@ -49,26 +46,138 @@ flowchart LR
4946

5047
This command will start a development server and open the application in your default web browser.
5148

52-
**If you'd like to contribute to recode hive, please follow these guidelines:**
49+
## Environment Setup (for GitHub API access)
5350

54-
- **Fork** the repository and clone it locally.
55-
- Create a new branch for your feature or bug fix: `git checkout -b feature-name`
56-
- Make your changes and test thoroughly.
57-
- Commit your changes: `git commit -m "Brief description of your changes"`
58-
- Push to the branch: `git push origin feature-name`
59-
- Submit a pull request detailing your changes.
51+
Some parts of the dashboard — such as the Leaderboard — require access to the GitHub API.
52+
To avoid rate-limit issues, you’ll need to set up a GitHub Personal Access Token (PAT) locally.
6053

61-
### Branding & Naming Conventions
54+
1. **Copy the example environment file**
6255

63-
- Use **`recode hive`** in lowercase for all mentions of the project name.
64-
- Update any headers, titles, or utility constants accordingly.
56+
```bash
57+
cp .env.example .env
58+
```
59+
60+
This creates your local `.env` configuration file.
61+
62+
2. **Generate a GitHub Personal Access Token**
63+
1. Go to [https://github.com/settings/tokens](https://github.com/settings/tokens)
64+
2. Click **“Generate new token (classic)”**
65+
3. Give it a name (e.g. `recode hive`)
66+
4. Select **no special permissions** (the default is fine for public data)
67+
5. Copy the generated token
68+
69+
3. **Add your token to `.env`**
70+
71+
Open `.env` and update this line:
72+
73+
```bash
74+
GITHUB_TOKEN=ghp_your_generated_token_here
75+
```
76+
77+
## Contributing to recode hive
78+
79+
We welcome contributions! Follow these steps to get started.
80+
81+
1. **Fork the Repository**
82+
- Go to the [recode hive repository](https://github.com/recodehive/recode-website) and click **Fork**.
83+
84+
2. **Clone Your Fork Locally**
85+
86+
```bash
87+
git clone https://github.com/your-username/recodehive-website.git
88+
cd recodehive-website
89+
```
90+
91+
3. **Add the Original Repository as Upstream**
92+
93+
This allows you to fetch changes from the main repository to keep your fork up to date.
94+
95+
```bash
96+
git remote add upstream <repo-url>
97+
```
98+
99+
Verify the remotes:
100+
101+
```bash
102+
git remote -v
103+
```
104+
105+
You should see both origin (your fork) and upstream (main repository).
106+
107+
4. **Keep Your Fork Updated**
108+
109+
Before starting a new feature or bug fix, update your local main branch:
110+
111+
```bash
112+
git checkout main
113+
git fetch upstream
114+
git merge upstream/main
115+
```
65116

66-
### Formatting
117+
This ensures your branch starts from the latest version of the main repository.
67118

68-
- Follow the existing code style for spacing, indentation, and Markdown formatting.
69-
- Use Prettier or ESLint to auto-format files before committing.
119+
5. **Create a New Branch**
120+
121+
Create a branch for your feature or bug fix:
122+
123+
```bash
124+
git checkout -b feature-name
125+
```
126+
127+
6. **Commit Your Changes**
128+
129+
```bash
130+
git add .
131+
git commit -m "Brief description of your changes"
132+
```
133+
134+
7. **Push Your Branch to Your Fork**
135+
136+
```bash
137+
git push origin feature-name
138+
```
139+
140+
8. **Open a Pull Request**
141+
1. Go to your fork on GitHub.
142+
143+
2. Click Compare & pull request for your branch.
144+
145+
3. Fill out the PR template with a clear description of your changes.
146+
147+
4. Submit the PR.
148+
149+
> Tip: If your branch falls behind main, you can fetch and merge updates from upstream again before pushing.
150+
151+
## Formatting
152+
153+
To ensure consistent code style and catch errors before committing, please follow these steps:
154+
155+
2. **Automatically fix linting issues where possible**:
156+
157+
```bash
158+
npm run lint:fix
159+
```
160+
161+
3. **Format code according to project conventions**:
162+
163+
```bash
164+
npm run format
165+
```
166+
167+
4. **Build the project to verify everything compiles correctly**:
168+
169+
```bash
170+
npm run build
171+
```
172+
173+
It’s recommended to run these commands before committing to maintain code quality and consistency.
174+
175+
## Branding & Naming Conventions
176+
177+
- Use **`recode hive`** in lowercase for all mentions of the project name.
178+
- Update any headers, titles, or utility constants accordingly.
70179

71-
## Exceptions to Lowercase Branding
180+
### Exceptions to Lowercase Branding
72181

73182
While we use lowercase **`recode hive`** throughout the project for consistency, there are some places where the exact repository name with capitalization must be used:
74183

@@ -78,4 +187,4 @@ While we use lowercase **`recode hive`** throughout the project for consistency,
78187

79188
## License
80189

81-
This project is licensed under the [MIT License](/License).
190+
This project is open source and available under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)