Blame
|
1 | --- |
||||||
| 2 | status: current |
|||||||
| 3 | platform: robot.wtf |
|||||||
|
4 | --- |
||||||
| 5 | ||||||||
|
6 | > Extracted from the original wikibot.io design. AWS-specific content archived at [[Archive/AWS_Design/Platform_Overview]]. |
||||||
|
7 | |||||||
|
8 | See also: [[Design/Data_Model]], [[Design/Auth]], [[Design/VPS_Architecture]], [[Design/Operations]]. |
||||||
| 9 | ||||||||
| 10 | --- |
|||||||
| 11 | ||||||||
| 12 | # Platform Overview: robot.wtf |
|||||||
|
13 | |||||||
|
14 | ## Overview |
||||||
| 15 | ||||||||
|
16 | A multi-tenant platform that lets users create and manage private research wikis — each backed by its own Git repo and exposed via its own MCP endpoint. Based on the Otterwiki + semantic search + MCP stack built for the Third Gulf War project. |
||||||
|
17 | |||||||
| 18 | The platform is a freemium service: |
|||||||
| 19 | ||||||||
|
20 | - **Free tier**: 1 wiki, 1 author, full read/write/MCP access, semantic search included |
||||||
| 21 | - **Premium tier**: Multiple wikis (up to 12), multiple authors (up to 25 per wiki), external Git sync |
|||||||
|
22 | |||||||
| 23 | ## Context |
|||||||
| 24 | ||||||||
| 25 | ### Why this exists |
|||||||
| 26 | ||||||||
|
27 | Setting up a research wiki with MCP integration currently requires: forking Otterwiki, writing API and semantic search plugins, deploying an MCP server, configuring reverse proxy + TLS + auth, and wiring it all together. This took weeks of work. The resulting system is useful enough that it should be productized — but the per-instance infrastructure cost and setup complexity make it impractical to self-host for casual use. The platform absorbs that setup complexity. |
||||||
|
28 | |||||||
| 29 | ### Key users |
|||||||
| 30 | ||||||||
| 31 | - **Researcher** — creates wikis, writes/reads notes via MCP from Claude.ai or Claude Code, browses via web UI |
|||||||
|
32 | - **Admin** — manages user accounts, monitors usage, handles billing tier changes |
||||||
|
33 | |||||||
|
34 | ## Multi-Tenancy Model |
||||||
|
35 | |||||||
|
36 | Each user owns zero or more wikis. Each wiki has its own: |
||||||
|
37 | |||||||
|
38 | - Git bare repo (filesystem) |
||||||
| 39 | - FAISS vector index (filesystem) |
|||||||
| 40 | - ACL entries (database) |
|||||||
|
41 | |||||||
|
42 | Isolation is at the filesystem path level: `{data_dir}/{user}/{wiki}/`. |
||||||
|
43 | |||||||
|
44 | ## Routing |
||||||
|
45 | |||||||
| 46 | ``` |
|||||||
|
47 | {user}.robot.wtf/{wiki}/mcp → MCP handler (Streamable HTTP) |
||||||
| 48 | {user}.robot.wtf/{wiki}/api/* → REST API handler |
|||||||
| 49 | {user}.robot.wtf/{wiki}/ → Otterwiki Flask app (web UI) |
|||||||
| 50 | {user}.robot.wtf/{wiki}.git/* → Git smart HTTP (dulwich) |
|||||||
| 51 | robot.wtf/auth/* → OAuth / ATProto auth flows |
|||||||
| 52 | robot.wtf/admin/* → Management API |
|||||||
| 53 | robot.wtf/ → Landing page |
|||||||
|
54 | ``` |
||||||
| 55 | ||||||||
|
56 | Auth token validation on all routes except `/auth/*` and public wikis. |
||||||
| 57 | ||||||||
| 58 | ## Application Logic |
|||||||
| 59 | ||||||||
| 60 | Request handling follows this sequence: |
|||||||
| 61 | ||||||||
| 62 | 1. Resolve user + wiki from hostname + path |
|||||||
| 63 | 2. Check ACL (database lookup) |
|||||||
| 64 | 3. Access git repo on disk |
|||||||
| 65 | 4. Route to handler: |
|||||||
| 66 | - **MCP**: FastMCP Streamable HTTP handler |
|||||||
| 67 | - **API**: REST endpoints (otterwiki-api) |
|||||||
| 68 | - **Web**: Otterwiki Flask app |
|||||||
| 69 | - **Git**: Smart HTTP protocol (dulwich) |
|||||||
| 70 | 5. On write: persist repo, queue reindex |
|||||||
| 71 | ||||||||
| 72 | ## Semantic Search |
|||||||
| 73 | ||||||||
| 74 | - **Model**: all-MiniLM-L6-v2 (runs locally, no external API calls) |
|||||||
| 75 | - **Index**: FAISS, one index per wiki, stored alongside the git repo |
|||||||
| 76 | - **Reindex**: triggered on write (async) |
|||||||
