| id | contributing-guidelines |
|---|---|
| title | Contributing Guidelines |
| sidebar_label | Contributing Guidelines |
| sidebar_position | 2 |
- Local Setup Guide
- Environment Setup
- Contributing to recode hive
- Production Build
- Blog banners
- Formatting
- Tech Stack
- Branding & Naming Conventions
- License
:::tip New to GitHub? Follow the First-time setup guide. It walks you through forking, cloning and running the project step by step. :::
- Node.js 20.9 – 22 (the repo has an
.nvmrcfile, sonvm usepicks the right version) - Git
- Docker (optional)
-
Fork the repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/recode-website.git cd recode-website
-
Set up environment variables (optional, see Environment Setup):
cp .env.example .env
-
Install dependencies and run the site locally:
npm install npm run start
Your application will be available at http://localhost:3000
🐳 Prefer Docker? Use this instead
Docker Compose (with hot-reload):
docker-compose upPlain Docker (no hot-reload, rebuild after changes):
docker build -t recodehive-app .
docker run -p 3000:3000 recodehive-appThe site runs without any environment variables. A GitHub token is recommended because it avoids GitHub API rate limits and fills the discussions, releases and sponsors pages with live data.
-
Copy the example environment file (skip this if you already did it above):
cp .env.example .env
-
Generate a GitHub Personal Access Token
- Go to https://github.com/settings/tokens.
- Click "Generate new token (classic)".
- Give it a name (for example
recode hive). - Tick the
read:discussionscope so the discussions page can load. No other permissions are needed for public data. - Copy the generated token.
-
Add your token to
.envas both variables:GITHUB_TOKEN=ghp_your_generated_token_here DOCUSAURUS_GIT_TOKEN=ghp_your_generated_token_here
:::note What works without a token? Most of the site works without any token, including documentation, blog posts, the badges page and the leaderboard (it uses a hosted backend). The GitHub token only affects live GitHub data such as discussions, releases, sponsors and community PRs.
Keys for Algolia search, Clerk sign-in, EmailJS and Supabase are managed by the maintainers, so those features stay disabled locally unless you create your own. If you need a development key, ask @sanjay-kv. :::
If you see GitHub API errors, check that your .env file is saved in the project root and restart npm run start.
We welcome contributions! Once the project is running locally, follow these steps.
-
Add the original repository as upstream
This lets you 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) andupstream(the 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
-
Create a new branch
git checkout -b feature/your-feature-name
-
Make your changes and test them thoroughly in the running site.
-
Run the checks described in Formatting.
-
Commit your changes
git add . git commit -m "Add: brief description of your changes"
-
Push your branch to your fork
git push origin feature/your-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, fetch and merge updates from upstream again before pushing. :::
To check that the whole site builds, as it does when deployed:
npm run build
npm run serve:::note
The build first fetches releases, sponsors and community PRs from GitHub, so it needs network access. Set the tokens from .env to avoid rate limits.
:::
Every blog post needs a banner so it looks right on the Blogs page.
- Set it in the post's front matter with
image: /img/blogs/your-banner.png, and add acategory:(a short label such as ARCHITECTURE or TUTORIAL). - Banners should be 1600 x 900 pixels (16:9), with one big headline of 3 to 5 words. The Blogs page shows the whole banner without cropping, so a banner in another shape gets empty bars on its sides.
- Keep important text away from the edges and keep the file small (under 300 KB where you can).
- Add
featured: trueonly to the post the editors pick for the Featured spot.
To keep code style consistent and catch errors before they reach review, run these checks before you commit:
-
Automatically fix linting issues where possible:
npm run lint:fix
-
Check types:
npm run typecheck
-
Format the files you changed:
npx prettier --write path/to/your-file.tsx
:::warning
npm run formatrewrites every matching file in the project, which can fill your PR with changes you didn't make. Format only your own files instead. ::: -
Build the project to verify everything compiles:
npm run build
New to these checks? Read Understand Checks before PR for a beginner-friendly explanation.
- Framework: Docusaurus 3 (React + TypeScript)
- Language: TypeScript (Node.js 20.9 – 22)
- Styling: Tailwind CSS 4
- UI components: Radix UI, Framer Motion
- Linting and formatting: ESLint, Prettier
- Type checking: TypeScript (
tsc)
- 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 (for example, shields.io badges)
- 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.