|
| 1 | +# 🤝 Contributing to DevImpact |
| 2 | + |
| 3 | +Thank you for your interest in contributing to DevImpact! We welcome contributions from the community and are excited to work with you. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📋 Table of Contents |
| 8 | + |
| 9 | +- [Code of Conduct](#code-of-conduct) |
| 10 | +- [Getting Started](#getting-started) |
| 11 | +- [Development Setup](#development-setup) |
| 12 | +- [How to Contribute](#how-to-contribute) |
| 13 | +- [Pull Request Guidelines](#pull-request-guidelines) |
| 14 | +- [Coding Standards](#coding-standards) |
| 15 | +- [Reporting Bugs](#reporting-bugs) |
| 16 | +- [Suggesting Features](#suggesting-features) |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## 📜 Code of Conduct |
| 21 | + |
| 22 | +By participating in this project, you agree to maintain a respectful and inclusive environment. Please be kind and constructive in all interactions. |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## 🚀 Getting Started |
| 27 | + |
| 28 | +1. **Fork** the repository on GitHub |
| 29 | +2. **Clone** your fork locally: |
| 30 | + ```bash |
| 31 | + git clone https://github.com/your-username/DevImpact.git |
| 32 | + cd DevImpact |
| 33 | + ``` |
| 34 | +3. **Add** the upstream remote: |
| 35 | + ```bash |
| 36 | + git remote add upstream https://github.com/O2sa/DevImpact.git |
| 37 | + ``` |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## 🛠️ Development Setup |
| 42 | + |
| 43 | +### Prerequisites |
| 44 | + |
| 45 | +- Node.js 18+ |
| 46 | +- pnpm |
| 47 | + |
| 48 | +### Install dependencies |
| 49 | + |
| 50 | +```bash |
| 51 | +pnpm install |
| 52 | +``` |
| 53 | + |
| 54 | +### Set up environment variables |
| 55 | + |
| 56 | +Create a `.env` file in the project root: |
| 57 | + |
| 58 | +``` |
| 59 | +GITHUB_TOKEN=your_github_personal_access_token |
| 60 | +``` |
| 61 | + |
| 62 | +> **Note:** Your GitHub token needs `read:user` and `public_repo` scopes. |
| 63 | +
|
| 64 | +### Run the development server |
| 65 | + |
| 66 | +```bash |
| 67 | +pnpm run dev |
| 68 | +``` |
| 69 | + |
| 70 | +The app will be available at `http://localhost:3000`. |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## 🔧 How to Contribute |
| 75 | + |
| 76 | +### 1. Find an issue |
| 77 | + |
| 78 | +- Browse [open issues](https://github.com/O2sa/DevImpact/issues) |
| 79 | +- Look for issues labeled `good first issue` or `help wanted` |
| 80 | +- Comment on the issue to let others know you're working on it |
| 81 | + |
| 82 | +### 2. Create a branch |
| 83 | + |
| 84 | +Always branch from `main`: |
| 85 | + |
| 86 | +```bash |
| 87 | +git checkout main |
| 88 | +git pull upstream main |
| 89 | +git checkout -b feat/your-feature-name |
| 90 | +# or |
| 91 | +git checkout -b fix/your-bug-fix |
| 92 | +``` |
| 93 | + |
| 94 | +### 3. Make your changes |
| 95 | + |
| 96 | +- Write clean, readable code |
| 97 | +- Follow the existing code style |
| 98 | +- Add comments where the logic is non-obvious |
| 99 | + |
| 100 | +### 4. Test your changes |
| 101 | + |
| 102 | +Make sure the app runs correctly with your changes: |
| 103 | + |
| 104 | +```bash |
| 105 | +pnpm run dev |
| 106 | +``` |
| 107 | + |
| 108 | +### 5. Commit your changes |
| 109 | + |
| 110 | +Use clear, descriptive commit messages: |
| 111 | + |
| 112 | +```bash |
| 113 | +git add . |
| 114 | +git commit -m "feat: add dark mode toggle" |
| 115 | +# or |
| 116 | +git commit -m "fix: correct score calculation for forked repos" |
| 117 | +``` |
| 118 | + |
| 119 | +### 6. Push and open a PR |
| 120 | + |
| 121 | +```bash |
| 122 | +git push origin feat/your-feature-name |
| 123 | +``` |
| 124 | + |
| 125 | +Then open a Pull Request on GitHub. |
| 126 | + |
| 127 | +--- |
| 128 | + |
| 129 | +## ✅ Pull Request Guidelines |
| 130 | + |
| 131 | +- **One PR per issue** — keep changes focused |
| 132 | +- **Reference the issue** in your PR description: `Closes #123` |
| 133 | +- **Write a clear description** of what changed and why |
| 134 | +- **Keep diffs small** — large PRs are harder to review |
| 135 | +- Be responsive to reviewer feedback |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +## 🎨 Coding Standards |
| 140 | + |
| 141 | +- **TypeScript** — use proper types, avoid `any` |
| 142 | +- **Tailwind CSS** — use utility classes; avoid inline styles |
| 143 | +- **Components** — keep them small and focused (single responsibility) |
| 144 | +- **File naming** — use kebab-case for files, PascalCase for components |
| 145 | + |
| 146 | +--- |
| 147 | + |
| 148 | +## 🐛 Reporting Bugs |
| 149 | + |
| 150 | +Found a bug? Please open an issue with: |
| 151 | + |
| 152 | +1. A clear title and description |
| 153 | +2. Steps to reproduce the bug |
| 154 | +3. Expected vs actual behavior |
| 155 | +4. Screenshots or error messages if available |
| 156 | +5. Your environment (OS, Node.js version, browser) |
| 157 | + |
| 158 | +--- |
| 159 | + |
| 160 | +## 💡 Suggesting Features |
| 161 | + |
| 162 | +Have an idea? Open a feature request issue with: |
| 163 | + |
| 164 | +1. A clear description of the feature |
| 165 | +2. Why it would be useful |
| 166 | +3. Any implementation ideas you have |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +## 🙌 Thank You |
| 171 | + |
| 172 | +Every contribution — no matter how small — makes DevImpact better for everyone. We appreciate your time and effort! |
0 commit comments