We already have a working backend that parses betting data in real time and pushes it into PostgreSQL via a Fastify.js API. The parsing and data ingestion part is already done and production-ready
Now we need to extend the backend with business logic and Telеgram bot integration.
What needs to be done:
User & subscription management:
* Implement logic to check if a user has an active paid subscription (via webhook + periodic polling).
* Create tables for `users` and `user_filters` in PostgreSQL.
* Add ability to grant subscriptions for N days from an admin account inside Telеgram bot.
User filters via Telеgram bot (grammY framework)
* Users should be able to configure filters (sports, odds, etc.) directly through the bot.
* Filters should update in PostgreSQL in real time.
Notification system:
* When a new bet arrives (already parsed & stored), check user filters.
* If the bet matches a user’s filters and subscription is active, send notification via Telеgram bot.
Queue implementation:
* Integrate BullMQ for handling Telеgram rate limits.
* Ensure message delivery to users without hitting Telеgram flood limits.
Stack:
* Node.js
* Fastify.js
* PostgreSQL
* GrammY (Telеgram Bot framework)
* BullMQ (queue)
Deliverables:
* PostgreSQL migrations for users & filters
* Working Telеgram bot (grammY) with subscription check + filter management
* BullMQ queue integrated for rate-safe notifications
* Backend & bot code configured to run as PM2 processes on Ubuntu VPS
* Clean, maintainable Node.js/Fastify code
Notes:
* Parsing & API already implemented — focus is only on business logic, subscriptions, bot, and queue.
* Example code available.
* Rapid development style: OK to use Cursor AI (I can provide credits).
* Estimated workload: ~1 day.
... Show more