How knowmefaiz/riverthink works
RiverThink is a local-first, server-rendered community platform where people register, publish Ambinote posts, create ideologies, and support them by voting. Those activities feed a four-stage weekly election that produces three Final Nine seats in each of three equal channels, with generation history available to users. The graph separates web entry points, community features, election rules, and shared infrastructure. Relationships are grounded in the README and source-index references; unsampled implementation details are represented only at their supported subsystem paths.
Main entry points: pages.rs Page handlers · db.rs SQLite database · election.rs Election scheduler · auth.rs Accounts and sessions
Components 19
Web experience
- HTTP router
src/web/mod.rs - Page handlers
src/web/pages.rs - HTML rendering
src/web/html.rs - Admin pages
src/web/admin.rs
Community features
- Accounts and sessions
src/service/auth.rs - Ambinote posts
src/service/notes.rs - Ideology creation and listings
src/service/ideology.rs - Support voting
src/service/vote.rs - Reports and appeals
src/service/moderation.rs
Election lifecycle
- Election scheduler
src/service/election.rs - Election calendar
src/domain/calendar.rs - Founding capacity
src/domain/capacity.rs - Equal channels
src/domain/channel.rs - Vote rules
src/domain/vote.rs - Selection rules
src/domain/election.rs
Shared platform
- SQLite database
src/db.rs - Runtime configuration
src/config.rs - Shared user models
src/model.rs
Other components
- Community members
Connections 32
- Community members → HTTP router: uses routes
README.md - HTTP router → Page handlers: routes requests
src/web/mod.rs - HTTP router → Admin pages: routes admin
src/web/mod.rs - Page handlers → HTML rendering: renders pages
src/web/pages.rs - Page handlers → Accounts and sessions: uses accounts
src/web/pages.rs - Page handlers → Ambinote posts: uses posts
src/web/pages.rs - Page handlers → Ideology creation and listings: uses ideologies
src/web/pages.rs - Page handlers → Support voting: casts votes
src/web/pages.rs - Page handlers → Election scheduler: shows elections
src/web/pages.rs - Page handlers → Reports and appeals: submits reports
src/web/pages.rs - Admin pages → Election scheduler: advances cycle
src/web/admin.rs - Admin pages → Reports and appeals: handles appeals
src/web/admin.rs - Page handlers → Shared user models: uses user data
src/web/pages.rs - Accounts and sessions → SQLite database: reads and writes
src/service/auth.rs - Accounts and sessions → Runtime configuration: checks settings
src/service/auth.rs - Accounts and sessions → Equal channels: validates channel
src/service/auth.rs - Accounts and sessions → Shared user models: returns users
src/service/auth.rs - Ambinote posts → SQLite database: reads and writes
src/service/notes.rs - Ideology creation and listings → SQLite database: reads and writes
src/service/ideology.rs - Ideology creation and listings → Founding capacity: checks quota
src/service/ideology.rs - Ideology creation and listings → Equal channels: uses channel
src/service/ideology.rs - Ideology creation and listings → Runtime configuration: reads settings
src/service/ideology.rs - Support voting → SQLite database: reads and writes
src/service/vote.rs - Support voting → Election calendar: checks timing
src/service/vote.rs - Support voting → Vote rules: checks validity
src/service/vote.rs - Support voting → Runtime configuration: reads settings
src/service/vote.rs - Reports and appeals → SQLite database: reads and writes
src/service/moderation.rs - Election scheduler → SQLite database: reads and writes
src/service/election.rs - Election scheduler → Election calendar: computes stages
src/service/election.rs - Election scheduler → Selection rules: selects candidates
src/service/election.rs - Election scheduler → Equal channels: processes channels
src/service/election.rs - SQLite database → Runtime configuration: uses DB path