Loyalty
In-house loyalty replacing vendor lock-in; real-time checkout and admin control.
Role: Principal Engineer
Year: 2025
Scale: ~20k participants/season
Context & Goal
Replace third-party loyalty to cut SaaS cost and regain control over rules and data. Support real-time checkout, accurate balances, and admin workflows.
What I Built
- Real-time loyalty at checkout with one-tap POS Apply to Cart.
- Automates points accrual/redemption with idempotent writes and timezone-corrected history.
- In-house admin console: balance/history views, profile-merge, manual adjustments, and audit trails.
- Exports events to BigQuery + dbt for analytics without duplicating business logic.
Architecture at a Glance

Key Decisions & Tradeoffs
- Postgres as source of truth; analytics in BigQuery to avoid logic drift.
- Deterministic naming + DB constraints to prevent double counting.
- URL-addressable admin flows for faster QA/support.
What I'd Improve Next
- Rule templates for variable challenge windows and promotions.
- Ops dashboard for scheduled tasks and cancellations.