Documentation

Complete guide to deploying and managing your Galleria photography portfolio.

Getting Started

Galleria is a modern photography portfolio website built with React 19, TypeScript, Express 5, and SQLite. It features optimized image delivery, admin panel, analytics tracking, and responsive design.

Quick Links

Google OAuth SSO Setup

Enable Google OAuth Single Sign-On for secure, passwordless authentication to your Galleria admin panel.

Step 1: Create Google Cloud Project

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Navigate to APIs & Services → Credentials
  4. Click Create Credentials → OAuth client ID
  5. If prompted, configure the OAuth consent screen first

Step 2: Configure OAuth Client

  1. Select Web application as the application type
  2. Add your domain to Authorized JavaScript origins:
    https://yourdomain.com
  3. Add the callback URL to Authorized redirect URIs:
    https://yourdomain.com/api/auth/google/callback
  4. Click Create and save your credentials

Step 3: Configure in Galleria Settings

  1. Log in to your Galleria admin panel
  2. Navigate to Settings → Google OAuth
  3. Enter your Google Client ID
  4. Enter your Google Client Secret
  5. Click Save to enable Google OAuth SSO

Automatic User Conversion: Existing users with matching email addresses will automatically be converted to Google OAuth authentication. They can sign in with Google immediately after OAuth is configured.

Security Tip: Only add trusted email addresses as admin users. You can manage user access from the admin panel after initial setup.

OpenObserve Analytics Setup

OpenObserve provides powerful log analytics and real-time monitoring for your Galleria website with geo-enrichment capabilities.

Step 1: Install OpenObserve with Docker

Run OpenObserve using Docker Compose:

Step 2: Create Service Account

  1. Access OpenObserve at http://localhost:5080
  2. Log in with your admin credentials
  3. Navigate to Settings → Service Accounts
  4. Click Create Service Account
  5. Give it a name (e.g., "galleria-analytics") and assign appropriate permissions
  6. Copy the generated API token for later use

Step 7: Configure Galleria

  1. Log in to your Galleria admin panel
  2. Navigate to Settings → Analytics
  3. Enter your OpenObserve URL (e.g., http://localhost:5080)
  4. Enter your Organization ID
  5. Enter your Stream Name (website)
  6. Enter your Username (from Step 2)
  7. Enter your Password (the service account token from Step 2)
  8. Click Save to enable OpenObserve analytics

Success! Your analytics will now include geo-enriched data with city, region, country, ISP, and coordinates for all visitors.

Hardware Video Encoding

Galleria supports hardware-accelerated video encoding for 5-10x faster video processing using your GPU.

Supported Hardware

NVIDIA GPUs (NVENC)

Docker and native support

Intel Quick Sync (QSV)

Native support only

AMD GPUs (AMF)

Native support only

Apple VideoToolbox

macOS native only

Enable Hardware Encoding

  1. Go to Admin Panel → Settings → Video Quality
  2. Toggle "Hardware Transcoding" to enabled
  3. Video processing will now use GPU acceleration when available

Production Deployment

Using PM2

For production deployment without Docker:

npm run build
npm install -g pm2
pm2 start ecosystem.config.cjs
pm2 save
pm2 startup

Automated Deployment: Push to the master branch and GitHub Actions automatically deploys your changes.

Help Improve This Documentation

Found an error or want to contribute to the documentation? We welcome contributions!

Contribute on GitHub