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.
86 lines
2.9 KiB
Markdown
86 lines
2.9 KiB
Markdown
# maarcadetweet
|
|
|
|
AT-Protocol-PDS in Rust + AppView + Tauri/Svelte-Desktop-Client.
|
|
Posts sind auf **160 Zeichen** limitiert (oldschool Twitter), erzwungen durch eigenes Lexicon `app.twi.post`.
|
|
|
|
## Architektur
|
|
|
|
```
|
|
crates/
|
|
├── at-lexicon/ Lexicon-Schemas + 160-Char-Validierung
|
|
├── at-crypto/ k256, p256, CID, multibase, JWT, PLC-Ops, Repo-Signing
|
|
├── at-identity/ DID, PLC, Handle-Resolution
|
|
├── at-mst/ Merkle-Search-Tree
|
|
├── at-repo/ Repos, Commits, Blöcke, TID-Revs
|
|
├── at-blob/ S3-kompatibler Blob-Store (MinIO)
|
|
├── at-firehose/ Jetstream-Consumer (WebSocket)
|
|
├── at-shared/ Config, Errors, DID, Cursor
|
|
├── pds-server/ axum HTTP PDS (bin)
|
|
└── appview/ Jetstream-Indexer + REST-API (bin)
|
|
|
|
crates/tauri-app/ Tauri 2 + Svelte 5 + Vite + TS Desktop-Client
|
|
├── src/ Svelte-Components (Terminal, StatusBar, NavRail, PostCard, ComposeBox, LoginScreen)
|
|
├── src/lib/styles/ tokens.css (1:1 vom maarcade-Design)
|
|
└── src-tauri/ Rust-IPC-Layer
|
|
|
|
lexicons/app/twi/post.json Custom Lexicon mit maxLength: 160
|
|
migrations/pds/ PDS-DB-Schema (users, repos, blobs, sessions, plc_ops)
|
|
migrations/appview/ AppView-DB-Schema (posts, likes, follows, timeline_cache, jetstream_cursor)
|
|
```
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
# 1) Datenbanken + MinIO starten
|
|
docker compose up -d
|
|
|
|
# 2) Umgebungsvariablen
|
|
cp .env.example .env
|
|
|
|
# 3) Workspace kompilieren + Tests
|
|
cargo test --workspace
|
|
cargo check --workspace
|
|
|
|
# 4) Tauri-Frontend (Vite dev)
|
|
cd crates/tauri-app
|
|
npm install
|
|
npm run dev
|
|
# → http://127.0.0.1:1420
|
|
|
|
# 5) PDS / AppView (eigene Terminals)
|
|
cargo run -p pds-server
|
|
cargo run -p appview
|
|
```
|
|
|
|
## Status
|
|
|
|
| Phase | Stand |
|
|
|-------|-------|
|
|
| 0 Foundation, Workspace, Migrations, Lexicon, Crypto | ✅ done |
|
|
| 1 Identity (PLC-Ops vollständig signieren) | ⏳ TODO (JWT-PEM fehlt) |
|
|
| 2 MST + Repo (Spec-konforme CBOR-Encoding) | ⏳ Skelett steht |
|
|
| 3 PDS-Server (com.atproto.* XRPC) | ⏳ Skelett, nur Healthz |
|
|
| 4 AppView-Foundation (Jetstream-Index) | ⏳ Skelett |
|
|
| 5 AppView-REST-API | ⏳ Stubs |
|
|
| 6 Tauri-UI-Logik an Backend koppeln | ⏳ Stubs |
|
|
| 7 Polish (Tray, Notifications, Auto-Update) | ⏳ |
|
|
|
|
## Tests
|
|
|
|
```
|
|
running 12 tests (at-crypto)
|
|
test result: ok. 11 passed; 0 failed; 1 ignored
|
|
running 3 tests (at-lexicon)
|
|
test result: ok. 3 passed; 0 failed
|
|
running 2 tests (at-shared)
|
|
test result: ok. 2 passed; 0 failed
|
|
running 2 tests (at-repo)
|
|
test result: ok. 2 passed; 0 failed
|
|
```
|
|
|
|
Der eine ignored Test (`jwt::issue_and_verify`) braucht noch einen ASN.1-SEC1-PEM-Encoder — geplant für Phase 1.
|
|
|
|
## Design
|
|
|
|
Orange Akzent, IBM Plex Mono, schwarzer Hintergrund mit 3%-Grid, Terminal-Fenster-Component mit blinkendem Cursor. Tokens sind 1:1 von `maarcade-shell/landing/assets/css/tokens.css` abgeleitet, plus zwei neue Repos-Tokens (`--cid-fg`, `--rev-fg`).
|