Skip to content

Commit 739f86b

Browse files
docs: add CONTRIBUTING.md with @bot claim/drop commands (#173)
1 parent 15c4352 commit 739f86b

1 file changed

Lines changed: 280 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
# Contributing to CircuitVerse Community Dashboard
2+
3+
Thank you for considering contributing to the CircuitVerse Community Dashboard! 🎉
4+
5+
We welcome contributions from everyone, whether you're fixing a bug, improving documentation, or adding a new feature. This guide will help you get started.
6+
7+
---
8+
9+
## 📋 Table of Contents
10+
11+
- [Code of Conduct](#code-of-conduct)
12+
- [Getting Started](#getting-started)
13+
- [Development Setup](#development-setup)
14+
- [How to Contribute](#how-to-contribute)
15+
- [Pull Request Guidelines](#pull-request-guidelines)
16+
- [Commit Message Guidelines](#commit-message-guidelines)
17+
- [Issue Guidelines](#issue-guidelines)
18+
- [Code Style](#code-style)
19+
- [Need Help?](#need-help)
20+
21+
---
22+
23+
## 📜 Code of Conduct
24+
25+
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate in all interactions.
26+
27+
---
28+
29+
## 🚀 Getting Started
30+
31+
### Prerequisites
32+
33+
Before you begin, ensure you have the following installed:
34+
35+
- **Node.js** (v18 or higher)
36+
- **npm** (v9 or higher)
37+
- **Git**
38+
39+
### Fork and Clone
40+
41+
1. Fork the repository on GitHub
42+
2. Clone your fork locally:
43+
44+
```bash
45+
git clone https://github.com/<your-username>/community-dashboard.git
46+
cd community-dashboard
47+
```
48+
49+
3. Add the upstream remote:
50+
51+
```bash
52+
git remote add upstream https://github.com/CircuitVerse/community-dashboard.git
53+
```
54+
55+
---
56+
57+
## ⚙️ Development Setup
58+
59+
1. **Install dependencies:**
60+
61+
```bash
62+
npm install
63+
```
64+
65+
2. **Set up environment variables (optional):**
66+
67+
If you need to generate leaderboard data locally, create a `.env.local` file:
68+
69+
```env
70+
GITHUB_TOKEN=ghp_your_token_here
71+
```
72+
73+
3. **Start the development server:**
74+
75+
```bash
76+
npm run dev
77+
```
78+
79+
The app will be available at `http://localhost:3000`.
80+
81+
---
82+
83+
## 🤝 How to Contribute
84+
85+
### Finding Issues
86+
87+
- Browse our [open issues](https://github.com/CircuitVerse/community-dashboard/issues)
88+
- Look for issues labeled `good first issue` for beginner-friendly tasks
89+
- Check for issues labeled `help wanted` for priority tasks
90+
91+
### Claiming an Issue
92+
93+
#### To claim an issue:
94+
95+
Comment on the issue with:
96+
97+
```
98+
@bot claim
99+
```
100+
101+
The bot will automatically assign you to the issue if:
102+
103+
- ✅ The issue is not already assigned to someone else
104+
- ✅ You don't have any other open issues assigned to you
105+
106+
#### To unclaim an issue:
107+
108+
If you can no longer work on an issue, comment:
109+
110+
```
111+
@bot drop
112+
```
113+
114+
This will remove you from the issue and make it available for others.
115+
116+
#### Rules
117+
118+
| Rule | Description |
119+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
120+
| **One issue at a time** | You can only be assigned to one open issue at a time. Complete or unclaim your current issue before claiming a new one. |
121+
| **First come, first served** | Issues are assigned to the first person who claims them. |
122+
| **In Progress label** | When assigned, the issue automatically gets the `in progress` label. |
123+
124+
### Contributing Without an Issue
125+
126+
For small fixes (typos, minor improvements), you can submit a PR directly. For larger changes, please open an issue first to discuss your approach.
127+
128+
---
129+
130+
## 📝 Pull Request Guidelines
131+
132+
### Before Submitting
133+
134+
1. **Sync your fork** with the latest changes from upstream:
135+
136+
```bash
137+
git fetch upstream
138+
git checkout main
139+
git merge upstream/main
140+
```
141+
142+
2. **Create a feature branch:**
143+
144+
```bash
145+
git checkout -b feat/your-feature-name
146+
```
147+
148+
3. **Make your changes** and test them locally
149+
150+
4. **Run linting and tests:**
151+
152+
```bash
153+
npm run lint
154+
npm run build
155+
```
156+
157+
### Submitting Your PR
158+
159+
1. Push your branch to your fork:
160+
161+
```bash
162+
git push origin feat/your-feature-name
163+
```
164+
165+
2. Open a Pull Request against the `main` branch
166+
167+
3. Fill out the PR template with:
168+
- A clear description of what changes you made
169+
- Reference to the issue it addresses (e.g., `Fixes #123`)
170+
- Screenshots/recordings for UI changes
171+
172+
### PR Review Process
173+
174+
- PRs require approval from at least one maintainer
175+
- Address any feedback promptly
176+
- Keep your PR focused - one feature/fix per PR
177+
- Keep your PR small when possible
178+
179+
---
180+
181+
## 💬 Commit Message Guidelines
182+
183+
We follow **Conventional Commits** format:
184+
185+
```
186+
<type>(<scope>): <description>
187+
188+
[optional body]
189+
190+
[optional footer]
191+
```
192+
193+
### Types
194+
195+
| Type | Description |
196+
| ---------- | ---------------------------------------- |
197+
| `feat` | A new feature |
198+
| `fix` | A bug fix |
199+
| `docs` | Documentation changes |
200+
| `style` | Code style changes (formatting, etc.) |
201+
| `refactor` | Code refactoring without feature changes |
202+
| `test` | Adding or updating tests |
203+
| `chore` | Maintenance tasks (build, deps, etc.) |
204+
205+
### Examples
206+
207+
```
208+
feat(leaderboard): add contributor heatmap component
209+
210+
fix(ui): resolve dark mode toggle flicker
211+
212+
docs: update contributing guidelines
213+
```
214+
215+
---
216+
217+
## 🐛 Issue Guidelines
218+
219+
### Reporting Bugs
220+
221+
When reporting a bug, please include:
222+
223+
- A clear, descriptive title
224+
- Steps to reproduce the issue
225+
- Expected behavior
226+
- Actual behavior
227+
- Screenshots if applicable
228+
- Browser/OS information
229+
230+
### Requesting Features
231+
232+
When requesting a feature:
233+
234+
- Describe the problem you're trying to solve
235+
- Explain your proposed solution
236+
- Consider alternative approaches
237+
- Add mockups or examples if helpful
238+
239+
---
240+
241+
## 🎨 Code Style
242+
243+
### General Guidelines
244+
245+
- Use **TypeScript** for type safety
246+
- Follow existing code patterns and structure
247+
- Use **Tailwind CSS** for styling
248+
- Write descriptive variable and function names
249+
- Add comments for complex logic
250+
251+
### File Organization
252+
253+
- Components go in `components/`
254+
- Utility functions go in `lib/`
255+
- Types go in `types/`
256+
- API routes go in `app/api/`
257+
258+
### Formatting
259+
260+
The project uses ESLint for linting. Run the linter before committing:
261+
262+
```bash
263+
npm run lint
264+
```
265+
266+
---
267+
268+
## ❓ Need Help?
269+
270+
- **Slack:** Join the CircuitVerse Slack workspace for real-time discussions
271+
- **GitHub Discussions:** For general questions and ideas
272+
- **Issues:** For specific problems or feature requests
273+
274+
---
275+
276+
## 🙏 Thank You!
277+
278+
Your contributions make CircuitVerse better for everyone. We appreciate your time and effort!
279+
280+
Happy Contributing! 🚀

0 commit comments

Comments
 (0)