learn and share notes on atproto (wip) 馃
malfestio.stormlightlabs.org/
readability
solid
axum
atproto
srs
1# System Architecture
2
3This document describes the technical architecture of Malfestio.
4
5## Frontend (SolidJS)
6
7- App shell + router-driven workspaces (Library / Study / Create / Social).
8- Signals as primary state primitive; keep study session state in signals/store.
9
10## Backend (Rust)
11
12- Axum API gateway: REST/XRPC-ish endpoints, tower middleware, typed extractors.
13- Services (logical, not necessarily microservices):
14 - Identity/Auth service (local + optional ATProto OAuth integration)
15 - Content service (notes/cards/decks/sources)
16 - Study service (queue generation + grading + scheduling)
17 - Social service (follows, feeds, comments, notifications)
18 - Search service (indexing + query)
19 - Moderation service (reports, takedowns, rules)
20
21## Storage
22
23- Postgres: canonical app DB (users, private study state, cache of published records).
24- Object storage: images/audio, extracted article snapshots (if you store them).
25- Search index: separate system (Meilisearch/Typesense/ZincSearch-pick one later).
26
27## Eventing
28
29- Internal outbox pattern (DB table) for:
30 - reindex jobs, notification fanout, federation publish steps
31
32## Data Model
33
34See [Data Model Mapping](./data-model-mapping.md) for the mapping between public Lexicon records and internal database tables.
35
36### Core Entities
37
38- **Note**: markdown + structure + citations + links to sources.
39- **Card**: front/back (+ optional cloze, audio, image, code block).
40- **Deck**: ordered/clustered cards (+ metadata, tags).
41- **Lecture**: external URL + outline + timestamps + linked notes/cards.
42- **Article**: URL + extracted text (readability style heuristics) + highlights + linked notes/cards.
43- **Collection/Path**: curated bundle of decks + notes + sources.