Open auburnsummer opened 1 year ago
All info in RCV3 uses a single SQLite database. V2 has a split system (orchard.db and status.db), V3 will just have one SQLite database for everything.
Each individual API server will have its own copy of the database, but only the primary server will be writable.
Reasoning:
Schema changes:
Level
authors_raw
Status
Status
is called alias
, which originates as a synthetic uuidalias
is intended to be changed by the useralias
is also the user-facing level id (the site, discord bot, etc. should show alias
as the "level id"), not the underlying Level primary keyLevel
:
Status
es have an associated Level
Level
can have up to 1 Status
User
LevelLevelSuccessor
Levels
, indicates when a level is a successor to another one.Status
to point to the new Level
LevelLevelSuccessor
for the Level
User
id
is the primary key and the discord snowflakeComment
??
Collection
??
erDiagram
Level {
string rdlevel_hash
}
Status {
string alias
}
User {
string id
}
Status |o -- || Level : has
Level |o -- o| Level : successor
Status }o -- || User : posts
An API server serves api.rhythm.cafe
. There's a few of these geodistributed around the world. What's on an API server?
Front Door
SQLite
SQLite Backup Service
Search Engine
Datasette
Discord Bot
add
- add levels in a post via attachments
delete
- delete levels in a post (via iid?)The API itself
PR will use an issue-tracking system. When a level is added to the primary database, it creates a issue in the issue tracking system for the level. The issue can be closed with a tag to either approve/nonrefer the level. A bot observes when this happens and calls the appropriate webhooks.
Investigation for what system to use is ongoing.
The Frontend and Admin interface are probably the same thing. The Admin interface is hidden unless you're logged in with Discord and you have the correct roles. Roles are defined in Discord and fetched via the Discord API.
I'll probably use a fancy SSR framework for the frontend, utilising existing components whereever possible. Research ongoing.
Frontend:
Admin interface:
v1 is the original google sheet
v2 is what we have now. After GAE started rate limiting my google sheet I had to quickly move off it. So we get what we have now, but the system won't be appropriate for a more dynamic level system.
v3...??
Design Goals