The e-commerce control center for Castañer
The Dashboard Castañer is the place where all the online store's data —sales, orders, stock, traffic, returns, fulfillment— converges into a single truth, live around the clock.
It is not a report you look at once a month. It is the daily pulse of the business: the first thing you open in the morning and the one that answers, in seconds, the question that matters at any given moment. A single source of truth, always up to date, that you can trust blindly. That trust is the whole project; everything else —the architecture, the automation, the agents— exists to protect it.
The project in 30 seconds
What it is. A 24/7 internal dashboard of operational KPIs for castaner.com, Castañer's online store (a Catalan footwear brand, founded in 1927).
Who it's for. Castañer's e-commerce team. It started as a single-user tool and today it is multi-user with roles: management, agency, leadership, operations, marketing and the UK store team, each with their own view.
What problem it solves. Castañer sells across many channels and markets; the data lives scattered across Shopify, Klaviyo, GA4 and REVENI, often with criteria that don't match each other. The dashboard unifies it, makes it consistent and serves it consolidated, without anyone having to export spreadsheets or recalculate anything.
Key facts
| Fact | Detail |
|---|---|
| Markets | ES · FR · IT · UK · US · GR · EU_REST (the rest of the EU/world) |
| Channels | Web (Shopify) · Marketplaces · Physical stores (POS, 10+ locations) |
| 2 Shopify shops | Main shop (EUR) + UK shop (GBP) |
| Integrations | Shopify · Klaviyo · GA4 · REVENI · carriers |
| Languages | Fully trilingual CA / EN / ES |
| Automation | ~20 scheduled jobs: snapshots, sync, backups, 2 automatic emails, daily auditing |
| AI agents | 4 Claude Code subagents: mail writer, 2 translators, data auditor |
Principles and golden rules
Non-negotiable principles. Each one was born from a real mistake; following them is what keeps the dashboard reliable and maintainable.
Never make data up
Everything stated comes from a real figure. When a view, an email or the chat needs a number, they read the field already published in the shared data snapshot; they don't recompute it.
All text goes through i18n (CA/EN/ES)
No text is fixed in a single language. Everything goes through a central dictionary with one entry per phrase in Catalan, English and Spanish.
Reports are self-contained
The one-off reports carry their data baked inside the report itself. The published version is always the one WITH data, never an empty template waiting to be filled.
One controlled path to production
Changes reach production through a single, version-controlled process, never by dropping files directly onto the live server.
Avoid name collisions across modules
The front-end code is split into several modules that share one common space. Two helpers with the same name silently clash, and only one of them ends up running.
Visual consistency via global styles
All blocks with the title → description → filters pattern share the same vertical spacing and the same width, governed by a single global stylesheet.
Colors only via theme variables
There is a dark mode (default) and a light mode (strictly monochrome: black/white/greys, only green and red for positives/negatives). Colors are never fixed directly; they always come from the theme.
Least-privilege access to data sources
Each integration is connected with the narrowest access it needs. Whenever possible the dashboard only reads from a source, so it can never alter the data at origin.
UK is a world apart
UK has its own shop, its own warehouse (a dedicated 3PL partner), its own email marketing and its own currency (GBP→EUR). It shows up in Real Time, Business, Product and "UK Operations".
The system at a glance
The dashboard is a 4-layer pipeline. The key to everything is the snapshot layer: no screen or email ever touches the live database.
The 4 layers · data flow
The snapshot pattern · why it exists
The dashboard pages, the daily email and the Manuel chat never query the data store directly: they all read the same published snapshot, which is regenerated periodically.
- A single source of truth. It is impossible for the dashboard, the email and Manuel to show different figures: they all read the same field from the same snapshot.
- Speed. Reading a ready-made snapshot is near-instant, far faster than recomputing on the fly.
- It keeps the data store light, since it is already busy ingesting new data continuously.
- Temporal consistency. Everyone sees the same snapshot of the same instant.
The pages, in business terms
Each tab answers a business question. "Who sees it" indicates the roles with access (the admin sees everything).
The automatic cadence
Everything runs on its own thanks to around 20 scheduled jobs. This is the course of a normal day.
The communication calendar
The insights emails take into account the brand's communication calendar (campaigns, Early Access and Sales by market). It serves to put the comparisons vs last year in context: often a drop vs last year is not an alarm but a calendar shift.
Manual maintenance: when a new calendar arrives, that month's plan is added to the calendar the insights rely on. Brand detail: Castañer does NOT do Black Friday ("NO Black Friday" positioning).
Key decisions and the why
Architecture decision record. Format: Decision → Context → Why.
The Claude Code agents
Four specialized AI subagents that assist with writing, translation and data checking.
Glossary and conventions
Channels
| Term | Definition |
|---|---|
| WEB | Online store sales (website and shopping app). All markets, including UK. |
| MARKETPLACES | Sales through marketplaces. Small amounts; the real signal is that most don't take off (only a couple sell consistently). |
| STORES / POS | Physical store sales, by store. Outside the online KPIs. |
Markets
The main market groupings include UK.
Metrics
| Term | Meaning |
|---|---|
| Net sales (excl. VAT) | Sales after discounts, excluding VAT and shipping. The reference metric. |
| Gross vs Net | The big "Sales today" KPI and market cards are GROSS (do not subtract returns). The detail tables and Targets/Monthly are NET (they do subtract). The daily email uses GROSS. |
| LY (Last Year) | The same day of the previous year, read from the published snapshot. |
| MTD | Month to date — current month cumulative. |
| FY (Fiscal Year) | Castañer's fiscal year: August → July. |
| Same-store | Growth of stores open in both years (excludes newly opened and closed ones). The gross store % is inflated by the new ones. |
| Visitors vs Sessions | Visitors are unique people (a bit fewer than sessions); sessions use the correct market bucket. For UK, visitors are derived from sessions. |
| Conversion (realtime) | orders ÷ visitors × 100 (never Shopify's own conversion figure, which mixes sources). |
Other terms
- Funnel: Sessions → Cart → Checkout → Purchase (the "product page" step only comes from GA4).
- BIS / Back-in-Stock: "notify me when it's back" requests. "Lost money" estimates the sales missed when those requests don't convert.
- RMA: the return process (status, method, carrier, timestamps). Around half of returns are due to size.
- PUDO / pickup point: a package left at a pickup point; detected after the fact from the carrier updates (a virtual "Awaiting pickup" status).
- PUDO ≠ checkout: Castañer does not offer third-party pickup points at checkout.