feat(votes): implement full vote system from lexicon to API (#81)
* feat(votes): implement full vote system from lexicon to API
Wire up the forum.barazo.interaction.vote lexicon that was defined in
barazo-lexicons but had no backend implementation. Votes created via
the firehose are now indexed, and authenticated users can cast/remove
votes through the API.
- Database: votes table + voteCount on topics and replies
- Firehose: VoteIndexer (create/delete) + pipeline integration
- API: POST /api/votes, DELETE /api/votes/:uri, GET /api/votes/status
- OAuth: added vote collection to BARAZO_BASE_SCOPES
- Tests: 42 new/updated tests, full suite passes (2031/2031)
Note: existing users must re-authenticate to acquire the new scope.
* fix(tests): add VoteIndexer to integration test RecordHandler setup
The integration test creates its own RecordHandler with explicit
indexers. The Indexers interface now requires a vote indexer, so the
integration test must provide one. Also cleans the votes table in
beforeEach.
* chore(db): add migration for votes table and voteCount columns
Adds migration 0029_vote_system that creates the votes table with
indexes and unique constraint, plus vote_count columns on topics
and replies. Also registers votes.ts in drizzle.config.ts.
authored by