You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This runbook describes how to contribute to the repository when working from Linear tickets. Following these steps keeps branches tidy, ensures quality checks pass, and links your work to the right issue.
4
+
5
+
---
6
+
7
+
## Prerequisites
8
+
9
+
-**Bun** installed ([bun.sh](https://bun.sh))
10
+
- Access to the repository and (for PRs) the default branch
11
+
- A Linear ticket you’re implementing (e.g. `CSSG-12`)
12
+
13
+
---
14
+
15
+
## Step 1: Start from an up-to-date `main`
16
+
17
+
```bash
18
+
git checkout main
19
+
git pull origin main
20
+
```
21
+
22
+
Always branch from the latest `main` so your changes don’t conflict with others’ work.
23
+
24
+
---
25
+
26
+
## Step 2: Create a descriptive branch
27
+
28
+
Use a **three-word, hyphen-separated** branch name that summarizes the work (no issue code here; that goes in the PR title).
| CSSG-12 (public pages + global nav) |`public-pages-global-nav` or `global-navbar-public-pages`|
35
+
| CSSG-13 (login, signup, onboarding) |`login-signup-onboarding` or `auth-onboarding-flow`|
36
+
37
+
```bash
38
+
git switch -c your-three-word-branch-name
39
+
```
40
+
41
+
---
42
+
43
+
## Step 3: Do your changes
44
+
45
+
- Implement the acceptance criteria from the Linear ticket.
46
+
- Prefer small, focused commits (e.g. one logical change per commit).
47
+
- If the ticket references Figma or a design doc, keep that open for reference.
48
+
49
+
---
50
+
51
+
## Step 4: Lint, format, and test
52
+
53
+
From the **repository root**, run:
54
+
55
+
```bash
56
+
# Lint all workspaces (frontend, backend, shared)
57
+
bun run lint:all
58
+
59
+
# Format all workspaces (writes formatted files)
60
+
bun run format:all
61
+
62
+
# Verify formatting (CI-style check; must pass for clean CI)
63
+
bun run format:check:all
64
+
65
+
# Run all tests
66
+
bun run test:all
67
+
```
68
+
69
+
Fix any failures before pushing. Optional: run only the parts you changed:
70
+
71
+
-`bun run lint:frontend` / `lint:backend` / `lint:shared`
72
+
-`bun run format:frontend` / `format:backend` / `format:shared`
73
+
-`bun run test:backend` / `test:shared`
74
+
75
+
---
76
+
77
+
## Step 5: Push your branch
78
+
79
+
```bash
80
+
git push -u origin your-three-word-branch-name
81
+
```
82
+
83
+
Use the same branch name you created in Step 2.
84
+
85
+
---
86
+
87
+
## Step 6: Open a PR linked to Linear
88
+
89
+
Create a Pull Request with a title in this form so Linear can link it to the issue:
90
+
91
+
```
92
+
[ISSUE-CODE]: Short description of the change
93
+
```
94
+
95
+
**Examples:**
96
+
97
+
-`[CSSG-12]: Add global navbar and public pages (Home, About, Contact, Projects)`
98
+
-`[CSSG-13]: Add login, signup, and onboarding flow with Figma-aligned UI`
99
+
100
+
Use the **exact** issue identifier (e.g. `CSSG-12`, `CSSG-13`). Linear will then show the PR on the issue and vice versa.
101
+
102
+
When you open a PR, GitHub will pre-fill the body from the [PR template](.github/PULL_REQUEST_TEMPLATE.md). Fill in the **Issue** (Linear ticket code), a short **Summary**, and any **How to verify** steps for reviewers. You can also add "Closes ISSUE-CODE" or note follow-ups in the description.
Copy file name to clipboardExpand all lines: README.md
+35-33Lines changed: 35 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
This repository is a **Bun workspace** monorepo containing shared packages and deployable applications.
4
4
5
+
**Contributing:** See [CONTRIBUTING.md](./CONTRIBUTING.md) for the contribution runbook (branch from Linear tickets, lint/format/test, and PR naming to link to Linear).
|`apps/frontend`|`frontend`| Next.js app (React, Tailwind). Depends on `@cssg/shared`. |
25
-
|`apps/backend`|`backend`| Hono HTTP API run with Bun. Depends on `@cssg/shared`. |
26
-
|`packages/shared`|`@cssg/shared`| Shared TypeScript utilities/types. No app-specific deps. |
27
+
|`apps/backend`|`backend`| Hono HTTP API run with Bun. Depends on `@cssg/shared`. |
28
+
|`packages/shared`|`@cssg/shared`| Shared TypeScript utilities/types. No app-specific deps. |
27
29
28
30
-**Root**`package.json` defines `"workspaces": ["packages/*", "apps/*"]`. Dependencies are hoisted where possible.
29
31
-**Shared code**: Add types, utils, or constants in `packages/shared` and depend on it with `"@cssg/shared": "workspace:*"` in an app’s `package.json`, then run `bun install` from the repo root.
@@ -39,11 +41,11 @@ Run these from the **repository root** unless noted.
39
41
40
42
### Development
41
43
42
-
| Command | Description |
43
-
|-------------------|-------------|
44
-
|`bun run dev:all`| Start all workspaces that have a `dev` script (frontend + backend). |
45
-
|`bun run dev:frontend`| Start only the Next.js app (`apps/frontend`). |
46
-
|`bun run dev:backend`| Start only the Hono backend (`apps/backend`). |
0 commit comments