
Campforce — Promotion Planning Platform
A promotion planning platform for a major outdoor equipment retailer in Australia and New Zealand — merchandise teams plan promotions across 15,000–25,000 SKUs drawn from a 170,000-item master list, with live margin and gross-profit analytics at every step of the workflow.
Problem Solved
Planning a retail promotion at this scale used to mean spreadsheets: exports from the ERP, VLOOKUPs across cost and price files, and no way to see the margin consequences of a discount decision until weeks later. Multiple contributors — category managers, supplier reps — worked on disconnected copies of the same list, and nobody owned a single source of truth.
Campforce replaces that with a shared workspace, built as a home for tactical web apps where the ERP system is too slow to respond to change. A promotion is broken into contributions — cohorts of SKUs owned by individual contributors, each with its own draft/submit workflow — and every discount entered is instantly repriced against cost, RRP, and projected sales to show unit GP, margin percentage, and total GP impact. By the time a promotion is submitted for approval, the business already knows what it will cost.
Key Features
Strategy-Driven SKU Selection
Selecting 15,000 items by hand is not a workflow. Strategies are reusable, shareable filter sets built with a visual query builder (AND/OR groups over brand, category, price, stock type and more), with a live count of matching items and an AI assistant that translates plain-language intent into query rules. Applying a strategy to a contribution pulls in thousands of SKUs in one action — batched server-side so it stays fast.
Contribution-Level Discount Planning
Each contribution gets a planning grid with per-SKU discount overrides, a blanket discount that applies to the whole cohort in a single SQL UPDATE, and a margin distribution chart that updates as you plan. Summary cards track projected promo GP, GP impact versus current pricing, and flag negative-margin items before they reach print.
Birds-Eye Analytics with Drill-Down
Every promotion has an analytics dashboard: discount distribution, average margin by category, brand profitability (discount vs margin bubble chart), GP impact by category, and SKUs broken down by historical sales ranking. Charts cross-filter the detail table beneath them, so a red bar is always one click away from the SKUs that caused it.
Filtering Built for 15k+ Rows
Every SKU list in the app shares the same fly-in filter panel: a two-level tree (default Category → Subcategory, but either level can be switched to Brand, Stock Type, etc.) where each node shows its matching SKU count. Combined with server-side pagination and filtering, the UI stays responsive whether a contribution holds 300 SKUs or 20,000.
Versioned Platform API
A versioned REST API under /api/v1/ accepting session or API-key auth, with rate limiting, standardized error envelopes, and audit logging on significant actions — ready for the next tactical app to land on the platform.
Self-Documenting Platform
An in-app MDX documentation system with an auto-generated API reference covers the platform, workflows, and API — so the platform documents itself for the next app that lands on it.
Architecture
Architecture Overview
A Next.js 16 App Router application with React Server Components doing the heavy lifting, backed by PostgreSQL via Prisma 7 with the pg driver adapter. The 170k-row item master is synced from the ERP, with batched upserts for CSV import and progress tracking.
Authentication is NextAuth v5 with Microsoft Entra ID SSO and database sessions, with a role hierarchy (viewer < editor < admin) scoped per application and platform admins above all.
- Frontend: Next.js 16 App Router with React Server Components, shadcn/ui + Tailwind CSS v4, TanStack Table for data grids, Recharts for analytics widgets
- Data: PostgreSQL via Prisma 7 with the pg driver adapter; 170k-row item master synced from the ERP; batched upserts for CSV import
- Auth: NextAuth v5 with Microsoft Entra ID SSO and database sessions; per-app role scoping
- API: versioned REST under /api/v1/ with session or API-key auth, rate limiting, standardized error envelopes, and audit logging
- Docs: in-app MDX documentation system with auto-generated API reference
- Hosting: Vercel
Key Decisions
Platform, not app
Campforce is built as a home for multiple tactical apps — promotions is simply the first tenant. Roles are scoped per app, the sidebar is gated by app access, and adding a new app is a documented seven-step recipe rather than an architecture change.
Contributions as the unit of work
Rather than one person owning a 20,000-SKU promotion, the promotion is split into contributor-owned cohorts with independent strategies, discount plans, and submission status. This matches how the merchandise team actually works and keeps each planning grid to a tractable size.
Set-based writes over ORM loops
Applying a blanket discount or a strategy to thousands of SKUs is done with single SQL statements and batched createMany calls, not row-by-row ORM transactions — the difference between a click and a timeout at this row count.
Screenshots












Interested in something similar?
We scope, design, and ship data and AI tools that solve the problems your team actually has.
Let's Talk