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>
31 lines
809 B
Python
31 lines
809 B
Python
from flask import Flask
|
|
from flask_session import Session
|
|
import os
|
|
|
|
# Initialize Flask-Session
|
|
sess = Session()
|
|
|
|
def create_app(config_name=None):
|
|
"""Application factory pattern."""
|
|
app = Flask(__name__)
|
|
|
|
# Load configuration
|
|
if config_name is None:
|
|
config_name = os.environ.get('FLASK_ENV', 'development')
|
|
|
|
from config import config
|
|
app.config.from_object(config.get(config_name, config['default']))
|
|
|
|
# Initialize extensions
|
|
sess.init_app(app)
|
|
|
|
# Register blueprints
|
|
from app.routes import health, auth, views, webdav_proxy, admin
|
|
app.register_blueprint(health.bp)
|
|
app.register_blueprint(auth.bp)
|
|
app.register_blueprint(views.bp)
|
|
app.register_blueprint(webdav_proxy.bp)
|
|
app.register_blueprint(admin.bp)
|
|
|
|
return app
|