Frame Technology and Infrastructure

Part of Frame. Proposed stack for a small initial team; none is implemented or final.

Stack

LayerProposalPurpose
Web UINext.js, React, TypeScriptRecap cards, forms, lobby, swipe interactions, results, sharing
Application APIGo HTTP serviceProduct authorization, room transactions, import orchestration, recap queries
Import workersGo bounded worker poolsFetch and parse source pages once supported access is established
JobsRedis + AsynqImport/recap/export tasks with retries and progress
Product statePostgreSQLImmutable snapshots, films, metrics, room membership, votes, results
Live room updatesInitial polling; SSE laterDeliver committed revisions and match results without making clients authoritative
Session identitySecure Frame guest sessions; optional OIDC accounts laterOwn recaps and room membership independently of public usernames
Private filesS3-compatible storage if neededOptional recap images and bounded parser diagnostics
RuntimeDocker Compose locally; managed container host or VM for pilotPersistent API and worker processes

Next.js App Router is a UI/server framework option; keeping business state in the Go API avoids splitting room rules between runtimes. Asynq supplies Redis-backed Go tasks. Use PostgreSQL transaction controls and explicit round locking for vote correctness.

System shape

flowchart LR
    Browser[Web UI] --> API[Go API]
    API --> DB[(PostgreSQL)]
    API --> Jobs[(Redis queue)]
    Jobs --> Worker[Go workers]
    Worker --> Access[Conditional authorized source access]
    Access --> LB[Letterboxd public pages]
    Worker --> DB
    Editor[Reviewed event datasets] --> DB
    Worker --> Files[Private export storage]
    API --> Browser

Keep the source adapter behind a feature flag until Frame Data Sources and Import feasibility is established. Use fixtures for product development in the meantime, clearly labeled as demo data.

Core data

RecordKey relationships and invariants
Frame session/accountOwns saved recaps and membership credentials; not equivalent to a Letterboxd profile
Source profileNormalized username and observed public fields; no verified-ownership assertion
Import job/snapshotSource type, version, completeness, progress, parser version, timestamps
Diary eventSource event identity, film, watch date, rating, rewatch flag; retain repeated viewings
Watchlist snapshot/itemOne film identity per snapshot; frozen inputs for a round
FilmStable internal ID, source IDs/URLs, title/year, reviewed aliases, optional metadata coverage
Event datasetEdition, section, nomination/selection/award records, recipients, sources, review/version
RecapOwner/session, viewing year, pinned source and dataset versions, metric version
Room/roundHost, invitation capability, expiry, locked roster, N/K, pool mode, seed, state, revision
Deck/member/vote/resultOrdered unique candidate set, authenticated membership, unique choices, one committed winner
Outbox eventDurable event identity and revision for asynchronous job/event delivery

Jobs and consistency

Create job state plus an outbox record transactionally. Dispatch tasks idempotently and reconcile pending work after a crash. Workers claim leases and persist results before acknowledgement; retries must not duplicate diary events, snapshots, or exports. Keep import results immutable once used by a recap or round.

Use a shared source rate limiter across all workers/jobs, bounded retries and request sizes, and a cache keyed by username/source/parser contract. Source limits include redirects and retry attempts. A Redis/limiter failure defers fetching rather than removing load controls.

Room matching remains a short database transaction; do not queue ordinary vote acceptance behind a slow import. Persist revisioned room events in the same transaction and recover current state by query after missed notifications.

Access, sharing, and deployment

  • Keep database/Redis private and credentials server-side. Expose the UI/API over HTTPS, ideally on one origin.
  • Authorize imports, recaps, and rooms by Frame sessions; fetching a public username does not authorize access to another Frame user’s saved data.
  • Rate-limit room joins, imports, and exports; room codes alone should not permit vote impersonation.
  • Treat extracted strings and imported links as untrusted. Fixed-host URL reconstruction and outbound destination validation protect the import service.
  • Public sharing is opt-in and can be revoked. Export only selected content and avoid leaking raw watchlists or another member’s votes.
  • Separate development/preview and production credentials/data. Preview demos use fixtures and restricted budgets.
  • Define snapshot/room retention and cleanup. Back up PostgreSQL and verify restore; handle object-storage lifecycle separately.

Operations and cost

Track queue age, import failures by cause, completeness, parser drift, source requests/cache hits, room join/start rate, vote transaction latency, duplicate requests, reconnects, and export failures. Avoid logging full sensitive query strings, room tokens, or individual votes.

Main costs: app/worker hosting, database, queue, storage/egress, retention, and reviewed awards-data maintenance. No LLM, vector database, or graph database is required for the MVP. Evaluate exact versions, hosting regions, plan limits, maintenance, and licensing at implementation time.

Sources checked on 2026-11-18. The proposed stack does not resolve the independent Letterboxd access dependency.