Add NextSnap PWA with photo gallery viewer and continuous capture

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>
This commit is contained in:
2026-02-07 04:53:13 -06:00
commit cad4118f72
55 changed files with 9038 additions and 0 deletions

53
setup.sh Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/bash
# NextSnap Setup Script
set -e
echo "NextSnap Setup"
echo "=============="
echo ""
# Check if .env exists
if [ -f .env ]; then
echo "✓ .env file already exists"
read -p "Do you want to overwrite it? (y/N) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Keeping existing .env file"
exit 0
fi
fi
# Copy .env.example
cp .env.example .env
echo "✓ Created .env file"
# Generate secret key
SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))")
sed -i "s/your-secret-key-here/$SECRET_KEY/" .env
echo "✓ Generated SECRET_KEY"
# Get Nextcloud URL
read -p "Enter your Nextcloud URL (e.g., https://cloud.example.com): " NEXTCLOUD_URL
if [ -n "$NEXTCLOUD_URL" ]; then
sed -i "s|https://nextcloud.example.com|$NEXTCLOUD_URL|" .env
echo "✓ Set NEXTCLOUD_URL"
fi
# Get port
read -p "Enter port to expose (default: 8000): " PORT
if [ -n "$PORT" ]; then
sed -i "s/PORT=8000/PORT=$PORT/" .env
echo "✓ Set PORT"
fi
echo ""
echo "Setup complete! Configuration saved to .env"
echo ""
echo "Next steps:"
echo " 1. Review and adjust .env if needed"
echo " 2. Run: make build"
echo " 3. Run: make up"
echo " 4. Visit: http://localhost:${PORT:-8000}"
echo ""
echo "For production deployment, see DEPLOYMENT.md"