feat: PWA photo capture with IndexedDB storage #1

Merged
toph merged 6 commits from feat/20260226-photo-capture into main 2026-02-26 23:27:01 +00:00
Owner

Summary

Add full photo capture and management functionality using standard Web APIs (no native dependencies required):

  • Photo capture: Camera via getUserMedia or file upload fallback
  • Automatic thumbnails: Generated at 200px max width for performance
  • IndexedDB storage: Photos stored as Blobs locally
  • PhotoCapture component: Camera preview with capture controls
  • PhotoGallery component: Grid view with fullscreen modal and delete
  • Item integration: Photos tab added to item detail page

PWA Benefits

  • Works in mobile browsers (no app store required)
  • Fully offline-capable (IndexedDB)
  • Progressive enhancement (file upload if camera unavailable)
  • No native build needed

Test Plan

  • 9 new unit tests for photo CRUD (all passing)
  • 183 total unit tests passing
  • Build succeeds
  • Manual test: Take photo with camera in dev mode
  • Manual test: Upload photo from file
  • Manual test: View photo in fullscreen
  • Manual test: Delete photo

🤖 Generated with Claude Code

## Summary Add full photo capture and management functionality using standard Web APIs (no native dependencies required): - **Photo capture**: Camera via `getUserMedia` or file upload fallback - **Automatic thumbnails**: Generated at 200px max width for performance - **IndexedDB storage**: Photos stored as Blobs locally - **PhotoCapture component**: Camera preview with capture controls - **PhotoGallery component**: Grid view with fullscreen modal and delete - **Item integration**: Photos tab added to item detail page ## PWA Benefits - ✅ Works in mobile browsers (no app store required) - ✅ Fully offline-capable (IndexedDB) - ✅ Progressive enhancement (file upload if camera unavailable) - ✅ No native build needed ## Test Plan - [x] 9 new unit tests for photo CRUD (all passing) - [x] 183 total unit tests passing - [x] Build succeeds - [ ] Manual test: Take photo with camera in dev mode - [ ] Manual test: Upload photo from file - [ ] Manual test: View photo in fullscreen - [ ] Manual test: Delete photo 🤖 Generated with [Claude Code](https://claude.com/claude-code)
toph added 1 commit 2026-02-26 22:45:47 +00:00
Add full photo capture and management functionality using standard Web APIs:

- Photo capture via getUserMedia (camera) or file upload
- Automatic thumbnail generation (max 200px width)
- IndexedDB storage for photos with Blob support
- PhotoCapture component with camera preview and capture controls
- PhotoGallery component with grid view and fullscreen modal
- Integration into item detail page
- 9 new unit tests (all passing)

PWA-friendly implementation:
- No native dependencies required
- Works in mobile browsers
- Falls back to file upload if camera unavailable
- Stores photos locally in IndexedDB

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
toph added 2 commits 2026-02-26 23:00:15 +00:00
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
feat: nix flake with OCI image + Forgejo CI
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 2m49s
0160483e9a
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>
toph added 1 commit 2026-02-26 23:00:50 +00:00
docs: add Nix build system documentation
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 2m22s
1f35ca1190
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
toph added 2 commits 2026-02-26 23:26:44 +00:00
Resolved conflicts:
- flake.nix: Combined flake-parts + sd-card + OCI image
- flake.lock: Updated to include flake-parts input
fix: devShell packages with sd-card tools
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 1m57s
53ba0c815d
Use inputsFrom instead of concatenating to packages list
toph merged commit 2210c5fcf7 into main 2026-02-26 23:27:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: toph/kammer#1
No description provided.