Files
tomdebone c586fd39c9 maarcadetweet: initial commit
AT Protocol PDS + AppView + Tauri Desktop Client, 160-char post limit.

- PDS (Rust + axum + sqlx)
  - Auth: createAccount, createSession, refreshSession
  - Records: createRecord, deleteRecord (race-safe via SELECT FOR UPDATE)
  - Feed: feed.like.create, feed.repost.create
  - Sync: getRepo, getBlocks, getLatestCommit, getRecord (with MST proof), listRepos
  - Identity: resolveHandle
  - MST: spec-conformant (at-mst crate, 27 tests)
  - Repo: signed commits, TID counter (monotonic, 4096 wrap safe)

- AppView (Rust + axum + sqlx)
  - Jetstream consumer (WebSocket, exponential backoff, 38k+ events indexed)
  - REST API: timeline/home (graph-aware), profile, search, post (with thread hydration)
  - Handle-sync worker (did:plc + did:web)
  - JSONB embed storage + thread columns (migration 0003)
  - Like/repost counter cache (migration 0004)

- Tauri 2 + Svelte 5 Desktop Client
  - System tray (Show/Compose/Quit menu)
  - OS notifications (tauri-plugin-notification)
  - Auto-update (tauri-plugin-updater, placeholder endpoint)
  - Window-state (tauri-plugin-window-state)
  - 160-char compose with live counter
  - Image/Link embed rendering
  - LocalStorage-persisted like state
  - Timeline with poll (prepend new posts)
  - Custom TitleBar (transparent, no decorations)
  - Orange/IBM Plex Mono maarcade design

Tests: 231 Rust + 9 vitest = 240 passed.
2026-07-05 20:01:31 +02:00

21 lines
1.0 KiB
SQL

-- Add a per-block MIME type column.
--
-- Phase 7 (uploadBlob + MIME detection). `uploadBlob` records the
-- client's `Content-Type` (or the sniffed fallback) here so that
-- `com.atproto.sync.getBlob` can serve the right `Content-Type`
-- header without sniffing on every read.
--
-- `IF NOT EXISTS` keeps the migration idempotent — re-running it on
-- a database that already has the column is a no-op rather than an
-- error. Existing rows (from before this migration) leave the
-- column NULL; the read path falls back to magic-byte sniffing and
-- then `application/octet-stream`.
ALTER TABLE repo_blocks ADD COLUMN IF NOT EXISTS mime_type TEXT;
-- An index helps the per-CID mime lookup used by the Tauri shortcut
-- `GET /blob/{cid}`, which scans by CID alone (no DID). We index
-- *all* rows on (cid) — the lookup wants the row regardless of
-- whether mime_type is set, and a partial index would silently
-- regress to a seq-scan when a row's mime_type happens to be NULL.
CREATE INDEX IF NOT EXISTS repo_blocks_cid_idx ON repo_blocks (cid);