# Build brief — a focused alternative to Metorik

> **Verdict:** Partly, if you narrow it · **Buildability:** 49/100 · **Category:** Analytics
> **Source:** https://www.canitbevibecoded.com/metorik
> Independent editorial assessment from Can It Be Vibe Coded? Not affiliated with, endorsed by, or derived from Metorik. Verify current pricing and capabilities before acting.

## Context

**Metorik** — Reporting, customer segmentation, cart tracking and email automation layered on top of a WooCommerce store. It currently costs $25/mo.

The good news: every number Metorik shows you is already sitting in your own WooCommerce database, so nobody is gatekeeping your data. An agent can pull orders, customers and products through the Woo REST API into a local store and give you revenue charts, cohort and repeat-purchase views, product breakdowns and CSV exports in a focused implementation. The gap is everything that is not a chart: abandoned cart tracking needs a script on your storefront plus a capture endpoint, email automations need a sending domain and deliverability you do not have, and segment-driven campaigns need a rules engine that is a project of its own. Large stores also punish naive syncs, Metorik has spent years making that part boring. Build the dashboard, keep paying for the email side if that is why you signed up.

This brief describes a focused, single-operator replacement for the part of Metorik that is genuinely reproducible. It is deliberately narrower than the product it replaces, and it says so in writing. Build the useful core; do not pretend to have rebuilt the rest.

## What you are building

Syncs your WooCommerce orders, customers and products into a local database on a schedule and serves a dashboard with revenue, product, cohort and repeat-purchase reports plus CSV export.

- Ingest a known data source, calculate a focused metric set, and render a useful dashboard.
- A responsive interface with real empty, loading, success, and error states.

## Requirements

### Functional

- Somewhere to run a small Node process and a database (a cheap VPS or your own machine).
- Read access to the store over HTTPS.
- Optional: ability to add one script tag to the storefront if you want cart tracking.

### Data and integrations

- A WooCommerce store with REST API consumer key and secret.

Each of these needs a real account, credential, or quota. Set them up before writing feature code.

### Non-functional

- Accessibility: semantic markup, labelled controls, visible focus, and reduced-motion support.
- Security: server-side secrets, validated input, and no credentials in the client bundle.
- Reliability: retries with backoff on external calls, and a clear failure state when a provider is down.
- Portability: the operator can export their data and leave without losing it.

## Implementation brief

Build a self-hosted WooCommerce analytics dashboard. Single repo, no accounts, no cloud services, no telemetry.

Stack, no substitutions:
- TypeScript, Node 20, Fastify for the API
- SQLite via better-sqlite3 as the local warehouse
- React with Vite for the dashboard, Recharts for charts, plain CSS
- Zero auth: it binds to 127.0.0.1 and is meant to run behind your own network

Config in .env only: WOO_BASE_URL, WOO_CONSUMER_KEY, WOO_CONSUMER_SECRET, SYNC_INTERVAL_MINUTES, PORT. Ship .env.example, never commit real keys.

Sync worker:
- Pull /wp-json/wc/v3 orders, customers, products with pagination and per_page=100
- Incremental by modified_after, persisted watermark per resource in a sync_state table
- Retry with exponential backoff on 429 and 5xx, log progress to stdout
- Store raw JSON plus normalized tables: orders, order_items, customers, products
- Normalize currency to store currency, keep refunds as negative rows, exclude cancelled and failed orders from revenue by default with a toggle

Dashboard pages:
1. Overview: revenue, order count, average order value, refunds, all with date range picker and previous-period comparison
2. Products: units and revenue by product and variation, sortable
3. Customers: lifetime value, order count, first and last order, repeat vs one-time split
4. Cohorts: monthly first-purchase cohorts with repeat purchase rate over following months
5. Export: CSV download of any table for the selected date range

Explicitly out of scope: abandoned cart tracking, email sending, segment automations, multi-store, user accounts, hosted deployment.

Deliver: npm run sync, npm run dev, npm run build, a seed script that generates fake orders so the UI can be demoed without a live store, and a README that states plainly what this does not replace.

## Delivery standard

- Inspect the repository first, then write a short implementation plan before writing code.
- Deliver the smallest complete end-to-end workflow first; every primary control must work against persisted data.
- Use real validation and storage; never substitute fake dashboards, decorative controls, hard-coded success states, or mock integrations.
- Include responsive layouts plus genuine empty, loading, success, validation, and failure states.
- Keep secrets server-side in environment variables, provide .env.example, and never commit credentials or user data.
- Add structured logs around every external call and return actionable errors without leaking sensitive details.
- Write unit tests for the core logic and one automated test of the main user journey.
- Finish with a README covering setup, architecture, data location, backups, tests, deployment, and known limitations.

## Acceptance criteria

- [ ] A clean install starts the app using only the README and .env.example.
- [ ] The primary journey works from first visit through saved result, reload, edit, export, and deletion where applicable.
- [ ] Invalid input, missing configuration, provider failure, and an empty database each have a usable state.
- [ ] The interface works at 390px and 1440px, is keyboard navigable, and shows visible focus on every control.
- [ ] Tests, type checking, linting, and a production build all pass with no ignored failures.
- [ ] No part of the interface implies a live integration, security guarantee, or scale capability that was not actually built and verified.

## Non-goals

Do not build these, and do not claim to have replaced them:

- Abandoned cart tracking and cart recovery emails, which need storefront instrumentation plus real email sending.
- Automated email flows tied to customer segments, with templates, throttling and unsubscribe handling.
- Battle-tested incremental sync for stores with hundreds of thousands of orders.
- Subscriptions, refunds and tax edge case handling that Metorik has already hit and fixed.
- Mobile-friendly polish, live order feed and the everything-in-one-place feel.

## What you still own after launch

- Secure credentials, rotate secrets, and handle provider rate limits.
- Run migrations, backups, restores, and dependency updates.
- Test the critical journey after every model, API, or hosting change.
- Monitor failures and fix the edge cases a first prompt will miss.
- Maintain every third-party integration as APIs and OAuth rules change.

## Risk

**Operational risk.** The code is achievable; dependable data, integrations, and ongoing operations are the real cost.

Editorial confidence in this assessment: medium. No reviewed project implementation is linked yet.

---

Generated by [Can It Be Vibe Coded?](https://www.canitbevibecoded.com) · Full report: https://www.canitbevibecoded.com/metorik
