How johanprise/scory-bot works
Scory-bot is a Telegram-centered group scoring platform with a React web app and NestJS API. A Telegram or web user authenticates through Telegram, selects a group, creates activities or teams, records and approves scores, then reads activity history, rankings, statistics, and reports. PostgreSQL stores operational data; Redis/BullMQ supports asynchronous Telegram delivery, timers, and statistical snapshots. The sampled source confirms controller orchestration and Telegram authentication; several background integrations are represented from documented capabilities and their exact module paths, but their internal call wiring was not sampled.
Components 26
Clients
- React Web App
web/src/App.jsx - Mobile API
apps/api-v2/src/mobile/mobile.controller.ts - Mobile Service
apps/api-v2/src/mobile/mobile.service.ts
Identity
- Auth API
apps/api-v2/src/auth/auth.controller.ts - Telegram Auth
apps/api-v2/src/auth/telegram-auth.service.ts - Auth Guard
apps/api-v2/src/auth/auth.guard.ts
Scoring Domain
- Groups API
apps/api-v2/src/groups/groups.controller.ts - Groups Service
apps/api-v2/src/groups/groups.service.ts - Activities API
apps/api-v2/src/activities/activities.controller.ts - Activities Service
apps/api-v2/src/activities/activities.service.ts - Scores API
apps/api-v2/src/scores/scores.controller.ts - Scores Service
apps/api-v2/src/scores/scores.service.ts - Teams API
apps/api-v2/src/teams/teams.controller.ts - Teams Service
apps/api-v2/src/teams/teams.service.ts
Rankings Analytics
- Rankings Service
apps/api-v2/src/rankings/rankings.service.ts - Projection Service
apps/api-v2/src/projections/projections.service.ts - Stats Snapshots
apps/api-v2/src/stats/stats-snapshot.service.ts
Telegram Automation
- Telegram Webhook
apps/api-v2/src/telegram/telegram.controller.ts - Update Handler
apps/api-v2/src/telegram/telegram-update.service.ts - Report Service
apps/api-v2/src/telegram/telegram-report.service.ts - Timer Scheduler
apps/api-v2/src/telegram/telegram-timer-scheduler.service.ts - Send Queue
apps/api-v2/src/telegram/telegram-send-queue.service.ts
Platform Services
- PostgreSQL
- Redis BullMQ
apps/api-v2/src/common/queue/queue.module.ts
Other components
- Telegram User
- Telegram Bot API
Connections 32
- Telegram User → React Web App: opens app
- React Web App → Auth API: logs in
- React Web App → Mobile API: loads views
- React Web App → Activities API: manages activities
- React Web App → Scores API: records scores
- React Web App → Teams API: manages teams
- Auth API → Telegram Auth: resolves user
- Auth API → PostgreSQL: reads profile
- Telegram Auth → PostgreSQL: upserts user
- Auth Guard → PostgreSQL: checks identity
- Groups API → Groups Service: delegates groups
- Activities API → Activities Service: delegates activities
- Scores API → Scores Service: delegates scores
- Teams API → Teams Service: delegates teams
- Mobile API → Mobile Service: delegates views
- Groups Service → PostgreSQL: reads groups
- Activities Service → PostgreSQL: stores activities
- Scores Service → PostgreSQL: stores scores
- Teams Service → PostgreSQL: stores teams
- Mobile Service → Rankings Service: gets rankings
- Rankings Service → Projection Service: reads projections
- Projection Service → PostgreSQL: reads projections
- Stats Snapshots → PostgreSQL: stores snapshots
- Telegram Bot API → Telegram Webhook: posts webhook
- Telegram Webhook → Update Handler: dispatches update
- Update Handler → Report Service: requests report
- Update Handler → Timer Scheduler: starts timer
- Report Service → Send Queue: queues report
- Timer Scheduler → Send Queue: queues notices
- Send Queue → Redis BullMQ: queues messages
- Redis BullMQ → Telegram Bot API: delivers messages
- Redis BullMQ → Stats Snapshots: runs snapshots