# linji.at — vision What this is and why. How: [architecture](architecture.dj). When: [roadmap](roadmap.dj). ## What it is A place for 修学, built on atproto. Two commitments from day one: 1. **A home for study.** A community platform where 修学 (自修 + 共修) happens, with an AI participant that helps rather than lectures. 2. **A better shape for community.** Zulip's topics (the part worth keeping), Discord's account model (one global identity, many communities), atproto's ownership (your identity and your words are yours, not the platform's). Seeded by one real community (同喜班), invite-only, then opened. ## Why atproto fits - "One account for many servers" is not a feature to build — it is atproto's native shape. Identity (DID + handle) is global and user-owned; communities are spaces you join, not accounts you create. The same person can be present in many without resolving into a single context. - Data portability: messages as records in user repos means leaving the platform doesn't erase you. - Tooling on our chosen stack already exists and is open to contribution: zat (Zig atproto primitives) and zds (Zig PDS with a permissioned-data prototype), both by the same author. ## Data model Lexicons under `at.linji.*`. One schema, two publicity modes — see [architecture](architecture.dj). - `community` — definition record, lives in the community's own repo (a community account run by its moderators). - `channel` — belongs to a community; name + description. - `membership` — record in the member's repo: community ref, role, invitedBy. - `invite` — record in the community repo: code, maxUses, expiry. The invite-only gate. - `post` — record in the author's repo: community ref, channel, **topic (string, Zulip-style)**, text, optional reply ref. Topic-first threading is the core reading experience. Each user owns their chat messages as records in their own repo. - `study.journal` — 心得/自修 notes. Private: permissioned spaces only, never public repos. ## AI Two distinct roles, kept separate. Order settled (2026-07-31): the bot participant comes first (phase 001); the companion waits. **Revised 2026-08-02 (S013):** the bot participant itself is deferred — the published CLI is the bot surface; anyone can build a bot that posts on app0.linji.at. - **Bot participant** (`@…linji.at` account): joins topics when invited, asks Socratic questions on the text under discussion, summarizes 共修 threads. Its replies are ordinary records — the AI is a community member, not a sidebar. - **Private 自修 companion**: journaling, reflection prompts, RAG over the community's own course materials. Handles sensitive content; private data only. ## Our own home base linji.at is our communication home base wherever it can be: the team builds in it and talks through it, not around it (the Leaflet makers' Lab Notes pattern — the tool carries the conversation about the tool). Consequence for the code: the initial slices are held to the bar of real daily use, not demo-ware — solid enough that we actually live here. ## Non-negotiables: notifications. Android: optional - **Notifications are required.** A community tool that doesn't reach you doesn't get used. The guaranteed surface (2026-07-31): **the open app** — the server watches zds and streams changes over SSE, and the app raises a Notification for new posts when the tab isn't focused. When the app is **closed** we don't guarantee delivery: Web Push (VAPID + RFC 8291) is implemented and best-effort, on the same bell toggle. iOS Safari needs the PWA installed; pushes must always show a visible notification (Firefox silent-push quota). - **Android is optional** (2026-07-31): good to have, not mandatory. The PWA + Web Push covers the need; a native shell (FCM, mainland devices without Google services) is only revisited if the PWA proves insufficient in daily use. ## Honest constraints - atproto group-chat-at-scale is unsolved territory. There is no mature open lexicon for Discord-shaped group chat. We are building in the open part of the map. - Member-only chat rides proposal 0016 (permissioned data), which is experimental and still moving. Containment: one schema across both publicity modes, full-state export (`getRepo`), a simulation-tested local PDS fork. See [architecture](architecture.dj). - Moderation is a real cost the moment a second community joins. Roles, labelers, and community-level autonomy need design before phase 002.