gta6mods.sh — proposed architecture
One Go binary, one Postgres database, one object store. Front end: direction 1, Library. Dashed: later.
Players and authors
browser, no SPA
Installer, mod managers
/api/v1, gta6mods:// links
Cloudflare
DNS · TLS · WAF · rate limits · Turnstile on sign-up and upload · page cache for visitors
modd web (Go)
html/template pages + JSON API
R2 quarantine
private, size-capped uploads
Files domain
separate, cookieless, cached 1 year
Postgres 18
data, sessions, jobs, search, outbox
modd worker
same binary, takes jobs
R2 public
files keyed by SHA-256
Inspection sandbox
no network · unpack limits · reject .rpf · record replaced paths · clamd · re-encode screenshots
pages + API
uploads, presigned PUT
downloads
jobs
publish
inspect

How an upload goes live

  1. The author fills in a draft: kind, builds tested, what it needs (e.g. ViceHook ≥ 0.3.0).
  2. The browser uploads straight to the quarantine bucket. The web server never streams upload bytes.
  3. The worker checks size and SHA-256, unpacks with limits (5,000 entries, 4 GB, 100:1 ratio, no .., no links), rejects any .rpf, records which game files an archive mod replaces, flags code and scans every file.
  4. Clean, no code, known author: copied to the public bucket and listed. Otherwise a moderator looks first. Code from a new author always waits.
  5. An event goes in the outbox; search, the feed and Discord pick it up.

Mod kinds it understands

Script: .asi plugins for ViceHook, installed in victory\mods.

Archive: loose files laid out by archive path. vicerpf mod pack rebuilds the archives on the player's PC, and the modloader points the game at the copies. No game files are ever hosted.

Tool: a standalone program.

Accounts

Discord or GitHub sign-in, or a passkey. No passwords stored. Moderators must use a passkey.

Session: 32 random bytes in a __Host- cookie (HttpOnly, Secure, SameSite=Lax); the database keeps only its hash. Changes need POST, an Origin check and a form token.

Security

CSP with a nonce and no third-party scripts. User files on a separate domain, so a hostile file can't read site cookies.

Every file shows its SHA-256. Takedowns have their own queue and an audit trail. Story mode only.

How it grows

Platforms, builds, kinds and categories are rows. The PC release and consoles arrive as new rows, plus an inspector if their formats differ.

New features read the outbox and stay off the upload path. The API is shaped for the installer from day one.

Phases

  1. Before PC: Library site, invite-only uploads, ViceHook and vicerpf listed first.
  2. PC launch: open uploads with moderation.
  3. Installer: tokens, install plans, gta6mods:// links.
  4. Consoles, once moddable.
Hosting: one DigitalOcean droplet behind Cloudflare (Caddy, two systemd units), Postgres on the same box at first, nightly pg_dump to R2. Full write-up: docs/ARCHITECTURE.md in the gta6mods repo.