Launch OpenGPEX

OpenGPEX 1.x documentation (legacy editor).

v2 Docs

Cloud Integration

How OpenGPEX connects to GPEX-Cloud for authentication, file storage, and sharing — using a stateless API protocol with explicit user-driven sync.


Architecture

┌──────────────────────┐         ┌─────────────────────────────┐
│   OpenGPEX Editor     │         │       GPEX-Cloud              │
│                       │         │                              │
│  gpexStorage (client) │ ◄─────► │  Auth API (OTP / OAuth)      │
│  authFetch (helper)   │  HTTPS  │  File API (save/list/share)  │
│       │               │         │  User API (quota)            │
│       ▼               │         │                              │
│  Cloud Menu UI        │         │  Cloudflare R2 (object store)│
└──────────────────────┘         └─────────────────────────────┘

Authentication

  • Primary: Email + OTP (one-time password) verification
  • Secondary: OAuth popup login (PKCE + state + one-time code exchange)
  • Tokens: Access JWT held in memory; refresh token persisted in localStorage — both returned as JSON from the auth endpoints (no HttpOnly cookies)
  • Auto-refresh: Access token refreshes transparently before expiry via POST /api/auth/refresh

File Operations

The editor communicates with GPEX-Cloud through a unified gpexStorage client:

Operation Description
save Upload serialized .gpex container → object storage
list Retrieve user's file catalog with metadata
download Fetch .gpex container by file ID
remove Delete a saved file
share Generate public sharing link
unshare Revoke sharing access
getQuota Check storage usage

Sync Model

OpenGPEX uses explicit, user-driven sync rather than automatic background synchronization:

  • The editor always works locally (IndexedDB), even offline
  • Cloud save requires the user to explicitly click "Sync to Cloud"
  • There is no background offline queue or automatic conflict resolution
  • If a local project conflicts with a cloud version, a warning dialog prevents accidental overwrite

This design prioritizes user control and predictability over seamless sync — appropriate for a creative tool where accidental overwrites are costly.


Quota

Tier Total Storage Max Single File
Free 200 MB 20 MB

Quota is enforced server-side (no subscription system yet — quotas are hardcoded constants). The editor displays current usage as a percentage in the Cloud Menu.


Last updated: 2026-07-30