|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -Thanks for helping improve `commitmentissues.dev`. |
| 3 | +Thanks for taking the time. The bar is "small, focused, and consistent with what's already there." |
4 | 4 |
|
5 | 5 | ## Ground rules |
6 | 6 |
|
7 | | -- Keep PRs small and focused. |
8 | | -- One concern per PR (bugfix, feature, docs, or refactor). |
9 | | -- Preserve the existing product tone and UI style. |
10 | | -- Do not introduce heavy dependencies unless clearly justified. |
| 7 | +- One concern per PR — bugfix, feature, docs, or refactor. |
| 8 | +- Match the existing tone, design system, and file conventions (see below). |
| 9 | +- No heavyweight dependencies unless clearly justified in the PR description. |
| 10 | +- No telemetry, accounts, or anything that requires the user to log in. |
11 | 11 |
|
12 | 12 | ## Local setup |
13 | 13 |
|
14 | 14 | ```bash |
| 15 | +git clone https://github.com/dotsystemsdevs/commitmentissues.git |
| 16 | +cd commitmentissues |
15 | 17 | npm install |
16 | 18 | npm run dev |
17 | 19 | ``` |
18 | 20 |
|
19 | | -Optional for higher GitHub API limits: |
20 | | - |
21 | | -```env |
22 | | -GITHUB_TOKEN=ghp_yourtoken |
23 | | -``` |
| 21 | +Open [http://localhost:3000](http://localhost:3000). Every environment variable is optional — see [`.env.example`](../.env.example). |
24 | 22 |
|
25 | 23 | ## Before opening a PR |
26 | 24 |
|
27 | | -Run: |
28 | | - |
29 | 25 | ```bash |
30 | 26 | npm run lint |
| 27 | +npm run typecheck |
31 | 28 | npm test |
32 | 29 | ``` |
33 | 30 |
|
34 | | -If you changed runtime behavior, also run: |
| 31 | +If you changed runtime behaviour (anything outside docs / tests), also run: |
35 | 32 |
|
36 | 33 | ```bash |
37 | 34 | npm run build |
38 | 35 | ``` |
39 | 36 |
|
| 37 | +CI runs the same three commands plus `build` on every push and PR to `main`. |
| 38 | + |
40 | 39 | ## Branch and PR flow |
41 | 40 |
|
42 | | -1. Fork repo |
43 | | -2. Create feature branch (`feat/...`, `fix/...`, `docs/...`, `chore/...`) |
44 | | -3. Commit with clear message |
45 | | -4. Open PR to `main` |
| 41 | +1. Fork the repo. |
| 42 | +2. Create a branch named `feat/...`, `fix/...`, `docs/...`, or `chore/...`. |
| 43 | +3. Keep commits small. Conventional Commit prefixes are appreciated but not required. |
| 44 | +4. Open the PR against `main`. Fill in the PR template — what changed, why, and screenshots if anything visual moved. |
46 | 45 |
|
47 | | -## Issue hygiene |
| 46 | +## File and folder conventions |
48 | 47 |
|
49 | | -- Use issue templates when available. |
50 | | -- Include reproduction steps for bugs. |
51 | | -- Include acceptance criteria for feature requests. |
| 48 | +- React components: `PascalCase.tsx` in `src/components/`. |
| 49 | +- Hooks: `useCamelCase.ts` — co-located with the component if scoped to one feature, otherwise in `src/hooks/`. |
| 50 | +- Library / pure logic: `camelCase.ts` in `src/lib/`. Keep this layer free of React imports. |
| 51 | +- API routes follow the App Router convention: `src/app/api/<name>/route.ts`. |
| 52 | +- Docs and config: `kebab-case.md`. |
| 53 | +- Folders: lowercase. |
52 | 54 |
|
53 | 55 | ## Scope expectations |
54 | 56 |
|
55 | 57 | Good first contributions: |
56 | 58 |
|
57 | | -- UI polish and micro-interactions |
58 | | -- Small bug fixes |
59 | | -- Docs improvements |
60 | | -- Tests around `src/lib/scoring.ts` |
| 59 | +- UI polish, micro-interactions, accessibility fixes. |
| 60 | +- Small bug fixes with a clear repro. |
| 61 | +- New rules in [`scoring.ts`](../src/lib/scoring.ts) — with a test case. |
| 62 | +- Docs and screenshot updates. |
| 63 | + |
| 64 | +Please check in before opening: |
| 65 | + |
| 66 | +- Larger refactors or architecture changes. |
| 67 | +- New runtime dependencies. |
| 68 | +- Anything that adds backend state (we already lean heavily on Redis). |
61 | 69 |
|
62 | 70 | Avoid in first PRs: |
63 | 71 |
|
64 | | -- Large rewrites |
65 | | -- Broad architecture refactors |
66 | | -- Unrelated cleanup mixed into feature work |
| 72 | +- Sweeping rewrites mixed into a feature. |
| 73 | +- Unrelated cleanup bundled into a fix. |
| 74 | +- Style-only changes that fight the design tokens in [`globals.css`](../src/app/globals.css). |
| 75 | + |
| 76 | +## Reporting bugs and requesting features |
67 | 77 |
|
| 78 | +Use the issue templates in [`.github/ISSUE_TEMPLATE/`](ISSUE_TEMPLATE). Include a reproduction for bugs and acceptance criteria for features. |
0 commit comments