| id | contributing-guidelines |
|---|---|
| title | Contributing Guidelines |
| sidebar_label | Contributing Guidelines |
| sidebar_position | 2 |
- Local Setup Guide
- Environment Setup (for GitHub API access)
- Contributing to recode hive
- Formatting
- Branding & Naming Conventions
- License
-
Clone the repository:
git clone https://github.com/your-username/recode-website.git
-
Navigate to the project directory:
cd recode-website -
Install dependencies:
npm install
-
Running the Application:
Once you have installed the dependencies, you can run the application locally using:
npm start
This command will start a development server and open the application in your default web browser.
Some parts of the dashboard — such as the Leaderboard — require access to the GitHub API. To avoid rate-limit issues, you’ll need to set up a GitHub Personal Access Token (PAT) locally.
-
Copy the example environment file
cp .env.example .env
This creates your local
.envconfiguration file. -
Generate a GitHub Personal Access Token
- Go to https://github.com/settings/tokens
- Click “Generate new token (classic)”
- Give it a name (e.g.
recode hive) - Select no special permissions (the default is fine for public data)
- Copy the generated token
-
Add your token to
.envOpen
.envand update this line:GITHUB_TOKEN=ghp_your_generated_token_here
-
Note for Local Development
Most pages work without a GitHub token, including:
- 🎖️ GitHub Badges page (
/badges/github-badges/) - 📚 Documentation and blog posts
- 🏪 Merch store (requires Shopify config)
The GitHub token is only required for:
- 📊 Dashboard leaderboard functionality
- 📈 Real-time GitHub statistics
If you see GitHub API errors, ensure your
.envfile is properly configured. - 🎖️ GitHub Badges page (
We welcome contributions! Follow these steps to get started.
-
Fork the Repository
- Go to the recode hive repository and click Fork.
-
Clone Your Fork Locally
git clone https://github.com/your-username/recode-website.git cd recode-website -
Add the Original Repository as Upstream
This allows you to fetch changes from the main repository to keep your fork up to date.
git remote add upstream https://github.com/recodehive/recode-website.git
Verify the remotes:
git remote -v
You should see both origin (your fork) and upstream (main repository).
-
Keep Your Fork Updated
Before starting a new feature or bug fix, update your local main branch:
git checkout main git fetch upstream git merge upstream/main
This ensures your branch starts from the latest version of the main repository.
-
Create a New Branch
Create a branch for your feature or bug fix:
git checkout -b feature-name
-
Commit Your Changes
git add . git commit -m "Brief description of your changes"
-
Push Your Branch to Your Fork
git push origin feature-name
-
Open a Pull Request
-
Go to your fork on GitHub.
-
Click Compare & pull request for your branch.
-
Fill out the PR template with a clear description of your changes.
-
Submit the PR.
Tip: If your branch falls behind main, you can fetch and merge updates from upstream again before pushing.
-
To ensure consistent code style and catch errors before committing, please follow these steps:
-
Automatically fix linting issues where possible:
npm run lint:fix
-
Format code according to project conventions:
npm run format
-
Build the project to verify everything compiles correctly:
npm run build
It’s recommended to run these commands before committing to maintain code quality and consistency.
- Use
recode hivein lowercase for all mentions of the project name. - Update any headers, titles, or utility constants accordingly.
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:
- Repository-specific badges (e.g., contrib.rocks)
- GitHub repository URLs in tools or badges
- Any external services that require exact repo names
This project is open source and available under the MIT License.