Everything about this application in one self-contained file: what it does, how it is built, what MageTech Solutions provides, develops, maintains and creates from scratch, and exactly what you receive at handover. A multi-tenant analytics and decision platform for BigCommerce merchants — explainable AI, real store integration, enterprise access control, and a delivery model measured in weeks.
MTS BigCommerce AI Commerce Intelligence is a finished, running product — not a proposal. You can log in today and use every module. This document covers everything: what the application does, how it is engineered, what MageTech Solutions provides, and precisely what you receive.
▣
What it is
A multi-tenant analytics and decision platform for BigCommerce merchants. Sales, customers, products, inventory and marketing in one warehouse, with explainable AI insights, threshold alerts, an AI copilot and scheduled reports, served through a role-aware web application.
◧
How it works
BigCommerce sync by OAuth or API token, normalised into PostgreSQL, then metrics, a deterministic rule engine and an optional LLM copilot turn that data into dashboards, alerts, recommendations and exports.
✦
Why it is different
Explainable by design. Every insight carries its evidence, severity and recommended action, computed from the merchant's own data — with strict privacy modes and a full audit trail, not black-box scoring.
Most vendors sell a dashboard, a report or a model. We hand over a working commerce platform, the engineering capability to extend it indefinitely, and a delivery model where a working version is in your hands in weeks — with the code, the documentation and the knowledge to make it entirely yours.
Section 02
Who we are
MageTech Solutions is a software product engineering company. We take ideas from discovery to a supported, running product, and we stay accountable for it afterwards. This application is the proof.
What that means in practice
We build products, not just features. A complete, working, supported application — which is why this platform exists and runs today.
We own outcomes. We are measured on whether the platform answers your questions, whether the data is right, and whether your team can use it without us.
We hand over properly. Source code, documentation, environment definition, CI pipeline, training and support handover. No lock-in, no proprietary black boxes.
We stay after go-live. Maintenance, monitoring, upgrades and a roadmap you can influence as the business changes.
We are technology specialists. TypeScript, modern web frameworks, API architecture, data platforms, cloud delivery and AI engineering are our craft, not a subcontracted skill.
How this document is organised
Sections 1–5 — the product: what it is, who uses it, and how it differs.
Sections 23–29 — the relationship: how we demo, what we deliver, what we develop, maintain and build from scratch, our services, expertise, pricing and engagement models.
Sections 30–32 — outcomes, quality commitments, roadmap, next steps and reference appendix.
The platform as our proof
We could describe our capability. It is faster to show it. This application is the reference implementation of how we work: structured, opinionated, complete and running.
MTS BigCommerce AI Commerce Intelligence — dashboard
$284.5KRevenue
8,420Orders
12,450Customers
7AI insights
Every figure above is computed from the warehouse by the same services that run in production. The demo is the product, not a mock-up.
We do not ask you to trust a slide deck. We ask you for thirty minutes with a working system.
Section 03
The problem we solve
BigCommerce merchants have the data but not the answers. The control panel reports what happened; nobody joins sales, customers, stock and marketing into a single decision view.
Where it hurts today
What it costs
What this platform does
Sales in the control panel, stock in a grid, marketing in ad tools
Decisions made on one slice of the business
One warehouse and one joined view across all ten modules
Stockouts and churn discovered after the revenue is gone
Role-based access, tenant isolation, and a full audit trail with actor and IP
Reporting depends on one analyst's spreadsheet
A single point of failure
Governed exports, documented data dictionary, self-serve module access
Lost revenue
Stockouts on priority SKUs, lapsing high-value customers, budget sitting in campaigns that do not return revenue. All three are visible in the platform before they become losses.
Lost time
Analysts and operations staff rebuilding the same exports every week. Generated reports and scheduled delivery replace that work with a review step.
Lost trust
Numbers nobody can reproduce, AI answers nobody can defend, access nobody can govern. Each is closed with an explicit mechanism, not a promise.
Section 04
Who uses it and what they get
One platform, five operating personas, each with a scoped view of the same tenant data — enforced on the server, not just hidden in the interface.
O
Store ownerOne number for revenue, orders, margin risk and customer value. Full administration of team, plan and integration.
A
Operations managerCoverage, low-stock and reorder signals early enough to act on, per variant and per location, with alert rules they own.
S
Sales managerPipeline by status, channel contribution, AOV movement and order-level detail, plus report exports for the commercial review.
M
Marketing managerCampaign spend, attributed revenue, ROAS, CTR and conversion — compared against store-wide performance, not in isolation.
A
AnalystFull read across modules, generated insights, report creation and the copilot for ad-hoc questions.
V
Finance, agency or stakeholderA safe, read-only seat: dashboards and report downloads, with no access to configuration or integration secrets.
Why we demo roles, not just screens
Anyone can show a chart. Showing the same screen to two people and letting them see different things — enforced server-side — is how we prove the platform is enterprise-ready. In every demo we sign in as two roles so the customer notices the difference themselves.
Section 05
How it differs from the alternatives
An honest comparison against what a merchant already considers: native reporting, general BI, spreadsheets, plug-in AI assistants and custom agency builds.
Dashboards report. This platform also decides what deserves attention, why it matters, and what to do — then tells the right role and records the outcome.
Not a black box
Every insight has evidence, every recommendation has a priority, every number is computed from stored records. If finance disputes a figure, we can show the query path.
Not a dependency
Source, documentation, infrastructure definition and CI are handed over. Keeping the platform running without us is a deliberate design constraint, not a failure mode.
Section 06
Technology stack — end to end
A TypeScript-first monorepo: one language across the API, the worker, the shared packages and the web client, with PostgreSQL as the system of record and Redis as the job and cache layer.
Experience
Next.js 15 App RouterReact 19, TypeScript strict, route groups for the marketing site and the authenticated application
Three deployable applications and six shared packages, wired by npm workspaces and orchestrated by Turborepo. The API and worker share one Prisma client factory with tenant scoping, so isolation is structural rather than a convention.
The request path
BrowserCredentialed request; the session travels in the mts_session cookie — HttpOnly, SameSite=Lax, Secure in production.
Next.js proxyThe typed client routes /api/* to the Nest API. Server components fetch without a base URL; client components resolve it from the environment.
GuardsSessionGuard resolves the hashed token to a live session and attaches tenant, user and role; PermissionsGuard enforces declared permission keys.
Controller and serviceControllers validate and delegate; business rules live in services and shared packages. Nothing heavy runs inline.
Tenant-scoped PrismaQueries run through the extended client; tenant models are filtered by tenantId at the client layer, with additional assertions in sensitive service paths.
The background path
SchedulerFive repeatable jobs register on boot: sync dispatch, nightly full sync, daily insights, alert sweep and report delivery.
QueueJobs land on dedicated BullMQ queues with a stable job id per entity, so repeated triggers collapse instead of duplicating work.
Result surfaceOutputs land in the database and on disk: insights, recommendations, notifications, sync-run records and storage/reports/<tenant>/<report>.csv.
Why one Prisma client factory
Both applications import @mts/database, which is marked server-only; the web client may only import type from it. One factory means one place controls pooling, tenant extension and disconnect behaviour — a requirement for container and serverless-style deployment targets.
Section 07.1
End-to-end journeys
The three paths a merchant actually walks, from installation to an AI-assisted decision. These are also the paths we follow in every demo.
Journey A
Install and first sync
Create the workspaceSign-up produces a tenant, an owner account and a trial subscription.
AuthenticateSign in with the session cookie, or start the BigCommerce OAuth flow from Settings.
Connect the storeOAuth callback, or paste a store hash and access token for a staff API account.
Queue the workA sync run is created and enqueued; the dispatch scheduler picks up pending runs.
Watch progressSettings shows entity-level status, item counts, checkpoints and errors.
Journey B
Analyse the business
Open the dashboardRevenue, orders, AOV, customers and alerts for the selected period.
Drill into a moduleSales trends, customer segments, product performance, inventory coverage, campaign ROI.
Read the insight feedGenerated findings with severity, evidence, impact and a recommended action.
Ask the copilotNatural-language questions route to tool calls over the same metrics.
ExportGenerate a report and download the CSV for finance and planning.
Journey C
Act on an alert
Get notifiedAn in-app notification arrives when a rule's threshold is crossed.
Assess impactOpen the alert to see the rule, the breached metric and the evidence.
Apply a recommendationFollow the suggested action: reorder, win-back, promotion review or stock review.
Close the loopMark it read or resolved; the audit log records who did what and when.
Section 08
Repository structure
The monorepo is the product: every module, migration, test and environment key lives in one versioned tree with a predictable shape.
Every feature follows the same shape: Prisma model and migration in packages/database; rules in a shared package; a thin controller plus service in apps/api; a processor in apps/worker if asynchronous; a page and components in apps/web; an end-to-end assertion in e2e; and documentation updated in the same change. That is why the second feature costs less than the first.
Section 09
Data model
32 models and 30 enums in a single tenant-rooted schema. Every business record carries a tenantId, and the tenant client extension enforces that boundary on all scoped models.
30 of 32 models are tenant-scoped; the client extension injects tenantId automatically and services may still assert it for defence in depth.
Identity and access
User, Role, Permission, Session
Users carry a role; roles own a permission set; 25 stable permission keys are seeded. Sessions store a SHA-256 hash of the token, never the token.
Orders
Order, OrderItem
Orders keep external ids, status, channel, totals, customer and timestamps. Items snapshot product, variant and price at purchase time, so historical revenue never shifts when a catalogue price changes.
Customers
Customer, CustomerSegment
Order count, lifetime value and last order are denormalised for fast segmentation; segments store rules as JSON with member counts.
Catalogue
Product, ProductVariant, Category, Brand
Products carry channel mapping, status, pricing and lifecycle fields; variants carry SKU, barcode, cost and dimensions; categories and brands map to BigCommerce channels 1–7.
Inventory
InventoryLevel, InventorySnapshot
Current level plus location and reorder data; snapshots provide the coverage trend behind days-remaining and stockout risk.
Analytics
SalesSnapshot
One row per tenant per day per channel: revenue, orders, units, AOV. Pre-aggregation keeps dashboards fast at any realistic scale.
Marketing
Campaign
Spend, clicks, impressions, attributed revenue and derived ROAS, CTR and conversion rate, with channel and status enums.
Intelligence
Insight, Recommendation, CopilotMessage, AiUsage
Insights persist type, severity, title, message, evidence JSON and status. Recommendations dedupe on category plus action with high, medium or low priority. Copilot turns and provider usage are logged per tenant and user.
Rules store operator, threshold and window; alerts record metric, value, threshold and status; reports track type, parameters, file path and generation time.
Integration
BigCommerceConnection, SyncRun, WebhookEvent
Connection stores encrypted credentials, status, last sync and installed scope set. Sync runs track entity, status, counts, checkpoint and error. Webhook events are idempotent by event hash.
The schema ships with a single initial migration creating all tables, indexes and enums. Additive changes follow the same path: edit the schema, generate a timestamped migration, review the SQL, keep the seed idempotent. Historical correctness is treated as a feature, not an afterthought.
Section 10
Modules and capabilities
Ten product modules sharing one design language, one data layer and one permission model. Each module owns an accent colour used consistently in navigation, page headers, cards and charts.
▦
Dashboard
The 60-second view
Revenue, orders, AOV, customer count, low-stock and open-alert counters; revenue and order trends; channel mix; top products; latest AI insights; recent activity.
◔
Sales
Revenue quality
Order pipeline by status, revenue trend against the previous period, channel contribution, AOV movement, order-level detail with customer context.
◎
Customers
Segments and retention
VIP, high-value, at-risk and inactive segments with counts and value at stake; lifetime value distribution; segment explorer; win-back targeting.
◫
Products
Catalogue health
Performance by revenue and units, status mix, category and brand breakdowns, price and margin view, and a product health score for assortment decisions.
▤
Inventory
Stock coverage
Days-remaining coverage, low-stock and out-of-stock queues, reorder points, stock-level trends and valuation, with variant-level drill-down.
◈
Marketing
Campaign ROI
Spend, attributed revenue, ROAS, CTR and conversion per campaign, channel efficiency comparison, and revenue trend in campaign context.
✦
Insights
Intelligence and copilot
Generated insights with evidence and severity, prioritised recommendations, full insight history, and the AI copilot for natural-language questions.
▤
Reports
Exports and schedules
Sales, inventory, customer and full-dataset reports, parameterised date ranges, CSV download, scheduled delivery and generation history.
◉
Alerts
Threshold monitoring
Rules for revenue drops, order anomalies, AOV shifts, low stock and churn; triggered alerts with metric, value and threshold; in-app notification feed.
⚙
Settings
Administration
BigCommerce connection and sync history, team and roles, subscription and plan, AI provider configuration, notification preferences, audit log.
What runs underneath every module
BigCommerce sync
OAuth install or API-account connect; paged, resumable sync of categories, brands, products, customers, orders, inventory and settings; signed webhooks; visible checkpoints.
Analytics engine
Shared metric computation — revenue, orders, AOV, growth, channel mix, stock cover, customer aggregates — used identically by the API, the insight engine and reports.
Background automation
Five job queues and five schedules: dispatch syncs, nightly full sync, daily insights, alert sweeps and report delivery. Nothing heavy runs on a user request.
Governance
Seven roles, 25 permissions, tenant-scoped data access, hashed session tokens, encrypted integration secrets and an audit trail of every administrative action.
Section 11
Roles and permissions
Seven roles, 25 seeded permission keys and a decorator-based guard. Roles are the unit of assignment; permissions are the unit of enforcement.
Role
Typical holder
Capabilities
Sees
Owner
Founding merchant principal
Everything, including team, plan and integration administration
All modules and settings
Admin
Operations or IT lead
All analytics, alerts and reports; manages the team and alert rules
All modules except ownership-level plan changes
Analyst
Data analyst
Full read across modules; creates insights and reports
@RequirePermission('key') on a controller or handler; PermissionsGuard resolves the session user's role and compares it against the permission set.
@Public() marks the ten endpoints reachable without a session: health, authentication, the BigCommerce install entry point, the plan catalogue and the documented webhooks.
54 endpoints require a session; 51 additionally require a permission — a deliberate split so "logged in" and "allowed to act" stay distinguishable in the audit log.
Guards attach tenant, user and role to the request context, so controllers never accept a tenant id from the client.
Keys are seeded data rather than hard-coded constants, so a merchant's role model can be extended without a schema change.
Section 12
API reference
64 endpoints across 18 controllers, mounted under a global /api prefix on port 3001. JSON in, JSON out; session-cookie authentication; a consistent status-code contract.
Base URL (dev)
http://localhost:3001/api
Authentication
Cookie mts_session (HttpOnly, SameSite=Lax)
Prefix
/api — no version segment
Public endpoints
10
Session-protected
54 (51 also permission-guarded)
Webhooks
Signed, raw-body verified, idempotent
Health
GET /api/health — liveness and dependency status
Validation
DTO and Zod schemas at the boundary
Controller
Base path
Responsibilities
Sample endpoints
Auth
auth
Registration, login, session inspection, logout
POST /auth/register · POST /auth/login · GET /auth/me · POST /auth/logout
Health
health
Service liveness and dependency checks
GET /health
Analytics
analytics
Dashboard summary, trends, channel mix, top products
GET /analytics/dashboard · GET /analytics/trends
Sales
sales
Order pipeline, revenue trend, channel performance
GET /sales/orders · GET /sales/revenue
Customers
customers
Segments, value distribution, segment members
GET /customers/segments · GET /customers/:id
Products
products
Catalogue performance, health, product detail
GET /products · GET /products/:id
Inventory
inventory
Levels, low stock, coverage, snapshots
GET /inventory/levels · GET /inventory/low-stock
Marketing
marketing
Campaign performance and channel efficiency
GET /marketing/campaigns
Insights
insights
List, generate, summary; recommendations
GET /insights · POST /insights/generate · GET /insights/recommendations
AI / Copilot
ai
Copilot turns and provider configuration
POST /ai/copilot · GET /ai/config
Reports
reports
List, generate, download, schedules
POST /reports/generate · GET /reports/:id/download
Alerts
alerts
Rules, triggered alerts, acknowledge and resolve
GET /alerts/rules · POST /alerts/rules · GET /alerts
Notifications
notifications
In-app feed, unread count, mark read
GET /notifications · POST /notifications/:id/read · POST /notifications/read-all
Only a SHA-256 hash of the token is stored. The raw token exists in the browser cookie and in transit — never in the database.
Section 13
The AI engine
A deterministic rule engine is the product's intelligence; language models are an optional presentation layer. Findings are computed from the tenant's own metrics, ranked, and stored as first-class records.
Rule engine pipeline
Gather metricsThe analytics package computes revenue, orders, AOV, growth, channel mix, stock cover and customer aggregates for the requested window.
Run detectorsRevenue, product, inventory, customer, segment, order and marketing detectors evaluate configured thresholds and return findings with type, severity, title, message and evidence.
Build recommendationsFindings become concrete actions — reorder, win-back, promotion review, stock review — deduplicated by category plus action and ranked high, medium or low.
PersistInsights and recommendations are written with status and impact, feeding the dashboard, the insight feed and the alert engine.
The copilot classifies a question into a typed intent, maps it to a tool call over the same metrics, and returns a grounded answer with supporting numbers.
Revenue and order questions for a period, compared to the previous window
Top products and best-performing channels
Inventory risk and low-stock questions
Customer segment and lifetime-value questions
Campaign and ROAS questions
"What should we do?" — answered with current recommendations, not a new invention
Provider configuration
Providers
rule (default, fully local) · openai · anthropic · google
AI_MAX_REQUESTS_PER_MONTH=500, with per-tenant usage recorded
Fallback
Any provider error transparently falls back to the local rule engine
Quality properties
No hallucinated numbers. Figures come from the metrics service, not from the model.
Explainable. Every insight carries readable evidence.
Auditable. Provider, tokens and request counts are logged per tenant and user.
Cost-aware. A monthly budget and per-tenant metering make AI spend attributable.
Known gap, stated honestly
The provider adapters assemble their request payloads, but the assembled business facts are not yet serialised into the external provider payload; today external calls are reserved for phrasing, while all figures still originate from the rule engine. This is on the roadmap and is a deliberate correctness-first choice.
Section 14
BigCommerce integration
Two supported connection paths, seven synced entities, resumable paged fetches, signed idempotent webhooks and encrypted credential storage. Written against the V2 and V3 REST APIs with V2 as the current compatibility baseline.
Connection paths
Install entryGET /api/bigcommerce/install returns or redirects to the authorisation URL with state and the requested scope set.
Merchant consentThe store owner authorises the app in BigCommerce; we never impersonate a merchant or store their password.
CallbackGET /api/bigcommerce/callback exchanges the code for tokens, validates state, stores credentials encrypted and records installed scope.
VerificationSignatures are verified; the connection status becomes connected and the first sync is queued.
Create a staff API accountIn the BigCommerce control panel the merchant creates a staff account restricted to read access.
Paste the credentialsThe store hash and access token are entered in Settings and stored encrypted with AES-256-GCM — never in logs or the browser.
Test and connectThe connection is validated, marked connected, and scope is set explicitly to read.
SyncThe same sync pipeline runs as with OAuth, including checkpoints and resume.
Why read-only by design
Scopes are requested and stored as a set, and the product's stated purpose is analytics. Nothing in the platform writes back to the store. If a future roadmap item needs write access, it is an explicit, separately consented scope change — never a silent extension.
What is synced
Entity
Shape
Detail
Categories
Tree
Hierarchy and visibility, mapped to channel 1–7
Brands
Flat
Name, slug and image reference
Products
Flat with variants
Status, pricing, channel mapping, lifecycle, images, variants with SKU, cost and dimensions
Customers
Flat
Contact, groups, order count, lifetime value, last order date
Orders
Flat with items
Status, channel, totals, timestamps, line items with price-at-purchase
Inventory
By location
Levels, reorder points, snapshot history for coverage maths
Settings
Single
Store profile and timezone context for reporting
Client behaviour
Rate limiting. Requests are paced against the store's limits rather than optimistically fired.
Retries. Transient failures back off exponentially instead of failing a run.
Paging. Large collections are fetched page by page with a checkpoint after each page, so an interrupted run resumes instead of restarting.
Upserts. Records are matched on external id and updated in place, making repeat syncs idempotent.
Auth signing. BigCommerce login JWT payloads are signed correctly rather than hand-built, which is a frequent cause of silent 401s in custom integrations.
Webhooks
Order, product and customer events are accepted on a raw-body route, signature-verified, de-duplicated by event hash, and then applied as a targeted partial sync of the affected entity — so a new order appears without a full nightly refresh.
Stated honestly
The integration path is complete and exercised against the demo seed. A first live store connection needs real store credentials and a publicly reachable OAuth callback URL; until a merchant store is connected, the platform runs on the seeded workspace so every screen, report and insight is still demonstrable end to end.
Section 15
Queues, workers and schedules
All heavy work happens in the worker. Five BullMQ queues, five repeatable schedules, stable job ids so repeated triggers collapse instead of duplicating, and retries with exponential backoff.
Queue 01
Sync
Fetches each entity from BigCommerce in pages, upserts records, writes a checkpoint after every page, and records per-entity counts and errors on the sync run.
Queue 02
Insights
Computes the metric window, runs the seven detectors, builds and dedupes recommendations, then persists insights and recommendations with severity and impact.
Queue 03
Alerts
Evaluates every enabled rule against current metrics, creates alerts when a threshold is crossed, suppresses duplicates in the same window and raises notifications.
Queue 04
Reports
Materialises a parameterised report to CSV in tenant-partitioned storage, records the file path and generation time, and hands delivery to the scheduler.
Queue 05
Scheduler
Holds the repeatable job definitions and dispatches work — it is the clock, not the workload.
Reliability behaviour
Failed jobs retain their error for inspection, retry with backoff, and never partially corrupt state: sync checkpoints, report files and insight writes are all idempotent.
The five scheduled jobs
Schedule
Triggers
Purpose
Sync dispatch
Recurring
Picks up pending or failed sync runs and enqueues them, so a manual trigger or a webhook never depends on a user request finishing
Nightly full sync
Daily
Full reconciliation of all seven entities for every connected tenant — the safety net under incremental updates
Daily insights
Daily
Regenerates the insight and recommendation set for each tenant
Alert sweep
Recurring
Re-evaluates rules so a metric that drifts out of band is noticed even without user activity
Report delivery
Recurring
Runs due report schedules and delivers generated files to the configured recipients
Why this matters commercially
Because the worker owns the schedule, the platform's value does not depend on someone remembering to open a dashboard. A stockout risk is detected at 02:00 and a report is waiting before the morning stand-up — which is the difference between an analytics tool and an operations system.
Section 16
Reports, exports and retention
Generated CSV exports with a documented data dictionary, plus scheduled delivery — so finance and planning get the same numbers the dashboards show, without a screenshot or a manual rebuild.
Report types
Type
Contents
Used by
Sales
Orders with status, channel, totals, items, customer and timestamps for a date range
Finance, commercial review
Inventory
Variant-level stock, cost, price, reorder point and location
Operations, buying
Customers
Segments, lifetime value, order count, recency and contact details
Marketing, retention
Full dataset
Products and variants with performance attributes
Merchandising, analysis
Lifecycle
RequestType, date range and optional filters are validated, then a report record is created with status pending.
GenerateThe worker materialises the CSV to storage/reports/<tenant>/<report>.csv — tenant-partitioned from the first line.
DownloadGET /api/reports/:id/download streams the file after a permission and ownership check.
ScheduleA schedule repeats the request on a cadence and delivers the file automatically.
RetainGeneration history is preserved, so a number quoted last quarter can be traced to the report that produced it.
Export conventions
Columns are explicit and documented, not positional — a column reorder cannot silently corrupt a downstream import.
Currency and date formats are normalised on export, so a spreadsheet in another locale reads correctly.
Empty and null values are written explicitly rather than left ambiguous.
Filenames carry tenant, report type and generation timestamp for auditability.
Large datasets stream rather than buffer, so memory stays flat as the store grows.
The commercial point
Exports are where analytics platforms usually lose trust: a number in a deck that nobody can reproduce. Here the export is generated by the same service that renders the dashboard, from the same tenant-scoped queries, and it is retained. When finance asks where a figure came from, there is an answer with a timestamp.
Data dictionary (extract)
order_date Date Local store date of the order
status Enum Order status at export time
channel Enum web | pos | phone | marketplace | …
gross_revenue Decimal Order total before discounts
net_revenue Decimal After discounts and shipping
aov Decimal net_revenue ÷ orders
units Integer Sum of item quantities
discount_rate Decimal 1 − (net ÷ gross)
customer_segment Enum vip | high_value | at_risk | inactive
stock_on_hand Integer Current level by variant and location
days_of_cover Decimal stock_on_hand ÷ average_daily_units
Section 17
Design system and standards
Brand tokens, module accent colours, hand-rolled SVG charts and one spacing and motion scale — applied identically across the marketing site, the authenticated application, the exports and this document.
Core palette
Commerce Navy#071A3D
Commerce Blue#1E5EFF
MTS Orange#F97316
Orange Dark#EA580C
AI Indigo#6366F1
AI Cyan#22D3EE
AI Purple#8B5CF6
Success#16A34A
Warning#F59E0B
Error#DC2626
CTA Gradientorange → dark
Signaturecyan → indigo → orange
Module accent colours
Each module owns one accent, used in its navigation item, page header, cards, chart series and badges — so a user learns the colour language once.
Sales#F97316
Customers#8B5CF6
Products#06B6D4
Inventory#16A34A
Marketing#EC4899
Reports#2563EB
Alerts#F59E0B
Insightsblue → indigo
Type, spacing and shape
Inter-led system sans stack for UI and marketing; a monospace stack for identifiers, SKUs, endpoints, tokens and code.
One spacing scale, one radius scale, one elevation scale — defined as tokens, never ad-hoc values.
Navy headings on light surfaces, white headings on navy and gradient surfaces; body copy in a muted ink for comfortable long reading.
Tables use uppercase micro-headers on a navy band; dense data is a first-class layout, not an afterthought.
Empty, loading, error and stale states are designed for every data view, not improvised later.
Charts without a chart library
The visualisation layer is hand-built SVG — area and bar charts, donut segments, sparklines and stat tiles. No charting dependency means no bundle bloat, full control of the brand gradient, and charts that render identically in the app, on the marketing site and in a printed report.
Motion
Motion is purposeful: it explains hierarchy, direction and change — never it decorates.
Reveals, card lifts, gradient sweeps and count-ups run on a shared easing curve so the interface feels like one system.
Staggered delays give a group a reading order instead of a single noisy entrance.
Looping background animation is low-contrast and slow; it never competes with content.
prefers-reduced-motion is honoured everywhere — animation is a preference, not a requirement.
Accessibility as a build gate
Focus-visible outlines, keyboard-reachable controls, aria labelling on icon-only buttons, semantic tables with header scopes, sufficient contrast on every text/background pair, and responsive layouts tested at mobile width. Accessibility is checked, not asserted.
The same contribution rules every time
The reason a codebase stays maintainable is that every change obeys the same rules. These are the rules we apply to this platform and to every project we hand over — they do not change per project, per team or per deadline.
Design rules
Reuse an existing token, component or pattern before creating a new one. Duplication is a defect with a delayed invoice.
One accent colour per module, applied consistently across navigation, headers, cards, charts and badges.
Never hard-code a colour, radius, spacing value or font size in a component — read it from a token.
Every screen ships all four states: loading, empty, error and populated.
Responsive and reduced-motion behaviour is part of the component, not a follow-up ticket.
Charts use the same series colours and the same number formatting as the rest of the product.
Code contribution rules
TypeScript strict mode; no implicit any, no untyped API boundaries.
Feature branches, small reviewable diffs, and a passing lint and typecheck before review.
Controllers stay thin; business rules live in services or shared packages where they can be reused and tested.
No business logic in the web client that also exists in the API — the API is the single source of truth.
Every schema change ships with a reviewed migration and an idempotent seed update.
Comments explain why; the code already says what.
Security contribution rules
Never commit a secret; everything sensitive is environment-driven and validated at boot by a Zod schema.
All tenant-scoped queries go through the tenant-aware client; explicit tenant assertions on sensitive reads.
New endpoints declare their permission key explicitly, or are explicitly marked public with a reason.
Input validated at the boundary; output encoded; no string-built SQL anywhere.
Administrative actions write an audit entry with actor, action, entity and IP.
Testing contribution rules
A new user-facing path ships with an end-to-end assertion; a new metric ships with a case that pins the number.
Tests assert behaviour and contracts, not implementation detail, so refactoring does not break the suite.
Seeded demo data is deterministic, so a failure is a real regression rather than a data artefact.
CI is the definition of done: build, lint, typecheck, migrate, seed, test.
No test is skipped to make a pipeline green; a flake is a bug with a deadline.
Delivery and documentation rules
Behaviour changes arrive with documentation in the same change — API, configuration and runbook.
Environment changes update .env.example in the same commit.
Nothing is "known broken" without a tracked item; nothing is improvised without a decision record.
Handover is a phase of every project, planned from day one, not a scramble at the end.
The customer can run the system without us — that is the acceptance test for the whole codebase.
AI contribution rules
Numbers come from the metrics service, never from a model. The model may explain, never invent.
Every insight carries evidence and severity; an insight that cannot be evidenced is not shipped.
AI features have a deterministic fallback so the product never depends on a third-party response.
Privacy mode is enforced in code: strict mode does not send tenant context to a provider.
Provider usage, tokens and requests are logged per tenant for cost and audit.
Section 18
Security model
Multi-tenancy enforced at the data layer, sessions by hashed opaque tokens, secrets encrypted at rest, every administrative action audited, and AI context governed by an explicit privacy mode.
Authentication
Email and password with bcrypt hashing plus an optional pepper. The browser holds an opaque session token in an HttpOnly, SameSite=Lax cookie, Secure in production. Only a SHA-256 hash of the token is stored.
Authorisation
A global session guard plus a permission guard driven by seeded permission keys and @RequirePermission declarations. Controllers never trust a client-supplied tenant or user id.
Tenant isolation
Thirty of thirty-two models are tenant-scoped. The Prisma client extension injects tenantId on scoped operations, so a missing filter is a code-review concern rather than a data-leak path.
Secrets at rest
BigCommerce access tokens are encrypted with AES-256-GCM and only decrypted inside the integration path. JWTs, webhook secrets and API keys come from the environment and are validated at boot.
Webhooks
BigCommerce webhooks are accepted on a raw-body route, signature-verified before parsing, and de-duplicated by event hash so a replayed event cannot double-apply.
AI data governance
strict privacy mode blocks tenant context from leaving the infrastructure. balanced sends redacted summaries; connected is the only mode that permits full context, and it is opt-in.
Audit trail
Sign-ins, connection changes, sync triggers, role changes, alert-rule edits and settings changes are recorded with actor, action, entity, IP and timestamp.
Input and output
Validated at the boundary with DTOs and Zod schemas, parameterised queries through Prisma, encoded output, and standard status codes instead of leaking internals.
Least data exposure
Read-only store scopes, no store writes, no password storage, and a documented rule that merchant data is used to answer the merchant's questions — nothing else.
Transport, headers and CORS
TLS in production. The application is built to sit behind a TLS-terminating proxy or load balancer; the secure cookie flag is enabled with NODE_ENV=production.
CORS allowlist. The API accepts only the configured web origins; it is not an open wildcard.
Raw body preserved. Registered before JSON parsing so webhook signature verification is genuine rather than reconstructed.
Session expiry.SESSION_TTL_SECONDS defaults to 24 hours; expired sessions fail closed.
Rate-limit awareness. Outbound store requests are paced; inbound sensitive endpoints are the natural place for a future limiter.
No client-side secrets. The browser never receives a store hash, token or provider key.
Environment validation. A Zod schema fails the boot on an invalid or missing value rather than defaulting silently to an insecure one.
Dependency hygiene. Pinned versions, a lockfile, and an explicit allowlist of runtime dependencies in each package.
Stated honestly
We implement the controls above and verify them in code review and tests. We do not claim certifications the company does not hold. If a customer requires SOC 2, ISO 27001 or a penetration test as a contractual precondition, that is scoped and scheduled explicitly with a qualified third party — not implied by this document.
Section 19
DevOps and delivery
Infrastructure as configuration, a two-stage CI pipeline, one command per task, and the same environment variables in local development, CI and production.
Local infrastructure
Two services and an optional tool, defined in infrastructure/docker-compose.yml and started with one command:
npm run infra:up # postgres:16-alpine + redis:7-alpine
npm run infra:down
Service
Image
Detail
PostgreSQL
postgres:16-alpine
Port 5432, database mts_intelligence, named volume, pg_isready healthcheck
Redis
redis:7-alpine
Port 6379, appendonly yes, named volume, redis-cli ping healthcheck
Adminer
adminer:4
Port 8080, behind the tools profile, waits for a healthy database
Commands
Command
Purpose
npm run dev
Run web, API and worker together through Turborepo
npm run dev:web · dev:api · dev:worker
Run one application in isolation
npm run build · lint · typecheck · test
Dependency-ordered pipeline tasks across the monorepo
Prisma client, migration, deployment, demo seed, browser data studio
npm run test:e2e · e2e:install
Playwright suite and Chromium provisioning
npm run format
Prettier across the repository
CI pipeline
Two jobs on every push and pull request to main, with concurrency cancellation so superseded runs do not consume capacity.
verifyNode 20 with npm caching, npm ci, then the dependency-ordered build, lint and typecheck across all workspaces.
e2eRuns only after verify passes. Starts PostgreSQL 16 and Redis 7 as managed services with health checks, exports the environment with AI_PROVIDER=rule, AI_PRIVACY_MODE=strict and MTS_DEMO=1.
Database lifecyclePrisma client generation, migrations deployed, demo data seeded — so the test run exercises a real schema and realistic data, not mocks.
Browser testsChromium installed with dependencies, then npm run test:e2e with the GitHub reporter, HTML report, trace and failure screenshots retained.
Why the order matters
Nothing reaches the browser test stage on a green lie: a type error, a lint violation, a failed migration or a missing seed fails the pipeline first. For a client, this is the difference between a predictable release and a release that consumes support time.
Deployment shape
Three deployables — web (Next.js), api (NestJS), worker (BullMQ) — scaled independently.
Stateless application tier: the only durable state is PostgreSQL, Redis and the report volume.
Container-ready: each app has a production start script and no build-time coupling to the others.
Environment-driven throughout, so promotion from staging to production is a configuration change, not a rebuild.
LOG_LEVEL and an optional SENTRY_DSN are already wired for production observability.
Section 20
Testing and quality
Four quality layers: types, lint, unit and integration tests, and ten browser end-to-end tests against a seeded database. The suite is part of the definition of done.
Gate 01
Typecheck
tsc --noEmit in strict mode across web, API, worker and every shared package, so an untyped boundary fails the pipeline.
Gate 02
Lint
ESLint 9 flat config with typescript-eslint and the react-hooks plugin, plus a shared base config every package extends.
Gate 03
Unit and integration
Test and test:unit / test:int tasks run per package, so pure rules and helpers are verified without a database.
Gate 04
End to end
Playwright against the real application with a real schema and the deterministic demo seed, serialised on one worker for stability.
The ten browser tests
Spec
Test
What it protects
auth.spec.ts
Unauthenticated visitors are redirected to login
Route protection on the application surface
Demo credentials sign in and load the dashboard
The single most important commercial path in the product
Invalid credentials surface an error
Failure handling is designed, not accidental
app.spec.ts
Dashboard shows core metrics
Seeded figures render, so the metrics service is genuinely wired
Orders list paginates seeded data
Pagination over a real dataset, not a mock array
Insights page lists insights and answers copilot questions
The insight engine and copilot round trip end to end
Settings tabs load account data
Administration surfaces, role gating and tab navigation
Period switcher updates the URL
Shareable, bookmarkable analysis state
marketing.spec.ts
Landing page renders the hero and links to pricing
Serial execution with one worker — no flakes from shared-database contention.
Existing dev servers reused locally; CI starts its own API and web, with a 120s and 180s readiness allowance.
Trace retained on failure and screenshots on failure, uploaded as artefacts.
One retry in CI, none locally, so a flake is visible in the pipeline rather than hidden.
E2E_SKIP_SERVERS=1 runs the suite against already-running services.
The honest test philosophy
A suite that only asserts rendering proves very little. These tests deliberately touch the risky parts — authentication, real seeded data through real queries, the copilot round trip and settings authorisation — because those are the paths a client actually depends on.
Known gap, stated honestly
Coverage is currently strongest on the browser journey layer. A dedicated unit and integration suite for the rule engine and metrics package is a defined roadmap item; the detectors are exercised through the insights path in the meantime.
Section 21
Configuration reference
43 environment variables, documented in .env.example, validated by a Zod schema at boot, and shared by web, API and worker. The same file works locally, in CI and in production.
Variable
Default
Purpose
NODE_ENV
development
Environment mode; enables secure cookies and production behaviour when production
WEB_URL
http://localhost:3000
Canonical web origin; used for CORS allowlisting and link generation
API_URL
http://localhost:3001
API base URL used by the web data layer
WORKER_PORT
3002
Worker health port for orchestration probes
DATABASE_URL
local Postgres
Prisma connection string for PostgreSQL 16
REDIS_URL
redis://localhost:6379
BullMQ broker and cache connection
JWT_SECRET
—
HS256 signing secret; minimum 32 characters, validated at boot
SESSION_TTL_SECONDS
86400
Session lifetime; 24 hours by default
SESSION_COOKIE_NAME
mts_session
Session cookie name
SESSION_COOKIE_DOMAIN
empty
Optional cookie domain for shared parent domains
ENCRYPTION_KEY
—
AES-256-GCM key for encrypting stored integration secrets
PASSWORD_PEPPER
—
Optional additional secret mixed into password hashing
REPORTS_DIR
storage/reports
Tenant-partitioned report output location
LOG_LEVEL
info
Application log verbosity
MTS_DEMO
1
Enables the seeded demo workspace and demo sign-in
Variable
Default
Purpose
BIGCOMMERCE_CLIENT_ID
—
App client id for the OAuth install flow
BIGCOMMERCE_CLIENT_SECRET
—
App client secret, exchanged server-side only
BC_AUTH_CALLBACK_URL
local callback
OAuth callback; must be publicly reachable in production
MTS_INSTALL_URL
—
Public install entry point published for the store
BIGCOMMERCE_STORE_HASH
—
Store hash for API-account connections
BIGCOMMERCE_ACCESS_TOKEN
—
Access token for API-account connections; stored encrypted
BC_WEBHOOK_HEADER_NAME
X-Auth-Token
Header carrying the shared webhook secret
BC_WEBHOOK_HEADER_VALUE
—
Shared secret compared before a webhook is processed
DEV_CONNECT_EMAIL
—
Local convenience identity for development sign-in
Variable
Default
Purpose
AI_PROVIDER
rule
rule for fully local intelligence, or openai, anthropic, google
Per-tenant request budget for external provider calls
OPENAI_API_KEY · OPENAI_MODEL
— · gpt-4o-mini
Optional OpenAI adapter configuration
ANTHROPIC_API_KEY · ANTHROPIC_MODEL
— · claude-3-5-haiku-latest
Optional Anthropic adapter configuration
GOOGLE_AI_API_KEY · GOOGLE_AI_MODEL
— · gemini-1.5-flash
Optional Google adapter configuration
Privacy by configuration
With the shipped defaults — AI_PROVIDER=rule and AI_PRIVACY_MODE=strict — the entire intelligence layer runs inside the customer's infrastructure. Connecting an external provider is an explicit, documented decision with a recorded setting.
Variable
Default
Purpose
BILLING_PROVIDER
inmemory
inmemory for local and demo, or stripe when billing is connected
STRIPE_SECRET_KEY
—
Server-side Stripe key; never exposed to the browser
STRIPE_WEBHOOK_SECRET
—
Verifies Stripe webhook signatures
EMAIL_PROVIDER
console
console logs messages locally; smtp sends for real
SMTP_HOST · SMTP_PORT
— · 587
Outbound mail server
SMTP_USER · SMTP_PASSWORD
—
Mail credentials, environment-only
SENTRY_DSN
—
Optional error reporting for production observability
How configuration is enforced
Every variable is declared once in a shared Zod schema with a type, a default where sensible, and a documented purpose. Web, API and worker import the same schema, so a missing or malformed value fails at boot with a clear message instead of surfacing as a runtime bug hours later. Adding a variable is a single change plus a documentation update.
Section 22
The demo workspace
A deterministic, seeded tenant — NovaCart Commerce — with a year of realistic trading history, deliberate seasonality, genuine low-stock situations and underperforming campaigns. Not mock-ups: computed records.
Sign in
Workspace
NovaCart Commerce
URL
https://novacart.demo.mts
Email
admin@magetech.demo
Password
MTS-demo-2026!
Role
Owner
Plan
Growth
What is in it
Entity
Volume
Shape
Products & variants
1,284
Curated catalogue plus generated depth, across categories and brands with status and pricing variety
Customers
12,450
Order counts, lifetime value, recency and groups producing four distinct segments
Orders
8,420
A year of history with weekly seasonality, growth trend and status variety
Order items
21,160
Multi-item baskets, so AOV and product mix are meaningful
Revenue
$284.5K
Derived from order totals, never entered directly
Inventory
Per variant
Levels engineered to produce critical, warning and healthy coverage states
Campaigns
Multiple
Spend, clicks, impressions and attributed revenue including deliberately weak performers
Insights
Generated
Produced on demand by the rule engine from the data above
Why the data is designed
Seasonality, not a straight line. Weekly and monthly variation means trend comparisons are meaningful and the "versus previous period" logic is visible.
Deliberate problems. Some variants are close to stockout, some campaigns underperform, some customer cohorts have gone quiet — so the insight engine has genuine findings to report.
Volume with a point. 8,420 orders with 21,160 line items is enough to make pagination, filtering and export real work rather than decoration.
Deterministic. The seed is idempotent and reproducible, so a demo, a screenshot and a test all show the same numbers.
Safe by default.AI_PROVIDER=rule and AI_PRIVACY_MODE=strict: the full intelligence layer runs with no external call and no data leaving the machine.
Run it yourself
Start infrastructurenpm run infra:up brings up PostgreSQL 16 and Redis 7.
Prepare the databasenpm run db:generate, then npm run db:deploy to apply migrations.
Seed the workspacenpm run db:seed creates the tenant, roles, permissions, users and a year of commerce data.
Start the applicationsnpm run dev runs web, API and worker together.
Sign inOpen http://localhost:3000 and use the credentials above.
Time to a working demo
On a machine with Node 20, the sequence above produces a fully populated, fully interactive system. That is the same claim we make in a client proposal — and it is the reason we can offer a working version rather than a promise of one.
Section 23
How we present it
A thirty-minute run of show that starts with the merchant's problem and ends with a system they can log into themselves. We do not open with architecture.
The thirty minutes
0–3 minTheir situation, in their words"What do you currently not know about your store that you wish you did?" We write the answers on the screen and use them as the agenda.
3–7 minSign in as two rolesOwner and operations manager. The identical screen, different data and different actions. Access control is proven, not claimed.
7–12 minDashboard in sixty secondsRevenue, orders, AOV, customers, low-stock and open alerts — with the previous-period comparison that makes a number meaningful.
12–18 minDrill to the answerFrom the dashboard into Sales, then Customers, then the specific cohort or product that explains the movement.
18–23 minThe insight, and its evidenceOpen one real insight: severity, the evidence behind it, the recommended action — and ask them to judge whether it is useful.
23–26 minAsk the copilotThey phrase the question. It returns grounded numbers. The credibility of the whole platform usually settles in this moment.
26–28 minThe alert that arrives at 02:00Show a rule, show the alert, show the notification. This is when "tool" becomes "system".
28–30 minThe handover question"What would you want to see on day one of your own instance?" Then we show the deliverables, not a brochure.
How we run it
Their data if they have it. A read-only sandbox store turns the demo into their own business; the seeded workspace is the fallback.
No slides after minute three. The system is the presentation material.
One question at a time. We pause at the insight screen and let them interrogate it.
Silence is useful. If a screen is confusing we stop and fix the explanation, not the screen.
Recorded follow-up. The questions we could not answer become the roadmap conversation, in writing.
How long does the first sync take, and what happens to our history?
Categories, brands, products, customers, orders, inventory and settings sync on a paged, resumable basis with per-entity checkpoints, so an interrupted run continues rather than restarting. For a first load we agree a backfill window with you; historical depth is a plan decision, and we can start with a fixed period and extend it.
What if BigCommerce changes its API?
All platform access is isolated in one client package with a rate-limit-aware, retrying client and response schemas. An upstream change is a change in one package, not a rewrite of the platform.
Do we need to change anything in our store?
No. Read-only scopes only. The app is installed or an API account is created, and the platform never writes back to the store.
Does our data leave our infrastructure?
Not by default. AI_PROVIDER=rule runs the whole intelligence layer locally, and AI_PRIVACY_MODE=strict blocks tenant context from being sent anywhere. External providers are opt-in, configured per workspace, and their use is logged.
How do we know the AI is not making things up?
Every number comes from the metrics service. The rule engine is deterministic; the model layer, when enabled, may phrase an explanation but never produces a figure. Every insight carries its evidence, and the copilot answers with the same computed values the dashboard shows.
What happens if a provider is unavailable?
The platform falls back to the local rule engine transparently. AI features degrade to fully local intelligence rather than breaking.
Who can see what?
Seven roles and 25 permission keys, enforced server-side. Thirty of thirty-two data models are tenant-scoped and the Prisma client injects the tenant filter automatically, so a missing filter is caught in review rather than in production.
Where are our credentials stored?
Store tokens are encrypted with AES-256-GCM and decrypted only inside the integration path. Sessions store a SHA-256 hash of the token, never the token. All other secrets are environment-driven and validated at boot.
Can you prove who did what?
Yes. Administrative actions are recorded with actor, action, entity, IP and timestamp, and the audit log is filterable in Settings.
What do we receive at handover?
Source code, infrastructure definition, CI pipeline, documentation, environment template, seeded demo workspace, training sessions and a support plan. You can run and extend the system without us.
What if BigCommerce is unavailable at 03:00?
The job fails, retries with exponential backoff, keeps its error for inspection, and the nightly full sync reconciles whatever the incremental run missed. The scheduler and the sync history in Settings are your evidence.
How fast can you deliver?
A focused first version in two to three weeks; a full production platform in six to ten. The demo workspace exists precisely so the first week of a project is spent on your requirements, not on building a system to look at.
Section 24
Deliverables on handover
Everything below exists already and is handed over as standard. Nothing on this list is a future promise, and nothing is withheld as a commercial lever.
Complete source code
Full monorepo: web, API, worker and all six shared packages
All 32 Prisma models and reviewed migrations
Ten Playwright end-to-end tests in the repository
No proprietary runtime, no licence server, no crippled build
Infrastructure definition
PostgreSQL 16 and Redis 7 compose stack with health checks
Container-ready deployables for web, API and worker
Environment template with all 43 documented variables
Backup and retention guidance for the data volumes
CI/CD pipeline
Two-stage GitHub Actions workflow: verify, then end-to-end
Build, lint, typecheck, migrate, seed, test on every push
Failure traces and screenshots retained as artefacts
Traces retained on failure for immediate diagnosis
Data and integration layer
Resumable BigCommerce sync for seven entities
OAuth and API-account connection paths
Signed, idempotent webhook handling
Demo seed that reproduces a year of trading data
Intelligence layer
Seven insight detectors with evidence and severity
Recommendation builder with priorities
Copilot tool calls over computed metrics
Provider adapters with local rule-engine fallback
Documentation
Architecture, API and development guides in the repository
Data dictionary for every exported column
Runbook for operations, sync and recovery
This document, updated as the product changes
Brand and design assets
Logo, favicon, app icon and wordmark variants
Colour tokens including per-module accents
Typography, spacing and motion standards
Reusable UI and chart component patterns
Access model and audit
Seven roles and 25 permission keys, seeded and extensible
Agreed support window with defined response targets
Prioritised roadmap, with your priorities weighted first
Known gaps listed explicitly rather than discovered later
Optional ongoing development and managed service
Source
Yours outright, with the full history. We are not licensing the right to use our own product in your business.
Documentation
Written for the engineer who joins in year two, not for the person who wrote it.
Independence
The handover test is whether your team can deploy a change without calling us. That is the goal, stated at the start.
Section 25
Develop, maintain, build from scratch
Three ways clients engage us. The same engineering standards apply to all three, and the same handover expectation: your team can run what we build.
Extending a live platform
New modules, new metrics, new detectors, new report types, new integrations — added without destabilising what runs. This is the normal shape of a long relationship: the platform is a foundation, not a finished brief.
New product modules following the existing model, route and permission pattern
New insight detectors and recommendation categories in the shared rule engine
New report types with schedule support and retention
New external integrations through the same rate-limited, checkpointed client pattern
Performance work on real query paths with measurement before and after
What makes extension cheap
Six shared packages already hold the reusable logic, so features compose instead of duplicate.
Permission keys are data, so a new capability ships with its access control rather than a follow-up.
The sync engine, job infrastructure and report pipeline are generic, not module-specific.
The design system and chart library are already established, so a new screen looks native on day one.
The test harness, CI pipeline and seed data are reusable infrastructure for every new feature.
The compounding effect
Because the first feature built the pattern, the tenth costs a fraction of the first. That is the difference between a codebase you extend and a codebase you fight — and it is why the second year of a relationship is faster than the first.
Maintenance and support
Keeping a platform healthy is a discipline of its own: dependency currency, security patches, monitoring, backups, incident response and a documented recovery path. We offer it as a defined service with agreed targets.
Dependency and security update cycles with tested upgrades
Monitoring and alerting on services, queues and scheduled jobs
Backup, restore and disaster-recovery testing
Incident response with a documented triage path and post-incident review
Performance regression investigation against measured baselines
Platform and API version management as BigCommerce evolves
Support shape
Tier
Response target
Included
Advisory
Next business day
Email advice, roadmap input, small improvements
Business hours
Same business day
Business-hour coverage, defect fixes, minor changes
Each engagement states what is included, what is billable, the response targets, the escalation path and the exit terms — including how your data and code are returned if the relationship ends. No ambiguity at the point where it would be most expensive.
Greenfield builds
When a client needs a new product rather than an extension, the discipline is the same and the sequence is deliberate: discovery, architecture, an early working slice, iteration, hardening, handover. The platform in this document was built exactly this way.
DiscoveryGoals, users, constraints, data sources, success measures, and the definition of a first useful version.
ArchitectureData model, service boundaries, integrations, security and tenancy — decided before code, because they are expensive to change later.
First sliceA thin end-to-end path that works with real data. Demonstrated in week one or two, not described in a document.
IterationShort cycles against real feedback, with the roadmap visible and reprioritised deliberately.
HardeningSecurity review, performance work, error and empty states, accessibility, and load behaviour under realistic volume.
HandoverDocumentation, training, CI, environment definition and a team that can ship without us.
What we build
Commerce platforms
Storefronts, dashboards, portals, marketplaces and multi-store management.
Data and analytics
Warehouses, pipelines, metric layers, reporting and self-serve analytics.
Applied AI
Insight engines, copilots, classification, forecasting and workflow automation.
Internal tools
Operations consoles, admin panels, approval workflows and customer portals.
Integrations
API and platform integrations, webhooks, ETL and third-party system connectivity.
Modernisation
Legacy replacement, framework migration, performance rescue and technical debt reduction.
Our bias
We would rather ship a small working system in three weeks than a large unwritten one in three months. Every engagement in this document follows that bias, and the demo workspace exists because of it.
Modular architecture
Modules are independent in route, data, permission and accent colour, but share the shell, the data layer and the design system. Adopt the modules you need; add the rest later.
White-label
Brand, palette, module set, navigation, plan catalogue, email templates and copy are configuration and seed data — not forks. Your brand, your domain, your client's product.
Multi-tenant by default
The tenancy model is part of the foundation, so serving multiple merchants, clients or business units is an architectural property rather than a retrofit.
Plan and entitlement layer
A seeded plan catalogue with entitlements, so product tiers and packaging are configured rather than hard-coded in the interface.
Documentation as a deliverable
Architecture, API, development, configuration and runbook documents travel with the code, so the product remains maintainable by people who were not in the project.
Reusable platform
The next client project starts from a working foundation rather than a blank repository. That is the business case for a platform: the second delivery is structurally cheaper.
Section 26
Service catalogue
What MageTech Solutions sells, in plain terms. Every service is delivered by the same engineering team that built this platform, under the same standards shown in Section 17.
▣
01
Custom application development
End-to-end product engineering: discovery, architecture, build, hardening, handover. Web applications, internal tools, portals, dashboards and operational systems — delivered as working software with source code.
◈
02
BigCommerce development and integration
Storefront and app development, OAuth and API-account integrations, data synchronisation, webhooks, catalogue and checkout work, and migration from spreadsheets or legacy systems onto a proper data foundation.
✦
03
AI engineering and automation
Insight engines, recommendation systems, copilots grounded in real data, classification and forecasting, alert automation and workflow replacement — with privacy modes and cost control designed in.
▤
04
Data engineering and analytics
Warehousing and normalisation, metric layers, dashboards, scheduled reporting, data dictionaries, retention and the export discipline that keeps finance and engineering arguing with the same numbers.
⟳
05
DevOps, CI/CD and cloud delivery
Pipeline design, infrastructure as configuration, containerisation, environment strategy, observability, backup and recovery practice, and release processes a team can trust on a Friday afternoon.
◉
06
Security and hardening
Authentication and authorisation design, tenant isolation, secret management, webhook verification, input validation, dependency hygiene, audit trails and security-focused review before handover.
◈
07
Design systems and front-end engineering
Brand-aligned design systems, token architecture, component libraries, accessible interfaces, data visualisation and motion that carries meaning rather than decoration.
⚑
08
Maintenance, monitoring and support
Managed support with defined response targets, dependency and security maintenance, incident response, performance work, monitoring and a documented recovery path.
▣
09
White-label and multi-tenant platforms
Platforms delivered under a client's brand and offered to that client's customers: configurable modules, entitlements, tenant isolation, plan catalogues and a reusable foundation.
◔
10
Technical consulting and audits
Architecture review, code and performance audit, delivery assessment, technology selection and pragmatic advice with a written outcome — including the option to do nothing when nothing is wrong.
▤
11
Documentation and knowledge transfer
Architecture, API and development documentation, data dictionaries, runbooks, recorded training and hands-on sessions so the owning team is never dependent on the author.
✚
12
Team extension
Senior engineers embedded with your team, working in your repository, your tooling and your ceremonies — with our standards and our handover discipline, at your direction.
How we scope work
Every service above is delivered under the same commercial discipline: an agreed outcome, an agreed definition of done, a visible plan, a fixed review cadence, and a handover that leaves the client independent. If a service does not apply to your situation, we say so rather than sell it.
Section 27
Technology expertise
Depth where it matters, judgement about what not to use. This platform is the evidence: every technology below is exercised in production code, not listed on a slide.
TypeScript and Node.js
Strict-mode services and applications, npm workspaces, Turborepo task graphs, shared types across every tier. One language from database extension to user interface.
React, Next.js and modern front-end
App Router, server components, streaming, route groups, caching and typed data layers. Accessible, responsive interfaces built on tokens rather than ad-hoc values.
Node APIs and service architecture
NestJS module design, guards and decorators, DTO validation, CORS and raw-body handling, versioning strategy, error contracts and clean service boundaries.
PostgreSQL and Prisma
Relational modelling, composite indexes, migration discipline, seeded reproducible environments, client extensions for tenancy, and queries designed for realistic volume.
Redis, queues and background processing
BullMQ queues, repeatable schedulers, stable job ids, retry and backoff, idempotent processors, and the discipline of keeping heavy work off user requests.
Commerce and BigCommerce
OAuth 2.0 install flows, staff API accounts, V2 and V3 REST, signed JWT auth payloads, paged resumable sync, webhooks, catalogue, checkout and store operations.
Applied AI
Deterministic rule engines, evidence-backed insight generation, tool-calling copilots over real metrics, provider abstraction, prompt and budget control, privacy modes and local fallback.
DevOps, CI/CD and quality engineering
GitHub Actions pipelines, infrastructure as configuration, containerisation, health checks, artefact retention, Playwright browser testing and dependency hygiene.
Data modelling and warehousing
Entity design that survives real business change, pre-aggregation for speed, historical correctness, and snapshots where a trend is the requirement.
Security engineering
Session design, hashed tokens, encryption at rest, permission models, tenant isolation, signature verification and audit trails — implemented, documented and reviewed.
Design systems and accessibility
Token architecture, component libraries, SVG data visualisation, motion standards, keyboard and screen-reader support, and reduced-motion compliance.
Performance engineering
Query-level optimisation, caching strategy, worker offloading, streaming exports, and measurement before and after so improvements are claims with evidence.
Technical writing and documentation
Architecture decisions, API references, data dictionaries, runbooks and training material that let a new engineer become productive without the original author.
Product and delivery judgement
Scoping honestly, sequencing work so a working version exists early, and telling a client when the right answer is a smaller product.
What we deliberately do not claim
No certification badges, no partner logos we do not hold, no client list we cannot evidence, and no benchmark numbers we have not measured. A capability claim in this document is always traceable to code in this repository.
Section 28
Pricing and engagement models
MageTech Solutions is not only a product. We are a BigCommerce development, customisation, integration, AI and managed-services partner — so a single bug fix, one new module and a multi-year platform programme are all straightforward to buy. Seven ways to work with us, and every figure below is a starting point, because the right price depends on scope, existing systems and integration complexity.
01
Hourly development
$25/ hour
A specific requirement, bug fix, enhancement or small integration where the scope is not yet fixed.
02
Dedicated resource
$1,500/ month
One continuous senior resource on your team, part-time or full-time, for ongoing development and support.
03
Module development
$1,000from
Build or enhance one defined module or integration. The natural way to adopt this platform piece by piece.
04
Fixed-price project
$5,000from
A clearly defined deliverable with agreed scope, acceptance criteria and a fixed price.
05
Maintenance & support
$299/ month
Keep an existing application reliable with monitoring, fixes, small enhancements and technical reviews.
06
Dedicated team
$6,000/ month
A complete MageTech engineering team — developer, backend, frontend, QA and lead — as an extension of your organisation.
07
Enterprise & custom engagement
Tell us what you need — we will design the right engagement
Enterprise implementations, AI commerce programmes, complex or multi-store integrations, ERP and CRM connectivity, data migration, custom BigCommerce applications and long-term product engineering. Scoped individually, with a written proposal before any work begins.
How to read these numbers
Every amount is a starting-from figure, not a fixed price. Final effort depends on your existing systems, the number of integrations, data volume, customisation and how much of the work is already reusable. We confirm effort, timeline, team and price in a written proposal before starting, and we do not invoice against an open-ended assumption.
01 — Hourly and task-based development
For customers with a specific requirement, bug fix, enhancement or small integration. Work is tracked, prioritised with you, and reported against the agreed estimate.
Service
Recommended rate
Typical work
BigCommerce development
$25–$40 / hour
Storefront and app changes, catalogue, checkout, theme work
AI / commerce intelligence development
$35–$60 / hour
Insight detectors, copilots, recommendation and forecast logic
Integration / API development
$30–$50 / hour
BigCommerce, ERP, CRM, webhook and third-party connectivity
UI / frontend development
$25–$40 / hour
Design systems, components, data visualisation, accessibility
QA / testing
$20–$30 / hour
Functional, regression and browser end-to-end testing
India-focused engagements: an equivalent starting range of ₹1,500–₹4,500 / hour, depending on skill level and complexity.
02 — Dedicated resource model
For customers who need a developer or technical resource continuously — typically an existing product team that needs additional BigCommerce, AI or integration expertise.
Dedicated resource
Monthly starting from
Best suited to
Junior developer
$1,500 / month
Maintenance, small fixes, front-end work under guidance
Mid-level developer
$2,500 / month
Feature delivery across the stack, integration work
Data platforms, AI systems, enterprise integrations
Part-time
80 hours / month
Full-time
160 hours / month
Reporting
Direct to your lead, in your repository and ceremonies
Commitment
Rolling monthly, with a defined notice period
Why this model exists
Most clients who buy a dedicated resource already have a team and a roadmap. What they lack is specific depth. This model adds one accountable senior engineer without the recruitment cycle, and it converts to a team model when the scope grows.
03 — Module-based development
Instead of buying the whole platform, purchase the modules you need. Each is scoped, delivered and priced on its own, and every one runs on the same foundation, so nothing has to be rebuilt later.
Module
Starting from
Module
Starting from
Commerce Dashboard
$1,500+
AI Insights
$2,500+
Sales Intelligence
$2,000+
AI Recommendations
$2,500+
Customer Intelligence
$2,000+
Custom Reports
$1,000+
Product Intelligence
$2,000+
BigCommerce API Integration
$1,000+
Inventory Intelligence
$2,000+
External ERP / CRM Integration
$1,500+
Marketing Intelligence
$2,000+
Custom AI Integration
$2,500+
We use "starting from" deliberately: actual effort depends on scope, existing systems and integration complexity. Bundling several modules is normally cheaper than buying them separately, and a full platform implementation is priced as a project — see below.
The most common purchase path
Start with the Dashboard and one intelligence module, prove the value on real data, then add the rest as budget allows. Because the data layer is shared from day one, each additional module is cheaper than the first.
04 — Fixed-price project
For customers who want a clearly defined deliverable. Scope, acceptance criteria, timeline and price are agreed before work starts.
BigCommerce AI Commerce Intelligence — implementation
$5,000starting from
BigCommerce integration and store data synchronisation
Commerce dashboard with core metrics
Sales, customer, product and inventory analytics
AI insights and prioritised recommendations
Custom reports and exports
User access, roles and permissions
Deployment and environment configuration
Documentation, data dictionary and handover training
Larger enterprise implementations
$10,000–$30,000+
Depending on integrations, customisation, AI requirements, data volume and deployment model.
Scope driver
Typical effect on effort
Number of stores
Each additional store adds connection, sync and reconciliation work
Storefront or BigCommerce app development, data migration from spreadsheets or legacy systems, custom reporting programmes, white-label platform builds, and performance or security remediation projects.
05 — Maintenance and support
Ongoing support for an application we built or one we inherited. Priced monthly, cancellable, with defined response targets.
Plan
Monthly
Response target
Included
Essential Support
$299
Next business day
Bug fixes · basic technical support · minor configuration changes · monitoring · monthly maintenance
Business Support
$599
Same business day
Everything in Essential · priority support · small enhancements · API and integration support · performance monitoring · monthly technical review
Enterprise Support
$1,499+
Within hours, SLA-based
Priority and SLA-based support · production monitoring · advanced troubleshooting · integration support · security and technical reviews · continuous improvements · dedicated support contact
Covered platforms
BigCommerce stores and apps, the MTS intelligence platform, custom web applications, APIs and integrations we built — and inherited applications after a review.
Also available
A managed service where we operate and monitor the platform and you simply use the product; or a support-only arrangement on your own infrastructure.
Not included
Unrequested feature development. That is quoted separately as a module, project or hourly item so support cost never hides development cost.
06 — Dedicated development team
For larger customers who want MageTech Solutions to operate as an extended development team rather than a sequence of projects.
$6,000/ month, from
A typical team, scaled to the requirement:
BigCommerce developer — store, catalogue, app and integration work
Backend / API developer — services, data layer, jobs and integrations
QA engineer — functional, regression and end-to-end automation
Technical lead / project manager — architecture, prioritisation, client communication and quality
Team composition, seniority and hours are agreed per engagement. A single dedicated resource is available at a lower entry point — see model 02.
What the team operates under
Aspect
How it works
Delivery
Short iterations against a prioritised backlog you influence
Communication
Weekly demonstration, written decisions, one escalation path
Quality
The pipeline in Section 19 applies to every change we make in your account
Documentation
Updated in the same change, not at the end of the engagement
Ownership
Your repository, your infrastructure, your cloud — we work in your estate
Exit
Source, documentation and configuration are yours throughout
Common pairing
Most teams start with BigCommerce, backend and QA capacity, add a dedicated resource from model 02, and take AI and data engineering on demand as the intelligence layer grows.
How to choose — the hybrid model
We do not price only by hours, because that positions us as a staffing supplier rather than a technology partner. The right model follows the shape of the requirement.
Small task
Hourly
A fix, an enhancement, a question, something undefined. Model 01 from $25/hour.
Known feature
Module or fixed price
A defined module, integration or report with a known outcome. Models 03 and 04 from $1,000 and $5,000.
Large implementation
Project price
A full implementation with scope, milestones and acceptance criteria. Model 04 from $5,000, typically $10,000–$30,000+.
Continuous development
Dedicated resource or team
An ongoing roadmap needing steady capacity. Model 02 from $1,500/month or model 06 from $6,000/month.
Existing application
Monthly maintenance
Something already works and must keep working. Model 05 from $299/month.
Enterprise
Custom engagement
Multi-store, ERP and CRM, migration, AI programmes, long-term product engineering. Model 07, scoped individually.
The commercial principle
We recommend the model that fits the requirement, not the one that maximises revenue. A client who starts with a $1,500 module and a good experience comes back for the platform; a client over-committed to a large fixed scope does not.
How we work
Step 01RequirementYou share the requirement, the constraint and the outcome you need. A conversation, a document, a call recording — whatever is easiest.
Step 02DiscoveryWe review the application, the APIs, the workflows and the technical scope. Where we need to look at a live store or codebase, this is where access is agreed.
Step 03ProposalEstimated effort, timeline, team and pricing — in writing, with what is included and what is explicitly out of scope.
Step 04DevelopmentOur team develops, tests and reviews the solution in short cycles, with visible progress rather than status reports.
Step 05DeliveryDeployment, documentation, training and handover. Source code and knowledge transfer are part of delivery, not an extra.
Step 06SupportMaintenance, enhancements and continuous improvement — on whichever model suits you, including none.
Ask for a customised proposal
Enterprise implementations, AI commerce projects, complex or multi-store integrations, ERP and CRM connectivity, custom BigCommerce applications, data migration and long-term product engineering all start with the same sentence: tell us what you need, and we will design the right engagement model.
We publish our prices because we would rather compete on the work than on the opacity of the quote.
Section 29
Engagement and support
Four engagement shapes, one way of working: a defined outcome, a visible plan, a fixed review cadence, and a handover that leaves the client independent.
Fixed-scope project
Agreed deliverables, agreed timeline, agreed price. Best when the requirement is genuinely known. Milestone-based with acceptance criteria per phase.
Time-and-materials
Capacity committed, work prioritised jointly, transparent tracking. Best when the requirement is emerging and speed of iteration matters more than certainty.
Retained team
A continuing team on a rolling basis with a roadmap you influence: extension, new modules, and steady maintenance under one relationship.
Managed service or advisory
We operate and monitor the platform, or we advise and review. Support tiers with defined response targets, escalation paths and an agreed exit.
How the first four weeks run
Week 0Discovery and accessGoals, constraints, stakeholders, data sources, environments and access. A written outcome definition we both agree on before any code.
Week 1Architecture and first sliceData model and boundaries decided; a thin end-to-end path running against real data and demonstrable.
Weeks 2–3IterationShort cycles against feedback. Weekly demonstration, visible backlog, reprioritised deliberately rather than accidentally.
Final weeksHardening and handoverSecurity, performance, accessibility and error-state pass; documentation, training, CI and environment definition delivered; support agreement started.
Communication and governance
One written source of truth for scope, decisions and open questions, so requirements are not remembered differently by different people.
Weekly working session and demonstration — progress shown, not described.
Decision log including the reasoning, so a later team understands why, not just what.
Escalation path agreed before it is needed, with named contacts and response targets.
Change control for scope changes, with the trade-off stated in writing rather than absorbed silently.
Exit terms are part of the agreement
Source code, documentation, infrastructure definition, environment configuration and data export are returned at any point on request — including at the end of the relationship. That is not a concession; it is the design constraint that keeps our work honest.
Section 30
Outcomes, quality and roadmap
What we hold ourselves to, and what is still to come — stated with the same precision as what already works.
Outcomes we target
A working version early. A demonstrable end-to-end path in the first weeks, not a design document in a quarter.
Decisions without spreadsheet archaeology. The question that took an afternoon of exports answered from a screen in seconds.
Problems caught before they cost money. Stockout risk, churn risk and revenue anomalies surfaced while there is still time to act.
Reporting that reproduces. Every exported figure traceable to a generated report with a timestamp.
Hours returned. Manual weekly reporting replaced by generated, scheduled exports.
Ownership transferred. The client's team can deploy, extend and support the system without us.
Quality commitments
Commitment
How it is enforced
No type or lint regressions
CI gates on every push and pull request
No unvalidated input at a boundary
DTO and Zod schemas, code review rule
No tenant data crossing a boundary
Client extension plus explicit service assertions
No AI-produced numbers
Figures sourced from the metrics service only
No undocumented behaviour change
Documentation updated in the same change
No handover surprise
Known gaps listed explicitly, in writing
Roadmap
DeliveredFoundation and productMonorepo, 32-model schema, 64-endpoint API, 10 modules, 7 roles, BigCommerce sync with resume and webhooks, insight engine, copilot, alerts, reports, worker with 5 queues and 5 schedules, CI and 10 browser tests.
DeliveredBrand and experienceDesign tokens, module accents, SVG chart library, responsive layouts, marketing and application surfaces, accessibility pass.
NextTest depth for the intelligence layerA dedicated unit and integration suite for the rule engine and metrics package, pinning thresholds and detector behaviour.
NextRicher provider contextSerialising assembled business facts into external provider payloads, so narrative answers can cite the same computed evidence locally.
PlannedScale and operationsConnection pooling and query budgets for larger tenants, job-level observability, retention policies for generated reports.
Client-ledWhatever the roadmap prioritises nextFor retained engagements, the client's priorities are the roadmap. This list is the starting point, not the boundary.
Why we publish the gaps
A vendor who claims everything is finished has either not tested it or is hiding the cost of fixing it later. Both of these items are real, both are small compared to the platform, and both are stated here so nobody discovers them during a deadline.
Section 31
Next steps
Three ways forward, in ascending order of commitment. All three start with a conversation, and none of them require a decision today.
Option A
See it with your own questions
A thirty-minute session on the seeded workspace, or on a read-only sandbox of your own store. Bring the questions your team actually asks; we will answer them in the product.
Commitment: one hour.
Option B
Scoped first version
We agree an outcome, a first set of requirements and a two-to-three week delivery of a working slice against real data — with acceptance criteria agreed before we start.
Commitment: a scoped project.
Option C
Adopt the platform as it stands
Deploy this platform now, connect a store, and extend it from there. The fastest route to value when the existing modules already match the requirement.
Commitment: onboarding and configuration.
What we need from you to start
The decision-maker and the person who will use the system daily — ideally the same meeting.
Read-only access to a store, or agreement to use the seeded workspace.
The three questions your team cannot answer quickly today.
Any constraint we should design around: hosting, data residency, timeline, budget shape.
A short readiness checklist
Product runs todayAll ten modules, live on the seeded workspace.
Documentation existsArchitecture, API, development, configuration and this document.
Handover artefacts readySource, infrastructure, CI, seed, brand assets, training plan.
Store connectionOAuth app or read-only API account, and a publicly reachable callback URL.
EnvironmentDeployment target, domain, database and Redis provisioning.
Talk to MageTech Solutions
We would rather answer a hard technical question now than win a project and disappoint you later. Bring the awkward one.
Bring it upnpm run infra:up, npm run db:generate, npm run db:deploy, npm run db:seed, npm run dev.
Check the numbersSign in at localhost:3000; the dashboard figures should match the seed defaults in the table above.
Run the gatesnpm run lint, npm run typecheck, npm run test:e2e.
Inspect the schemaOpen prisma/schema.prisma, or npm run db:studio for a browsable view.
Read the API surfaceEnumerate routes in the controllers, or call GET /api/health on a running API.
Verify this document
Every section number in the table of contents resolves to a section in the page.
All logo and icon assets are embedded, so the file renders identically with no network access.
Animations, tabs, accordions, counters, progress bars and the back-to-top control all function offline.
Print and PDF output keep section boundaries intact and drop interactive chrome.
Layout holds from mobile width to wide desktop with no horizontal overflow.
On the numbers in this appendix
Every figure is stated with the file that defines it, so a reader can confirm it rather than take it on trust. Where a capability is a roadmap item it is labelled as such — the only figures here are current, measurable ones.