Skip to content

Add group-event booking flow with Telegram invite delivery#13

Open
Aguthcoder wants to merge 1 commit intocodex/implement-group-based-matching-enginefrom
codex/implement-telegram-group-event-system
Open

Add group-event booking flow with Telegram invite delivery#13
Aguthcoder wants to merge 1 commit intocodex/implement-group-based-matching-enginefrom
codex/implement-telegram-group-event-system

Conversation

@Aguthcoder
Copy link
Copy Markdown
Owner

Motivation

  • Implement a Hameneshini (group event) flow where each event has a single Telegram group and users get the invite link only after a successful (and paid) booking.
  • Prevent overbooking and duplicate reservations and keep the website free of hosted chat by redirecting users to Telegram.

Description

  • Added TelegramGroupEntity (telegram_groups) with eventId (unique), groupId, and inviteLink, and linked it to EventEntity as a one-to-one relation.
  • Extended EventReservationEntity (event_reservations) with a uniqueness constraint on (event_id, user_id) and payment fields payment_status, payment_reference, and paid_at.
  • Refactored POST /events/reserve to run inside a DB transaction using DataSource.transaction with a pessimistic_write lock on the events row, enforced payment requirement for paid events, prevented duplicate bookings, checked Telegram group existence, atomically incremented reservedCount, and returned telegramInviteLink in the success payload.
  • Registered TelegramGroupEntity in the EventsModule, updated controller to accept optional paymentReference, updated frontend reserveEvent typing to return the telegram link, and changed the payment-success page to use a dynamic telegramLink and button label ورود به گروه تلگرام.
  • Added a design/contract doc backend/docs/group-event-telegram-system.md describing DB schemas, APIs, booking rules, success response, and frontend redirect example.

Testing

  • Attempted npm install / npm run build for the backend, but the automated nest build step failed in this environment because the Nest CLI binary was not available, so the backend build did not complete (failure).
  • Attempted npm run build for the frontend, but the automated next build step failed because the Next.js binary was not available in the environment (failure).
  • Attempted a Playwright visit/screenshot for the /payment-success page to validate the dynamic Telegram link, but it failed with ERR_EMPTY_RESPONSE because no local frontend server was running on port 3000 (failure).

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ravi-platformm Error Error Feb 12, 2026 4:33pm
ravi-platformm-n5vj Error Error Feb 12, 2026 4:33pm
ravi-platformm-wcx8 Error Error Feb 12, 2026 4:33pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant