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.
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.
01Context
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.
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.
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.
02Ownership
The areas I owned end to end as Backend & DevOps Engineer.
Designed 16 modular domains covering campaigns, receipts, rewards, reviews, billing, analytics, and administration
Implemented tenant-aware permissions, plan-gated data access, JWT authentication, throttling, and audit trails
Built atomic wallet, escrow, reservation, redemption, and payout workflows with concurrency and idempotency controls
03System design
Layer 01
Sixteen Django apps isolate accounts, brands, billing, products, campaigns, offers, reservations, receipts, rebates, reviews, wallets, payouts, notifications, analytics, administration, and shared concerns.
Layer 02
Service functions coordinate campaign locks, wallet locks, escrow holds, ledger entries, receipt verification, redemptions, review rewards, and withdrawals inside atomic database transactions.
Layer 03
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.
04Engineering judgment
Credits, debits, holds, captures, and releases pass through a dedicated wallet service that records balances with Decimal values and supports idempotency keys.
DRF requires JWT authentication by default, applies request throttling, uses UUID identifiers, and layers platform roles with brand membership and manager-level checks.
Review-prompt generation attempts Anthropic, OpenAI, and Gemini in sequence and falls back to deterministic prompts when credentials are absent or a provider fails.
05Toolbox
06Capabilities
Product catalogs, multi-product campaigns, reward tiers, fallback offers, QR and URL access, bookmarks, cooldowns, and budget-aware reservations.
Receipt uploads, duplicate fingerprints, structured OCR results, product matching, fraud flags, manual review queues, escrow capture, and customer reward issuance.
AI-assisted prompt generation, receipt-derived review opportunities, chat sessions, reward holds, rating-based publication, and moderation workflows.
Subscriptions, customer and brand wallets, withdrawals, payout batches, notifications, analytics snapshots, administrative controls, and audit logs.
07Problem solving
Challenge 01
Multiple consumers can claim the same campaign budget while funds and daily allocation limits are changing.
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
Brand users must only access their own organization’s records, while customer PII availability varies by subscription plan.
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.
08Result
Unified rebates, reviews, escrow, and payouts around a traceable ledger-backed financial model.
Established reusable tenant, role, membership, and subscription-based access controls across the API.
Provisioned a reproducible delivery path with Docker, AWS infrastructure as code, environment-specific deployment, and CI checks.
09Reflection
Financial workflows need database-enforced atomicity and idempotency, not only request-level validation.
External AI can enhance product workflows without becoming a dependency of the platform’s transactional core.
Next step
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 Mir — Backend & DevOps Engineer, Dhaka, Bangladesh.