37f417eb5b82beeecda7a6f9ce8ef3c1f11b26e6
The SW was served from /static/sw.js with default scope /static/, so it only intercepted static asset requests. Page navigations to /capture, /queue, /browser were not handled by the SW at all — Safari showed its native offline error. Fix: serve SW from /sw.js route with Service-Worker-Allowed: / header and register with scope: /. Now the SW intercepts all navigations and serves the offline fallback page when the network is unavailable. Also remove auth-protected page routes from precache (they would cache the login redirect). Pages are cached via network-first on visit instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NextSnap
Offline-first photo capture web app for Nextcloud.
Quick Start
Development
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python run.py
Visit http://localhost:5000/api/health to verify the server is running.
Docker Deployment
export SECRET_KEY="your-secret-key-here"
export NEXTCLOUD_URL="https://your-nextcloud-instance.com"
docker-compose up -d
Architecture
- Backend: Flask + Gunicorn
- Frontend: Vanilla JavaScript (no framework)
- Offline Storage: IndexedDB via Dexie.js
- Service Worker: For offline-first capabilities
- Nextcloud Integration: WebDAV API for file operations
Build Order
See nextsnap.md for the complete specification and phased implementation plan.
Description
Languages
JavaScript
42.2%
HTML
29.1%
Python
21.6%
CSS
5.6%
Makefile
0.6%
Other
0.9%