Skip to content

Commit 3690cf0

Browse files
chore(dx): consolidate commands behind make + add editor config
- Make is the canonical interface; pnpm scripts wrap turbo, make wraps pnpm - CI now calls `make ci-web` / `make ci-desktop` so local == CI - Add .nvmrc (node 24, matches CI) + engines field - Add .editorconfig and .vscode (extensions + settings) - Add `pnpm bootstrap` (deps + Playwright Chromium) - Add `dev:web` / `dev:desktop` shortcuts - CONTRIBUTING.md: lead with `make bootstrap`/`make dev-web`, link Tauri prereqs, fix wrong `pnpm dev` claim - CLAUDE.md: command table reflects make-first workflow
1 parent 4a69c7d commit 3690cf0

10 files changed

Lines changed: 145 additions & 32 deletions

File tree

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
indent_style = tab
9+
indent_size = 2
10+
11+
[*.{md,mdx}]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml,toml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.json]
19+
indent_style = tab

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: ./.github/actions/setup
1717

18-
- run: pnpm turbo lint typecheck test build --filter=@openconcho/web
18+
- run: make ci-web
1919

2020
cargo-check:
2121
name: Rust compile check
@@ -36,7 +36,7 @@ jobs:
3636

3737
- uses: ./.github/actions/setup
3838

39-
- run: pnpm turbo cargo-check --filter=@openconcho/desktop
39+
- run: make ci-desktop
4040

4141
release:
4242
name: Release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dist-ssr
1515
# Editor directories and files
1616
.vscode/*
1717
!.vscode/extensions.json
18+
!.vscode/settings.json
1819
.idea
1920
.DS_Store
2021
*.suo

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome",
4+
"tauri-apps.tauri-vscode",
5+
"rust-lang.rust-analyzer",
6+
"bradlc.vscode-tailwindcss",
7+
"editorconfig.editorconfig",
8+
"ms-playwright.playwright"
9+
]
10+
}

.vscode/settings.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.biome": "explicit"
6+
},
7+
"[rust]": {
8+
"editor.defaultFormatter": "rust-lang.rust-analyzer"
9+
},
10+
"typescript.tsdk": "node_modules/typescript/lib",
11+
"typescript.enablePromptUseWorkspaceTsdk": true,
12+
"search.exclude": {
13+
"**/node_modules": true,
14+
"**/dist": true,
15+
"**/.turbo": true,
16+
"**/playwright-report": true,
17+
"**/test-results": true,
18+
"**/src-tauri/target": true,
19+
"**/pnpm-lock.yaml": true,
20+
"packages/web/src/api/schema.d.ts": true,
21+
"packages/web/src/routeTree.gen.ts": true
22+
},
23+
"files.associations": {
24+
".releaserc.json": "jsonc"
25+
}
26+
}

CLAUDE.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ Frontend UI for self-hosted Honcho instances — browse memories, peers, session
44

55
## Commands
66

7+
`make` is the canonical interface; it shells out to pnpm scripts which shell out to turborepo. CI calls the same targets — `make help` lists everything.
8+
79
| Command | Purpose |
810
|---------|---------|
9-
| `pnpm dev` | Launch Tauri desktop app (also starts the web dev server) |
10-
| `pnpm --filter @openconcho/web dev` | Web-only dev server on http://localhost:5173 |
11-
| `pnpm build` | Turbo: build web + desktop |
12-
| `pnpm lint` | Turbo: Biome check across packages |
13-
| `pnpm typecheck` | Turbo: tsc --noEmit across packages |
14-
| `pnpm test` | Turbo: Vitest (unit + integration), excludes `e2e/` |
15-
| `pnpm test:e2e` | Turbo: Playwright e2e (uncached) |
11+
| `make bootstrap` | Install deps + Playwright Chromium (run once after clone) |
12+
| `make dev-web` | Vite dev server on http://localhost:5173 |
13+
| `make dev-desktop` (or `make dev`) | Tauri desktop app |
14+
| `make build` | Turbo: build web + desktop |
15+
| `make lint` | Biome check |
16+
| `make typecheck` | tsc --noEmit |
17+
| `make test` | Vitest (unit + integration), excludes `e2e/` |
18+
| `make test-e2e` | Playwright e2e (uncached) |
19+
| `make check` | lint + typecheck + test |
1620
| `pnpm --filter @openconcho/web generate:api` | Regen `src/api/schema.d.ts` from `openapi.json` |
1721

1822
## Structure

CONTRIBUTING.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,37 @@ Thanks for your interest in helping out. This is a small, focused project — pl
1313
```bash
1414
git clone https://github.com/offendingcommit/openconcho.git
1515
cd openconcho
16-
pnpm install
17-
pnpm dev # web dev server at http://localhost:5173
16+
make bootstrap # installs deps + Playwright Chromium
17+
make dev-web # web dev server at http://localhost:5173
1818
```
1919

20+
Run `make help` to see every target. Make is the canonical interface — CI calls
21+
the same targets, so anything that passes locally will pass in CI.
22+
23+
Node 24 is what CI runs (`.nvmrc`); pnpm version is pinned via the
24+
`packageManager` field — `corepack enable` and it just works.
25+
26+
VS Code users: workspace recommends Biome, Tauri, rust-analyzer, Tailwind,
27+
EditorConfig, and Playwright extensions on first open.
28+
2029
For desktop work:
2130

2231
```bash
23-
pnpm --filter @openconcho/desktop dev
32+
make dev-desktop # alias: make dev
2433
```
2534

35+
Tauri needs system dependencies (WebKit, etc.) — see the
36+
[Tauri prerequisites guide](https://tauri.app/start/prerequisites/) for your OS.
37+
2638
## Before opening a PR
2739

2840
```bash
29-
pnpm lint # Biome lint
30-
pnpm typecheck # tsc --noEmit
31-
pnpm test # Vitest
32-
pnpm build # full build
41+
make check # lint + typecheck + unit/integration tests
42+
make test-e2e # Playwright (requires `make bootstrap` first)
43+
make build # full build
3344
```
3445

35-
All four must pass. CI will block the merge otherwise.
46+
CI will block the merge otherwise.
3647

3748
## Coding standards
3849

@@ -49,7 +60,7 @@ The full standards live in [`.claude/rules/coding-standards.md`](.claude/rules/c
4960
`src/api/schema.d.ts` is generated. Don't edit it by hand — run:
5061

5162
```bash
52-
pnpm generate:api
63+
pnpm --filter @openconcho/web generate:api
5364
```
5465

5566
…after updating `openapi.json`.

Makefile

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,51 @@
1-
.PHONY: dev build test lint lint-fix typecheck install
1+
# Single source of truth for repo commands. CI calls these targets too,
2+
# so anything that works in `make` locally works in `make` on a runner.
3+
# Targets delegate to pnpm scripts, which delegate to turborepo.
24

3-
dev:
4-
pnpm --filter @openconcho/desktop dev
5+
.PHONY: bootstrap dev dev-web dev-desktop \
6+
build test test-e2e lint lint-fix typecheck check \
7+
ci-web ci-desktop install help
58

6-
build:
7-
pnpm turbo run build
9+
help:
10+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
811

9-
test:
10-
pnpm turbo run test
12+
bootstrap: ## Install deps + Playwright Chromium (run once after clone)
13+
pnpm bootstrap
1114

12-
lint:
13-
pnpm turbo run lint
15+
dev: dev-desktop ## Alias for `dev-desktop`
1416

15-
lint-fix:
16-
pnpm exec biome check --write packages/web/src/
17+
dev-web: ## Vite dev server at http://localhost:5173
18+
pnpm dev:web
1719

18-
typecheck:
19-
pnpm turbo run typecheck
20+
dev-desktop: ## Tauri desktop app
21+
pnpm dev:desktop
2022

21-
install:
23+
build: ## Turbo: build all packages
24+
pnpm build
25+
26+
test: ## Vitest (unit + integration)
27+
pnpm test
28+
29+
test-e2e: ## Playwright e2e (requires bootstrap)
30+
pnpm test:e2e
31+
32+
lint: ## Biome lint check
33+
pnpm lint
34+
35+
lint-fix: ## Biome lint + format auto-fix
36+
pnpm lint:fix
37+
38+
typecheck: ## tsc --noEmit across packages
39+
pnpm typecheck
40+
41+
check: ## lint + typecheck + test
42+
pnpm check
43+
44+
ci-web: ## CI: lint + typecheck + test + build for @openconcho/web
45+
pnpm ci:web
46+
47+
ci-desktop: ## CI: cargo-check for @openconcho/desktop
48+
pnpm ci:desktop
49+
50+
install: ## pnpm install (no playwright)
2251
pnpm install

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@
33
"private": true,
44
"version": "0.5.2",
55
"packageManager": "pnpm@10.33.2",
6+
"engines": {
7+
"node": ">=22",
8+
"pnpm": ">=10"
9+
},
610
"scripts": {
11+
"bootstrap": "pnpm install && pnpm exec playwright install --with-deps chromium",
712
"dev": "pnpm --filter @openconcho/desktop dev",
13+
"dev:web": "pnpm --filter @openconcho/web dev",
14+
"dev:desktop": "pnpm --filter @openconcho/desktop dev",
815
"build": "turbo run build",
916
"lint": "turbo run lint",
17+
"lint:fix": "biome check --write .",
18+
"format": "biome format --write .",
1019
"test": "turbo run test",
1120
"test:e2e": "turbo run test:e2e",
1221
"typecheck": "turbo run typecheck",
22+
"check": "turbo run lint typecheck test",
23+
"ci:web": "turbo run lint typecheck test build --filter=@openconcho/web",
24+
"ci:desktop": "turbo run cargo-check --filter=@openconcho/desktop",
1325
"prepare": "husky"
1426
},
1527
"devDependencies": {

0 commit comments

Comments
 (0)