Commit graph

4 commits

Author SHA1 Message Date
b2338e5e07 Merge branch 'main' into feat/20260226-photo-capture
Resolved conflicts:
- flake.nix: Combined flake-parts + sd-card + OCI image
- flake.lock: Updated to include flake-parts input
2026-02-27 00:25:53 +01:00
a1b0cdbd91 feat: integrate sd-card for interactive spec generation (#2)
## Summary

Integrated **sd-card** workflow for interactive specification generation:

-  Added sd-card flake input
-  Created `nix run .#dev` - starts Vite with annotation proxy
-  Updated dev shell with sd-card tools (tea, playwright, nodejs)
-  Replaced old forgejo-workflow with sd-card

## Usage

### Widget-based annotation
```bash
FORGEJO_TOKEN="your-token" nix run .#dev
```

Opens SvelteKit with ✦ widget injected on every page.

### Interactive annotation (recommended)
Ask Claude to interact with the app via Claudezilla:
```
User: "Open solidhaus"
Claude: [opens in Firefox]
User: "Click the scan barcode button"
Claude: [clicks, shows screenshot]
User: "This should open the camera"
Claude: [generates Gherkin scenario]
```

## Test Plan

- [x] Flake builds successfully
- [x] `nix run .#dev` starts dev server with proxy
- [x] Widget injects on pages
- [x] Claudezilla can open and interact with app
- [x] Dev shell includes all sd-card tools

🤖 Generated with Claude Code

Reviewed-on: toph/solidhaus#2
Co-authored-by: Christopher Mühl <toki@toph.so>
Co-committed-by: Christopher Mühl <toki@toph.so>
2026-02-26 23:07:38 +00:00
ab92937e95 feat: nix flake with OCI image + Forgejo CI
Add Nix flake build system with automated container image building:

**Nix Flake (flake.nix)**
- Built with flake-parts for modularity
- `solidhaus` package: builds SvelteKit app with buildNpmPackage
- `solidhaus-image` package: OCI image with nginx serving app
- `push-solidhaus-image` app: pushes to registry.toph.so
- Dev shell with Node.js 22

**OCI Image**
- Based on nixpkgs nginx
- Serves SvelteKit build/ as static SPA
- SPA fallback routing configured
- Security headers (X-Frame-Options, X-Content-Type-Options, X-XSS-Protection)
- Gzip compression for text assets
- 1-year cache for immutable static assets

**Forgejo CI (.forgejo/workflows/build-image.yml)**
- Runs on 'nix' runner (uses nix-runner-image)
- Builds OCI image on every push
- Pushes to registry.toph.so on main branch
- Tags with :latest and :${commit-sha}

**Build commands**
- `nix build .#solidhaus` — build app
- `nix build .#solidhaus-image` — build OCI image
- `nix run .#push-solidhaus-image` — push to registry

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 00:00:00 +01:00
ba68fb456a test: E2E test suite + handoff documentation
50 Playwright E2E tests across 13 spec files covering all routes and
user flows (items CRUD, check-out/in, locations, labels, scanning,
search/filter). Uses vitest as runner with playwright-core for browser
automation (bun-compatible alternative to @playwright/test).

Includes Gherkin .feature files as living documentation, test support
infrastructure (IDB seeding, item factories, assertion helpers, layout
measurement), and HANDOFF.md covering project state, deployment, and
open design decisions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:53:08 +01:00