Skip to content

Commit 2af03d2

Browse files
authored
Repo layout: frontend/ at the top level, app/ in the root workspace (#137)
* Repo layout: frontend/ at the top level, app/ in the root workspace * CLI 0.2.21: the schema test reads frontend/public * Blog: the starter-kit prompt names frontend/
1 parent 50560ad commit 2af03d2

223 files changed

Lines changed: 3572 additions & 5871 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"plugins": [
66
{
77
"name": "visualci",
8-
"version": "0.1.49",
8+
"version": "0.1.50",
99
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
1010
"author": { "name": "DocSpring", "url": "https://visualci.com" },
1111
"homepage": "https://visualci.com/docs/skills/",

‎.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "visualci",
3-
"version": "0.1.49",
3+
"version": "0.1.50",
44
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
55
"author": { "name": "DocSpring", "url": "https://visualci.com" },
66
"homepage": "https://visualci.com/docs/skills/",

‎.cursor-plugin/plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visualci",
33
"displayName": "VisualCI",
4-
"version": "0.1.49",
4+
"version": "0.1.50",
55
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
66
"author": {
77
"name": "DocSpring"
@@ -19,7 +19,7 @@
1919
"mcp"
2020
],
2121
"category": "developer-tools",
22-
"logo": "server/frontend/public/favicon.svg",
22+
"logo": "frontend/public/favicon.svg",
2323
"skills": "./skills/",
2424
"mcpServers": "./.cursor-plugin/mcp.json"
2525
}

‎.dockerignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**/target
22
**/node_modules
3-
server/frontend/dist
3+
frontend/dist
44
.git
55
tmp

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# VisualCI's CI: lint, test (the root workspace's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
1+
# VisualCI's CI: lint, test (the CLI's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
22
# build), then on main build and push the app and renderer images and deploy them by committing their digests to
33
# talira-ai/infra (k3s/resources/visualci/kustomization.yaml), which ArgoCD applies. That commit is the deploy;
44
# reverting it is the rollback.
@@ -48,8 +48,8 @@ jobs:
4848
# snapshot-diff goes on crates.io: it builds without its schemars feature too.
4949
- run: cargo clippy --locked -p snapshot-diff --no-default-features --all-targets -- -D warnings
5050

51-
# The app (app/, Laravel Rust): its own workspace. Its tests also render every customer email as HTML and text for
52-
# the visual job.
51+
# The app (app/, Laravel Rust, the root workspace's visualci-app). Its tests also render every customer email as HTML
52+
# and text for the visual job. fmt and clippy cover it in the lint job.
5353
app:
5454
runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
5555
environment: ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
@@ -63,9 +63,6 @@ jobs:
6363
POSTGRES_DB: visualci_app_test
6464
ports: ["55433:5432"]
6565
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10
66-
defaults:
67-
run:
68-
working-directory: app
6966
steps:
7067
- uses: actions/checkout@v4
7168
# S3 storage for the blob tests: RustFS, as the visual job uses.
@@ -77,7 +74,6 @@ jobs:
7774
# it for dependency misses. Its key covers Cargo.lock and the toolchain; only main saves it, like kache.
7875
- uses: Swatinem/rust-cache@v2
7976
with:
80-
workspaces: app
8177
save-if: ${{ github.ref == 'refs/heads/main' }}
8278
# Compile cache (kache, as Cargo's rustc wrapper): the R2 bucket every machine shares (KACHE_BUCKET), else the
8379
# GitHub Actions cache. Only main writes it: the read-write key is a secret of the kache-write environment,
@@ -95,9 +91,7 @@ jobs:
9591
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
9692
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
9793
- run: rustup show active-toolchain || rustup toolchain install
98-
- run: cargo fmt --check
99-
- run: cargo clippy --locked --all-targets -- -D warnings
100-
- run: cargo test --locked
94+
- run: cargo test --locked -p visualci-app
10195
env:
10296
VISUALCI_EMAIL_SNAPSHOTS: ${{ github.workspace }}/tmp/email-snapshots
10397
- uses: actions/upload-artifact@v4
@@ -128,7 +122,8 @@ jobs:
128122
- run: python3 -c 'import yaml' 2>/dev/null || pip install pyyaml
129123
- run: python3 scripts/ci/check_orb.py
130124

131-
# The root workspace's crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm).
125+
# The CLI and its crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm), built apart from the app so its
126+
# dependencies' features (such as serde_json's preserve_order) don't reach the CLI's tests.
132127
test:
133128
runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
134129
environment: ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
@@ -150,7 +145,7 @@ jobs:
150145
s3-prefix: visualci
151146
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
152147
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
153-
- run: cargo test --locked --workspace
148+
- run: cargo test --locked --workspace --exclude visualci-app
154149

155150
# VisualCI tests itself: screenshots of the landing page, docs and app (against seeded data), Vitest component
156151
# snapshots, app/'s JSON golden files and the emails from `app`, sent as one build to the docspring/visualci project. A changed
@@ -196,21 +191,20 @@ jobs:
196191
s3-prefix: visualci
197192
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
198193
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
199-
# The CLI (root workspace) and the app the screenshots are taken against (app/, its own workspace).
194+
# The CLI and the app the screenshots are taken against, each built on its own (so the CLI is the one users get).
200195
- run: cargo build --locked -p visualci-cli
201-
- run: cargo build --locked --bin visualci-app
202-
working-directory: app
196+
- run: cargo build --locked -p visualci-app --bin visualci-app
203197
- uses: pnpm/action-setup@v4
204198
with:
205-
package_json_file: server/frontend/package.json
199+
package_json_file: frontend/package.json
206200
- uses: actions/setup-node@v4
207201
with:
208202
node-version: "24"
209203
# skills/ is generated from the docs pages: fail when someone edited one without the other.
210204
- run: node scripts/skills.mjs --check
211-
working-directory: server/frontend
205+
working-directory: frontend
212206
- run: pnpm install --frozen-lockfile && pnpm build
213-
working-directory: server/frontend
207+
working-directory: frontend
214208
- run: pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
215209
working-directory: scripts/screenshots
216210
- run: scripts/ci/visual.sh capture
@@ -227,7 +221,7 @@ jobs:
227221
tmp/visual/screenshots --prefix screenshots/ --platform chrome-linux
228222
tmp/visual/site --prefix site/
229223
tmp/visual/site/docs/quick-start.md --prefix site/docs/ --format text
230-
server/frontend/src --from vitest --prefix components/
224+
frontend/src --from vitest --prefix components/
231225
app/tests/golden/api --prefix json/api/ --format json
232226
app/tests/golden/mcp --prefix json/mcp/ --format json
233227
tmp/email-snapshots --prefix emails/ --keep-extension
@@ -281,17 +275,16 @@ jobs:
281275
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
282276
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
283277
- run: cargo build --locked -p visualci-cli
284-
- run: cargo build --locked --bin visualci-app
285-
working-directory: app
278+
- run: cargo build --locked -p visualci-app --bin visualci-app
286279
- uses: pnpm/action-setup@v4
287280
with:
288-
package_json_file: server/frontend/package.json
281+
package_json_file: frontend/package.json
289282
- uses: actions/setup-node@v4
290283
with:
291284
node-version: "24"
292285
# The site and the app's page, built for the .test hosts (scripts/hosts.mjs reads VISUALCI_*_URL)
293286
- run: pnpm install --frozen-lockfile && pnpm build && node scripts/site.mjs
294-
working-directory: server/frontend
287+
working-directory: frontend
295288
env:
296289
GITHUB_TOKEN: ${{ github.token }}
297290
- run: pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
@@ -328,7 +321,7 @@ jobs:
328321
working-directory: clients/ruby
329322
- uses: pnpm/action-setup@v4
330323
with:
331-
package_json_file: server/frontend/package.json
324+
package_json_file: frontend/package.json
332325
- uses: actions/setup-node@v4
333326
with:
334327
node-version: "24"
@@ -351,23 +344,23 @@ jobs:
351344
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
352345
# The production site: with the Plausible snippets (analytics.ts) and, required, the WebAssembly.
353346
- run: pnpm install --frozen-lockfile && VISUALCI_ANALYTICS=1 VISUALCI_REQUIRE_WASM=1 pnpm build
354-
working-directory: server/frontend
347+
working-directory: frontend
355348
# visualci.com's static site: assembled from the build and checked (every docs page has its Markdown copy, and
356349
# llms.txt links each one), then deployed by the site job.
357350
- run: VISUALCI_ANALYTICS=1 node scripts/site.mjs
358-
working-directory: server/frontend
351+
working-directory: frontend
359352
env:
360353
GITHUB_TOKEN: ${{ github.token }}
361354
VISUALCI_REQUIRE_WASM: "1"
362355
- uses: actions/upload-artifact@v4
363356
with:
364357
name: dist-site
365-
path: server/frontend/dist-site
358+
path: frontend/dist-site
366359
# .well-known/agent-skills/ is hidden, and upload-artifact leaves hidden files out by default.
367360
include-hidden-files: true
368361
retention-days: 7
369362

370-
# visualci.com is a Cloudflare Worker with static assets (server/frontend/site/wrangler.jsonc), deployed on main
363+
# visualci.com is a Cloudflare Worker with static assets (frontend/site/wrangler.jsonc), deployed on main
371364
# before the app, so the apex never points at an app that no longer serves it. Needs the repo secret
372365
# CLOUDFLARE_API_TOKEN (Workers Scripts on the DocSpring Products account, Workers Routes on visualci.com) and the
373366
# repo variable CLOUDFLARE_ACCOUNT_ID; without them it warns and skips.
@@ -381,12 +374,12 @@ jobs:
381374
- uses: actions/download-artifact@v4
382375
with:
383376
name: dist-site
384-
path: server/frontend/dist-site
377+
path: frontend/dist-site
385378
- uses: actions/setup-node@v4
386379
with:
387380
node-version: "24"
388381
- name: Deploy to Cloudflare
389-
working-directory: server/frontend/site
382+
working-directory: frontend/site
390383
env:
391384
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
392385
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ target/
22
**/node_modules
33
/tmp
44
.env
5-
server/frontend/dist
6-
server/frontend/dist-site
5+
frontend/dist
6+
frontend/dist-site
77
.dev-host

‎AGENTS.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
3030
- No backwards compatibility before launch. There are no old setups to keep working: rename, change formats and
3131
drop old behaviour outright, with no redirects, aliases, fallbacks or shims for the old way (Nathan, 1 Dec 2026).
3232
- `skills/` is generated from the docs pages with `skill:` front matter. After editing such a page, run
33-
`node scripts/skills.mjs` in `server/frontend` and commit `skills/`; CI fails when they differ. Bump the version in
33+
`node scripts/skills.mjs` in `frontend` and commit `skills/`; CI fails when they differ. Bump the version in
3434
`.claude-plugin/plugin.json` and `marketplace.json` when a skill changes.
3535
- A change to the CLI (crates/visualci-cli or crates/visualci-core) bumps the workspace version in Cargo.toml and
3636
Cargo.lock's visualci-* entries. CI's `cli-version` job fails without the bump; once CI passes on main, the release
@@ -40,10 +40,11 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
4040
- Fixtures are test data only: synthetic values, or blank template PDFs someone has checked. Never commit a real
4141
customer's document or data.
4242
- Build Rust in CI or on a build machine (docspring-dev), not on small agent VMs. The server is app/ (Laravel Rust,
43-
its own workspace); the root workspace holds the CLI and its crates, whose tests need no database. app/'s tests
44-
need docspring-dev's Postgres: a `scripts/on-dev run` naming `DATABASE_URL` (such as
45-
`VISUALCI_APP_TEST_DATABASE_URL=...`) leases docspring-dev itself, never the pool's rented box, which has no Postgres.
46-
Point them at a database of your own, `visualci_app_test_<story>`.
43+
`visualci-app` in the root workspace, with the CLI and its crates in crates/, whose tests need no database).
44+
`scripts/on-dev test` runs the crates' tests; app/'s (`cargo test -p visualci-app`) need docspring-dev's Postgres:
45+
a `scripts/on-dev run` naming `DATABASE_URL` (such as `VISUALCI_APP_TEST_DATABASE_URL=...`) leases
46+
docspring-dev itself, never the pool's rented box, which has no Postgres. Point them at a
47+
database of your own, `visualci_app_test_<story>`.
4748
- VisualCI dev ports on docspring-dev: the app 5250 (`SERVER_PORT=5250`, which the Vite proxy defaults to), Vite 5173,
4849
previews 5180–5199. 5150 is
4950
Talira's dev server: never use it (on 1 Dec 2026 a VisualCI dev server took it, and Talira's localhost and MCP

0 commit comments

Comments
 (0)