Skip to content

Latest commit

 

History

History
60 lines (53 loc) · 5.2 KB

OPS_NOTES.md

File metadata and controls

60 lines (53 loc) · 5.2 KB

Things to know (as of 8 Oct 2026)

Written after the refunds, cookie consent, attendee questions and Google sign-in work. Nothing here is secret. Keys and passwords stay in the host's environment settings.

Before / right after deploying

  • Run migrations: 0038 (yes/no question type), 0039 (event cancellation + refunds), 0040 (refund approval).
  • One Railway cron service running python manage.py run_jobs every 5 minutes (*/5 * * * *). It runs scheduled messages, refunds, and the day-before reminders (from 09:00 Lagos). Replaces the separate jobs below.
  • Merch (Nov 2026): run migrations 0076 (newsletter on by default), 0077 (merch orders) and 0078 (release notices). The same run_jobs cron now also runs process_merch_orders (frees held stock, tells organisers when merch money is available, reminds them about orders left 10 days, cancels and refunds orders left 14 days, retries stuck merch refunds), so no new cron is needed. Optional setting MERCH_FEE_RATE (default 0, no platform fee; 0.05 would take 5% off the items). The Paystack webhook URL is unchanged: it now also marks merch orders paid and finishes merch refunds.
  • Schedule python manage.py process_refunds (every 5 minutes) so approved refunds are never left half-sent.
  • Run migration 0045 (scheduled messages) and schedule python manage.py send_scheduled_messages (every 5 minutes). Without it, messages scheduled from Dashboard > Messages never go out.
  • Production backend settings:
    • WORKOS_OAUTH_REDIRECT_URI=https://www.usebyro.com/auth/callback (the site redirects usebyro.com -> www)
    • REFUND_ALERT_EMAIL (defaults to support@usebyro.com; this is who is told "refunds are waiting")
    • RESEND_API_KEY must be a live key (the one that was in frontend/.env was revoked)
  • WorkOS (Production) -> Redirects: add https://www.usebyro.com/auth/callback and https://usebyro.com/auth/callback. No trailing full stop (a stray . broke the first attempt).
  • tawk.to -> Admin > Support > Requests (migration 0056). In tawk.to: Administration -> Settings -> Webhooks -> Create webhook, URL https://<backend>/api/webhooks/tawk/, tick Chat Start, Chat End, Chat Transcript Created and New Ticket. Copy its secret key into the backend setting TAWK_WEBHOOK_SECRET. Until then the Requests tab shows a warning.
  • Push notifications for the admin (migration 0057, new package pywebpush in requirements). Run python manage.py vapid_keys once and set VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY on the backend (optional VAPID_SUBJECT, defaults to mailto:support@usebyro.com). Never change the pair afterwards, or every device has to switch push on again. Each admin turns it on per device: bell -> Push notifications. iPhone/iPad: Share -> Add to Home Screen first, then open the admin from the Home Screen.
  • Google Cloud: publish the OAuth app (it only lets test users in while in "Testing").
  • GA4: mark purchase, sign_up and create_event as key events (Admin -> Events).
  • Email logo only appears after the frontend deploy (/assets/images/logo-email.png).

How refunds work (decisions you made)

  • Buyers cannot ask for refunds. The only trigger is an organiser cancelling an event.
  • Buyer gets the ticket price back (after any promo discount). Byro's service fee and the payment charge are never refunded.
  • Cancelling moves NO money. It records refunds as "awaiting approval", tells every ticket holder, and alerts Byro.
  • A Byro admin (admin panel -> Refunds) checks the Paystack balance and presses Send. Each send is audit-logged.
  • Refunds go back to the payment method used (card, or the bank account paid from). Paystack says 3-10 working days.
  • If Paystack did not capture bank details (transfers / USSD) the refund shows "needs attention": enter the buyer's account in the Paystack dashboard using the reference shown.
  • If the organiser was already paid out for the event, withdrawals are blocked until later sales cover it.
  • Events with paid tickets or unfinished refunds cannot be deleted. Cancel them instead.
  • The refund policy, FAQ and pricing wording were rewritten to match. Have the policy text reviewed.

Known gaps / risks

  • The backend has no error monitoring. Only the frontend has Sentry. Backend errors only reach the host's log.
  • Paystack refunds come out of Byro's Paystack balance / next payout. Money already settled to the bank is not pulled back.
  • The Tawk.to chat widget loads before cookie consent and sets its own cookie (listed on /cookies, not gated).
  • The cookie "Marketing" switch does nothing yet (no ad code exists).
  • New screens were checked by tests and the type checker, not clicked through in a browser: Create event step 4, checkout questions, redesigned profile page, cookie banner, cancel dialog, admin Refunds.
  • Create event V2 is missing: Saved / Preview in the header, online/TBA locations.
  • Email layouts are the old ones inside the new frame (no QR in the ticket email, no milestone banner, no payout timeline).
  • Older commits on main (4-5 Oct) still carry a Co-Authored-By: Claude line.
  • Local Backend/db.sqlite3 has uncommitted changes. It is deliberately never committed.