Skip to content

Commit 066876a

Browse files
committed
docs: create CONTRIBUTING.md with setup and guidelines (closes #29)
1 parent e07eb9c commit 066876a

1 file changed

Lines changed: 155 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Contributing to DevImpact
2+
3+
Thank you for your interest in contributing to DevImpact! This guide will help you get started.
4+
5+
## Table of Contents
6+
7+
- [Getting Started](#getting-started)
8+
- [Development Setup](#development-setup)
9+
- [Project Structure](#project-structure)
10+
- [Making Changes](#making-changes)
11+
- [Pull Request Guidelines](#pull-request-guidelines)
12+
- [Issue Guidelines](#issue-guidelines)
13+
- [Coding Standards](#coding-standards)
14+
- [Need Help?](#need-help)
15+
16+
## Getting Started
17+
18+
1. **Fork** the repository on GitHub
19+
2. **Clone** your fork locally:
20+
```bash
21+
git clone https://github.com/your-username/DevImpact.git
22+
cd DevImpact
23+
```
24+
3. **Add the upstream remote**:
25+
```bash
26+
git remote add upstream https://github.com/O2sa/DevImpact.git
27+
```
28+
29+
## Development Setup
30+
31+
### Prerequisites
32+
33+
- [Node.js](https://nodejs.org/) (v18 or higher)
34+
- [pnpm](https://pnpm.io/) package manager
35+
- A [GitHub Personal Access Token](https://github.com/settings/tokens) with `read:user` and `repo` scopes
36+
37+
### Installation
38+
39+
1. Install dependencies:
40+
```bash
41+
pnpm install
42+
```
43+
44+
2. Create a `.env` file in the project root (see `.env.example`):
45+
```
46+
GITHUB_TOKEN=your_github_token_here
47+
```
48+
49+
3. Start the development server:
50+
```bash
51+
pnpm dev
52+
```
53+
54+
4. Open [http://localhost:3000](http://localhost:3000) in your browser.
55+
56+
## Project Structure
57+
58+
```
59+
DevImpact/
60+
├── app/ # Next.js App Router pages and API routes
61+
├── components/ # Reusable React components
62+
├── lib/ # Utility functions, GitHub API client, scoring logic
63+
├── types/ # TypeScript type definitions
64+
├── .github/ # Issue templates, PR template, workflows
65+
├── tailwind.config.ts
66+
├── next.config.js
67+
└── tsconfig.json
68+
```
69+
70+
### Tech Stack
71+
72+
- **Framework**: Next.js 16+ (App Router)
73+
- **Language**: TypeScript
74+
- **Styling**: Tailwind CSS
75+
- **UI Components**: Radix UI, Lucide React icons
76+
- **Charts**: Recharts
77+
- **API**: GitHub GraphQL API via Octokit
78+
79+
## Making Changes
80+
81+
1. **Sync your fork** with the latest upstream changes:
82+
```bash
83+
git fetch upstream
84+
git checkout main
85+
git merge upstream/main
86+
```
87+
88+
2. **Create a feature branch** from `main`:
89+
```bash
90+
git checkout -b feat/your-feature-name
91+
```
92+
93+
3. **Make your changes** and test them locally.
94+
95+
4. **Run the linter** before committing:
96+
```bash
97+
pnpm lint
98+
```
99+
100+
5. **Commit your changes** with a clear message:
101+
```bash
102+
git commit -m "feat: add your feature description"
103+
```
104+
105+
6. **Push** to your fork and open a Pull Request.
106+
107+
### Commit Message Format
108+
109+
Use descriptive commit messages with a prefix:
110+
111+
- `feat:` for new features
112+
- `fix:` for bug fixes
113+
- `docs:` for documentation changes
114+
- `refactor:` for code refactoring
115+
- `style:` for formatting changes (no logic change)
116+
- `test:` for adding or updating tests
117+
118+
## Pull Request Guidelines
119+
120+
- Reference the related issue using `Fixes #<issue_number>` in the PR description
121+
- Keep PRs focused on a single change
122+
- Make sure the linter passes (`pnpm lint`)
123+
- Test your changes locally before submitting
124+
- Fill out the PR template provided
125+
- Be responsive to review feedback
126+
127+
## Issue Guidelines
128+
129+
We use several issue templates:
130+
131+
- **Bug Report** - for reporting bugs
132+
- **Feature Request** - for suggesting new features
133+
- **Feature Change Request** - for modifying existing features
134+
- **Documentation** - for documentation improvements
135+
- **Refactoring** - for code quality improvements
136+
137+
When opening an issue, please use the appropriate template and provide as much detail as possible.
138+
139+
## Coding Standards
140+
141+
- **TypeScript**: Use proper types. Avoid `any` where possible.
142+
- **Components**: Keep components small and focused. Use the `components/` directory for reusable UI elements.
143+
- **Styling**: Use Tailwind CSS utility classes. Follow the existing patterns in the codebase.
144+
- **API calls**: Use the existing GitHub API client in `lib/` rather than creating new API integrations.
145+
- **File naming**: Use kebab-case for files (e.g., `compare-form.tsx`).
146+
147+
## Need Help?
148+
149+
- Check the [open issues](https://github.com/O2sa/DevImpact/issues) for tasks you can work on
150+
- Look for issues labeled `good first issue` for beginner-friendly tasks
151+
- Open a new issue if you have questions or suggestions
152+
153+
## License
154+
155+
By contributing to DevImpact, you agree that your contributions will be licensed under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)