Offline-first photo capture app for Nextcloud with: - Camera capture with continuous mode (auto-reopens after each photo) - File browser with fullscreen image gallery, swipe navigation, and rename - Upload queue with background sync engine - Admin panel for Nextcloud user management - Service worker for offline-first caching (v13) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
NextSnap - Technical Architecture Documentation
Executive Summary
NextSnap is an offline-first Progressive Web Application (PWA) designed for mobile photo capture with seamless Nextcloud integration. Built specifically for field use in environments with poor or intermittent connectivity, the application ensures zero data loss through aggressive local caching, automatic background synchronization with verification, and comprehensive retry logic.
Core Design Principles
- Offline-First: Application functions fully without network connectivity
- Zero Data Loss: Photos never deleted until server verification complete
- Mobile-Optimized: Native camera integration, touch gestures, responsive design
- Multi-User: Session-based authentication with complete user isolation
- Admin-Capable: Full Nextcloud user management via OCS Provisioning API
High-Level Architecture
NextSnap follows a three-tier architecture:
Tier 1: Client Layer (Browser)
- HTML5 Camera API for native photo capture
- IndexedDB for local photo queue storage
- Service Worker for offline app shell caching
- Vanilla JavaScript (ES6+) for application logic
Tier 2: Application Layer (Flask)
- REST API for frontend communication
- WebDAV proxy to avoid CORS issues
- Session management and authentication
- OCS API integration for admin functions
Tier 3: Storage Layer (Nextcloud)
- WebDAV protocol for file operations
- OCS API for user management
- User authentication backend
- Persistent file storage
[See TECHNICAL.md for complete documentation]