Abhilash
Back

abhilashbera.dev › work › commerce-analytics-platform

Commerce Analytics Platform

SaaS · Analytics · Data

An analytics product for commerce teams who had outgrown their store's built-in reports but did not want a data warehouse project.

Year
2025
Role
Full Stack
Status
In production
Stack
Next.js · Node.js
Analytics workspace with cohort grid, revenue chart and segment filters

Problem

Store owners could see yesterday's revenue and nothing else. Answering 'which acquisition channel produces customers who come back' meant exporting CSVs and hoping the joins were right. Queries over two years of order history timed out in a relational database built for transactions.

Solution

Order and event history is streamed into a columnar store built for aggregation, with pre-computed rollups for the expensive questions. The interface is a query builder that speaks in business terms — cohort, segment, channel — and compiles down to SQL the user never has to see.

Features

  • 01

    Cohort & retention grids

    Weekly and monthly cohorts computed over the full order history, not a sampled window.

  • 02

    Segment builder

    Composable filters on customer, product and channel attributes, saved and shared per workspace.

  • 03

    Revenue attribution

    First-touch and last-touch models compared side by side.

  • 04

    Scheduled digests

    A short weekly summary in email — the numbers that moved, and by how much.

Technology

Frontend

  • Next.js
  • TypeScript
  • Tailwind CSS
  • D3

Backend

  • Node.js
  • Fastify
  • Query compiler

Data

  • ClickHouse
  • PostgreSQL
  • Redis

Infrastructure

  • Docker
  • AWS
  • Grafana

Architecture

01Client

Analytics UI

Query builder · Charts

Digest Email

Weekly summary

02Service

Query API

Compiler · Cache

Ingest Worker

Stream · Rollup

03Data

ClickHouse

Events · Orders

PostgreSQL

Accounts · Saved views

04External

Store APIs

Order sync

Webhooks

Realtime events

Request flow — left to right

Result

Queries that used to time out return in under a second, and the weekly digest became the thing teams actually open on Monday. Support questions shifted from 'can you pull this for me' to 'can we save this view'.

P95 query latency
<1s
Events indexed
40M+
History queryable
2 yrs