Back to Projects

Employee Engagement Platform

Multi-Tenant Gamification Backend on Python FastAPI

Overview

Role: Built the Python FastAPI backend — tenancy, auth, points ledger, redemption, insights, notifications and the HRIS integration — and worked on the React web client.

React + TypeScript web client for employees and leaders: branching attendance questionnaires, a points wallet grouped by week, a gift-card redemption stepper, and the manager inbox and insights. Single-flight token refresh queues concurrent 401s, and a build-version check prompts stale clients to reload after S3/CloudFront deploys.

Key Features

  • Python FastAPI backend, multi-tenant by subdomain, with a global login and JWT access/refresh + role guards
  • Append-only points ledger from five earning sources with pending → approved status
  • Gift-card redemption with points ↔ dollar conversion and per-card denomination ranges
  • KPI goal and manager-insights endpoints: targets, comparators, date-ranged summaries, sortable paginated submissions
  • WebSocket notifications inbox: role-based subscriptions, pushed unread counts, read acknowledgements
  • UKG Pro (HRIS) integration driving shift-attendance polls and scheduled SMS

Tech Stack

Frontend

ReactTypeScriptRedux Toolkitstyled-componentsMaterial UIRecharts

Infra

AWS S3 + CloudFrontGitHub ActionsRollbar

Backend

PythonFastAPIREST APIWebSocketJWTMulti-tenancyHeroku

Integrations

UKG Pro (HRIS)SMS schedulingGift-card rewards

Challenges & Solutions

Points That Can Be Audited

Problem

Workers earn points from five different sources and cash them out as gift cards. A single mutable balance can't be audited or recomputed, and it invites double-spend when two redemptions race.

Solution

An append-only ledger: every earning event writes a transaction with a category and a pending or approved status, the balance is derived from approved rows, and a redemption writes a negative ledger row plus a redemption record. Pending rows let leaders approve points before they count.

One Backend, Many Companies

Problem

Each customer company needed its own isolated space with its own users, branding and settings, while employees should still be able to log in from one place.

Solution

Multi-tenancy by subdomain: every request resolves its tenant from the host, and a global login looks up the user's tenant and returns it so the client can continue on the right subdomain. The WebSocket carries the tenant too, since browsers can't set headers on it.

Real-Time Manager Inbox

Problem

Leaders need to see new check-in and issue reports from their team as they arrive, without polling every list.

Solution

A WebSocket channel per user: the client subscribes by role, the server pushes only unread counts and the client acknowledges reads. Each push triggers a targeted refetch of the affected list, so REST stays the source of truth and messages stay small.

Shift Polls Driven by the HRIS

Problem

Attendance polls must go out before each worker's shift, but shifts live in the customer's HRIS, not in our database.

Solution

A UKG Pro integration with per-tenant credentials and a mapping between our locations and the HRIS locations drives shift-attendance polls and a configurable SMS scheduler; late or absent answers notify the leader.

Key Achievements

FastAPI Backend
Multi-tenant by subdomain, JWT access/refresh, role guards
Points Ledger
Five earning sources, approvals and gift-card redemption
~73 API Operations
Used by the React web client, plus a WebSocket inbox
UKG Pro
HRIS integration driving shift polls and SMS
Employee Engagement Platform - Project | Oleksandr Yusypenko