unify single user and multi user behaviour
This commit is contained in:
+20
-15
@@ -96,9 +96,27 @@ index.json
|
||||
|
||||
## Deployment modes
|
||||
|
||||
Single-user and multi-user share the same data layout. The only difference is whether `instance.db` exists (which enables auth).
|
||||
|
||||
### Data layout (always)
|
||||
|
||||
```
|
||||
{data-root}/
|
||||
index.json ← shard manifest (always; one shard for single-user)
|
||||
instance.db ← SQLite auth (only in multi-user, created by bincio init)
|
||||
{handle}/
|
||||
index.json ← user's BAS feed
|
||||
_merged/ ← sidecar-merged output
|
||||
activities/
|
||||
edits/
|
||||
athlete.json
|
||||
```
|
||||
|
||||
### Single-user (static)
|
||||
|
||||
No server process required. Run `bincio render`, drop `site/dist/` anywhere. The edit drawer requires `bincio edit` running locally and `PUBLIC_EDIT_URL` set in `site/.env`.
|
||||
No login, no server. Run `bincio dev --data-dir {root}` or `bincio render`, drop `site/dist/` anywhere. The site opens directly at `/u/{handle}/`. The "Feed" tab (combined feed) is hidden — there's only one user.
|
||||
|
||||
The edit drawer requires `bincio edit` running locally and `PUBLIC_EDIT_URL` set in `site/.env`.
|
||||
|
||||
### Multi-user (VPS)
|
||||
|
||||
@@ -113,20 +131,7 @@ nginx / caddy
|
||||
|
||||
`bincio serve` is a FastAPI application that owns auth, user management, and write operations. It never serves static files. nginx handles TLS and static file serving.
|
||||
|
||||
Data is partitioned per user:
|
||||
|
||||
```
|
||||
/data/
|
||||
instance.db ← SQLite: users, sessions, invites
|
||||
index.json ← root shard manifest (no activity data)
|
||||
{handle}/
|
||||
index.json ← user's BAS feed
|
||||
_merged/ ← sidecar-merged output
|
||||
activities/
|
||||
edits/
|
||||
```
|
||||
|
||||
The root `index.json` is a shard manifest that lists user shard URLs. The browser resolves all shards concurrently and merges them into a single feed.
|
||||
The root `index.json` shard manifest lists all user shard URLs. The browser resolves them concurrently and merges activities into a combined feed at `/`.
|
||||
|
||||
### Instance privacy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user