Project SAM — a Shopee sales dashboard the owner uses daily

Project SAM is a sales dashboard built for a small Indonesian shop that sells hardware and tools on Shopee. The owner runs it on the shop’s PC every day. It has been live since September 2026 — first as a Python/Streamlit app, now as a Next.js application with a Neon Postgres database on Vercel.

Context

The shop was growing, and its real numbers were scattered across the Shopee seller interface, purchase records, and manual spreadsheet work. Simple questions — what did the shop actually earn after Shopee’s fees, and how much of that money is still held — took reconciliation before they could be answered. The owner wanted one place that answered them, and a stock and cost record reliable enough to trust the profit figure.

What the client supplied

The client supplied access to his own Shopee Open Platform seller data, his cost prices for the products he sells, and the way he wanted profit computed: monthly-average costing of purchase costs. He also described the problems he wanted the dashboard to solve, which set the scope for the build.

What I built and contribute

I built the dashboard and the data pipeline behind it. Orders and products sync from the Shopee Open Platform API automatically on a five-minute schedule, and the sync refreshes its access tokens on its own, so the owner never handles API credentials. The data lands in Neon Postgres and is served by a Next.js (TypeScript) application on Vercel.

The dashboard is organised around the numbers the owner checks: gross income, held net income, real net income after all Shopee fees, and net profit. Around them sit average order value, order totals, a fee breakdown table, and a daily trend chart. Inventory is a working ledger — SKU catalog, purchase recording, stock opname counts, stock adjustments, and mapping for order items that do not yet resolve to a SKU. Profit uses monthly-average costing of purchase costs, with per-SKU revenue, cost, profit, and margin.

The dashboard

Project SAM dashboard tab, full view

Screenshots from the live deployment; monetary figures, margins, stock, and volumes are masked at the client’s request.

Dashboard KPI cards

The KPI row: gross income, real net income, held net income, average order value, and order totals.

Daily income trend chart

Daily trend chart for the selected period.

Shopee fee breakdown table

Fee breakdown table: what Shopee deducts before net income is calculated.

Inventory

The inventory tab keeps stock, purchases, and physical counts in one ledger, so the cost side of the profit calculation has a record behind it.

Inventory stock overview

Stock overview across the catalog.

SKU and stock table

SKU catalog with current stock levels.

Purchase history records

Purchase history — the cost records behind monthly-average costing.

Stock opname entry

Stock opname: recording a physical count.

SKU mapping for order items

SKU mapping for order items that arrive without a matching SKU.

Profit

The profit tab reports net profit using monthly-average costing of purchase costs, then breaks the result down per SKU with revenue, cost, profit, and margin.

Profit KPI cards

Profit KPIs, including net profit after monthly-average costing of purchase costs.

Per-SKU profit performance table

Per-SKU revenue, cost, profit, and margin.

Stack

  • Started as a Python/Streamlit app, live since 22 September 2026.
  • Now a Next.js (TypeScript) application with a Neon Postgres database, deployed on Vercel.
  • Scheduled sync from the Shopee Open Platform API, with automatic token refresh, so the owner never handles API credentials.

Where it lives

SAM is a private internal tool for the client, so it is not publicly linkable. The screenshots above are the evidence, and I am happy to talk through how the build works.

Adnan Fatawi

WordPress & Elementor pages, built from supplied content.

© 2026 Adnan Fatawi