Backend2026

NibblAIRebate & Product Review Platform

A multi-tenant Django REST platform where brands fund rebate and review campaigns, consumers submit receipts and earn rewards, and transactional wallet workflows protect every reservation, redemption, and payout.

Primary technologies

  • Django
  • DRF
  • PostgreSQL
  • AWS
NibblAI marketing site: a rebate flow from in-store QR scan to receipt verification to a brand dashboard

What this project is

NibblAI is an API-first, multi-tenant rebate and product-review platform. Brands manage products, fund campaigns, and review analytics while consumers discover offers, reserve rewards, upload receipts, publish incentivized reviews, and withdraw earnings.

Engineering problem

Reward platforms must coordinate tenant isolation, campaign budgets, receipt verification, concurrent claims, escrowed funds, subscriptions, and external AI services without allowing duplicate payments or inconsistent financial state.

Success criteria

Create a secure backend that supports the complete brand-to-consumer reward lifecycle while keeping monetary operations traceable, tenant data isolated, and provider-dependent features recoverable.

The system separates HTTP views, serializers, selectors, and transactional services across 16 Django apps. PostgreSQL row locks, database transactions, wallet holds, append-only ledger entries, idempotency keys, membership checks, and plan-aware data policies enforce the platform’s core rules.

What I designed, built, and shipped

The areas I owned end to end as Backend & DevOps Engineer.

  1. Designed 16 modular domains covering campaigns, receipts, rewards, reviews, billing, analytics, and administration

  2. Implemented tenant-aware permissions, plan-gated data access, JWT authentication, throttling, and audit trails

  3. Built atomic wallet, escrow, reservation, redemption, and payout workflows with concurrency and idempotency controls

How the system is structured

  1. Layer 01

    Domain-oriented API

    Sixteen Django apps isolate accounts, brands, billing, products, campaigns, offers, reservations, receipts, rebates, reviews, wallets, payouts, notifications, analytics, administration, and shared concerns.

  2. Layer 02

    Transactional reward core

    Service functions coordinate campaign locks, wallet locks, escrow holds, ledger entries, receipt verification, redemptions, review rewards, and withdrawals inside atomic database transactions.

  3. Layer 03

    Containerized AWS delivery

    A multi-stage Docker image runs Django through Gunicorn and WhiteNoise, while Terraform, Ansible, Nginx, ECR, EC2, RDS, S3, GitHub Actions, and an optional monitoring stack support deployment.

Key technical decisions

Ledger-backed money movement

Credits, debits, holds, captures, and releases pass through a dedicated wallet service that records balances with Decimal values and supports idempotency keys.

Secure-by-default API

DRF requires JWT authentication by default, applies request throttling, uses UUID identifiers, and layers platform roles with brand membership and manager-level checks.

Provider fallback chain

Review-prompt generation attempts Anthropic, OpenAI, and Gemini in sequence and falls back to deterministic prompts when credentials are absent or a provider fails.

Technology stack

API

  • Python 3.13
  • Django 6
  • Django REST Framework
  • OpenAPI

Data & Security

  • PostgreSQL
  • JWT
  • Tenant isolation
  • Redis throttling

Intelligence

  • Anthropic
  • OpenAI
  • Gemini
  • Deterministic fallbacks

Delivery

  • Docker
  • AWS
  • Terraform
  • GitHub Actions

What the system does

Campaign and offer lifecycle

Product catalogs, multi-product campaigns, reward tiers, fallback offers, QR and URL access, bookmarks, cooldowns, and budget-aware reservations.

Receipt-to-reward workflow

Receipt uploads, duplicate fingerprints, structured OCR results, product matching, fraud flags, manual review queues, escrow capture, and customer reward issuance.

Incentivized reviews

AI-assisted prompt generation, receipt-derived review opportunities, chat sessions, reward holds, rating-based publication, and moderation workflows.

Platform operations

Subscriptions, customer and brand wallets, withdrawals, payout batches, notifications, analytics snapshots, administrative controls, and audit logs.

Challenges & solutions

Challenge 01

Concurrent reward claims

Problem

Multiple consumers can claim the same campaign budget while funds and daily allocation limits are changing.

Solution

Reservation creation locks the campaign, evaluates caps and tier budgets atomically, then places a locked wallet hold using a consistent campaign-to-wallet lock order.

Challenge 02

Tenant privacy and entitlements

Problem

Brand users must only access their own organization’s records, while customer PII availability varies by subscription plan.

Solution

Brand-scoped selectors and membership checks enforce isolation, platform administrators receive an explicit bypass, and Starter plans receive stable anonymized customer references instead of PII.

What was delivered

  1. Unified rebates, reviews, escrow, and payouts around a traceable ledger-backed financial model.

  2. Established reusable tenant, role, membership, and subscription-based access controls across the API.

  3. Provisioned a reproducible delivery path with Docker, AWS infrastructure as code, environment-specific deployment, and CI checks.

What I took away

  1. Financial workflows need database-enforced atomicity and idempotency, not only request-level validation.

  2. External AI can enhance product workflows without becoming a dependency of the platform’s transactional core.

Next step

Building something that needs this kind of backend?

I take on backend, API, and DevOps work — from data modelling and REST design through containerization and production deployment.

A project case study by Md Fahad MirBackend & DevOps Engineer, Dhaka, Bangladesh.