What it is
A back-office analytics and decision platform — not a storefront. It answers "what changed, why, and what should we do next" for BigCommerce merchants and their teams.
A multi-tenant analytics and decision platform for BigCommerce merchants. It ingests a store's commerce data, turns it into explainable intelligence — sales, customers, products, inventory, marketing — and delivers it through a role-aware dashboard, a deterministic AI insight engine, an AI copilot, threshold alerts and scheduled reports.
Prepared by MageTech Solutions · Monorepo mts-bigcommerce-intelligence · Node 20+ · NestJS 11 · Next.js 15 · PostgreSQL 16 · Redis 7 · Prisma 6 · BullMQ 5
MTS BigCommerce AI Commerce Intelligence is a production-shaped, multi-tenant commerce intelligence platform. It ingests BigCommerce store data into a normalised PostgreSQL warehouse, computes analytics on read, runs a deterministic insight engine plus an optional LLM copilot, and exposes everything through a role-aware web application, a REST API and scheduled background jobs.
A back-office analytics and decision platform — not a storefront. It answers "what changed, why, and what should we do next" for BigCommerce merchants and their teams.
BigCommerce sync (OAuth or API token) → normalised warehouse → on-read metrics, a rule-based insight engine and an AI copilot → dashboards, alerts, CSV reports and audit trail.
Explainable by design: every insight, recommendation and answer is derived from deterministic rules over the merchant's own data, with a strict privacy mode and a full audit trail — no black-box scoring.
A BigCommerce store generates orders, customers, catalogue changes and inventory movements faster than a small team can interpret them. The data exists, but it is fragmented across the control panel, spreadsheets and exports, and the important questions — revenue quality, stockout risk, churn, campaign ROI — are answered manually, late and inconsistently.
AI_PROVIDER=rule runs fully offline; external LLMs are optional, and any provider failure transparently falls back to the local engine.Insight generation never depends on a language model. The rule engine produces the findings; a language model, when enabled, only explains them in natural language. This is what makes the product trustworthy in front of finance and operations teams — and what lets it run with zero AI spend in strict privacy mode.
One platform, five operating personas, each with a scoped view of the same tenant data.
Revenue, order volume, AOV, channel mix and growth at a glance; at-risk customer value; plan, usage and team overview.
Trend analysis by metric, channel contribution, order pipeline detail, customer segmentation and report exports.
Days-remaining coverage, low-stock and out-of-stock queues, stock-level history, product health and alert rule management.
Campaign spend, attributed revenue, ROAS, CTR and conversion rate, blended with store-wide sales performance.
Full read access across modules, generated insights and recommendations, copilot Q&A, and ad-hoc report creation and export.
Implementation, integration, hosting, custom modules, white-labelling, security hardening and roadmap delivery for merchant tenants.
Positioning against the tools a merchant already considers: native BigCommerce reporting, general BI, spreadsheet stacks, plug-in AI assistants and custom agency builds.
| Capability | BigCommerce native reports | General BI (warehouse) | Spreadsheet reporting | Generic AI chat tools | This platform |
|---|---|---|---|---|---|
| Time to first insight | Minutes, but surface-level | Weeks (pipeline build) | Hours per report | Immediate but uninformed | Immediate on a seeded or synced store |
| Cross-domain view (sales + stock + customers + marketing) | Partial, siloed | Yes | Manual joins | No | Yes, one warehouse, on-read metrics |
| Explainable AI insights | No | No (dashboards only) | No | Opaque, prompt-dependent | Rule-based detectors with evidence + severity |
| Works with no data leaving the merchant's infra | n/a | Depends | Yes | No | Yes — AI_PROVIDER=rule, strict privacy mode |
| Automated alerts & scheduled reports | Basic | Extra tooling | Manual | No | Yes — BullMQ schedules, CSV exports, in-app notifications |
| Role-based access & audit trail | Limited | Extra tooling | File permissions | No | Yes — 7 roles, 25 permissions, audit log with actor and IP |
| Time to deploy / cost to own | Included but limited | High | Low tech, high labour | Subscription, no context | Monorepo deployable with Docker; demo mode runs in minutes |
| Vendor accountability | Platform vendor | Tool vendor | Internal | Model vendor | MageTech Solutions — implementation, hosting, roadmap |
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.
/api prefix, guards, decorators, CORS, raw body for webhooks| Layer | Technology | Version | Role in the platform |
|---|---|---|---|
| Language | TypeScript | ^5.7.3 | Strict mode everywhere; shared types across API, worker, packages and web |
| Runtime | Node.js | >=20 (CI on 20) | API and worker runtimes; npm 11.6.2 workspaces |
| Monorepo | npm workspaces + Turborepo | ^2.4.4 | Dependency-ordered build/lint/typecheck, persistent dev tasks |
| Web | Next.js / React / Tailwind | ^15.1.3 / ^19.0.0 / ^4.0.0 | Marketing site, authenticated app, SVG chart library, design system |
| API | NestJS (common, core, platform-express) | ^11.0.1 | REST controllers, session + permission guards, metrics service |
| Worker | @nestjs/bullmq / bullmq / ioredis | ^11.0.3 / ^5.58.0 / ^5.6.1 | Sync, insights, alerts, reports, scheduler processors |
| Data | Prisma ORM / PostgreSQL | ^6.2.1 / 16 | Schema, migrations, typed client, tenant extensions, seeding |
| Cache & queues | Redis | 7-alpine | BullMQ broker, job dedup IDs, repeatables |
| Validation | Zod | ^3.24.1 | Environment schema, BigCommerce payload schemas |
| Auth crypto | bcryptjs + node:crypto + jose | ^3.0.2 / built-in / ^5.9.6 | Password hashing, SHA-256 session tokens, AES-256-GCM secrets, HS256 JWT verification |
| AI | Rule engine + provider adapters | in-house / optional | Deterministic insights; OpenAI, Anthropic, Gemini adapters with fallback |
| Quality | ESLint, typescript-eslint, react-hooks, Playwright | ^9.39.5 / ^8.70.1 / ^5.2.0 / ^1.63.0 | Lint gate, type gate, 10 browser E2E tests in CI |
Three deployable applications and six shared packages, wired by npm workspaces and orchestrated by Turborepo. The API and worker never talk to the database through different abstractions — they share one Prisma client factory with tenant scoping, so isolation is structural rather than a convention.
brand.ts module colour map, shell components with per-module accents.mts_session cookie (HttpOnly, SameSite=Lax, Secure in production)./api/* to the Nest API; server components fetch without a base URL, client components resolve it from the environment.SessionGuard resolves the hashed token to a live session and attaches tenant, user and role; PermissionsGuard enforces @RequirePermission keys.tenantId at the client layer, and sensitive reads are additionally guarded in service code.storage/reports/<tenant>/<report>.csv files and sync-run records.Both applications import @mts/database, which is marked server-only. The web client may only import type from it. Centralising the client means one place controls connection pooling, tenant extension and disconnect behaviour — a requirement for the serverless-style deployment targets the API supports.
The three paths a merchant actually walks, from installation to an AI-assisted decision.
The monorepo is the product: every module, migration, test and environment key lives in one versioned tree.
mts-bigcommerce-intelligence/ ├── apps/ │ ├── web/ # Next.js 15 app — marketing + authenticated application │ │ ├── src/app/(marketing)/ # home, features, pricing, about, contact, install, how-it-works, login, signup │ │ ├── src/app/(app)/ # dashboard, sales, customers, products, inventory, marketing, insights, reports, alerts, settings │ │ ├── src/components/ # app-shell, ui, data, charts, notification-bell, copilot │ │ ├── src/lib/ # brand tokens, API client, hooks, formatting │ │ └── public/ # logo and favicon assets │ ├── api/ # NestJS REST API │ │ ├── src/modules/ # 18 controllers + services (auth … webhooks) │ │ ├── src/common/ # guards, decorators, filters, interceptors │ │ ├── src/app.module.ts # module wiring, CORS, raw body │ │ └── prisma/seed/ # demo workspace generation │ └── worker/ # NestJS BullMQ worker │ ├── src/processors/ # sync, insights, alerts, reports, scheduler │ └── src/worker.module.ts # queues and repeatables ├── packages/ │ ├── shared/ # zod env schema, crypto, periods, constants, plan catalogue │ ├── database/ # prisma/schema.prisma, client + tenant extension, seed │ ├── ai/ # rule engine, copilot tools, provider adapters, usage metering │ ├── bigcommerce/ # API client (rate limit, retries), OAuth JWT, webhook verification │ ├── analytics/ # shared metric computation used by API, insights and reports │ └── config/ # shared tsconfig and eslint bases ├── e2e/ # Playwright specs: auth, app, bigcommerce ├── docs/ # ARCHITECTURE.md, API.md, DEVELOPMENT.md ├── storage/reports/ # generated CSV reports, tenant-partitioned ├── docker-compose.yml # postgres:16-alpine, redis:7-alpine, adminer (tools profile) ├── turbo.json # task graph and caching ├── playwright.config.ts # dev-server reuse, storage-state auth ├── .github/workflows/ci.yml # verify → build/lint/typecheck; e2e → services + seed + Playwright └── .env.example # 43 documented variables
Every feature follows the same shape: Prisma model and migration in packages/database, service logic in a package (shared/analytics/ai), a thin controller plus service in apps/api, a processor in apps/worker if it is asynchronous, a page and components in apps/web, a Playwright assertion in e2e, and documentation updated in the same change.
32 models and 30 enums in a single tenant-rooted schema. Every business record carries a tenantId; the tenant client extension enforces that boundary on all tenant-scoped models.
Tenant, User, Role, Permission, Session, AuditLog, Subscription, Plan.
Order, OrderItem, Customer, Product, ProductVariant, Category, Brand, InventoryLevel, InventorySnapshot.
SalesSnapshot (pre-aggregated daily), CustomerSegment, Campaign, Insight, Recommendation, CopilotMessage, AiUsage.
AlertRule, Alert, Notification, Report, ReportSchedule, SyncRun, BigCommerceConnection, WebhookEvent.
| Area | Key models | Design notes |
|---|---|---|
| Tenancy | Tenant → all scoped models | 30 of the 32 models are tenant-scoped; the client extension injects tenantId automatically, and services may still assert it for defence in depth. |
| Identity & access | User, Role, Permission, Session | Users carry roleId; roles own a permission set; permissions are seeded as 25 stable keys. Sessions store a SHA-256 hash of the token, not the token. |
| Orders | Order, OrderItem | Orders keep external ids, status, channel, totals, customer and timestamps; items snapshot product and variant identity and price at purchase time, so historical revenue never shifts when a catalogue price changes. |
| Customers | Customer, CustomerSegment | Customer aggregates (order count, lifetime value, last order) are denormalised for fast segmentation; segments are rules stored 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 support a BigCommerce channel mapping (1–7). |
| Inventory | InventoryLevel, InventorySnapshot | Current level plus location and reorder data; snapshots give the coverage trend used for days-remaining and stockout risk. |
| Analytics | SalesSnapshot | One row per tenant per day per channel: revenue, orders, units, AOV. Pre-aggregation keeps the dashboard fast on demo-scale and production-scale data alike. |
| Marketing | Campaign | Spend, clicks, impressions, attributed revenue and derived ROAS/CTR/CVR, 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/low priority; copilot turns and provider usage are logged per tenant and user. |
| Automation | AlertRule, Alert, Notification, Report, ReportSchedule | Rules store operator, threshold and window; alerts record metric, value, threshold and status; notifications are the in-app feed; reports track type, parameters, file path and generated time; schedules are repeatable definitions. |
| Integration | BigCommerceConnection, SyncRun, WebhookEvent | Connection stores encrypted credentials, status, last sync and installed scope set; sync runs track entity, status, counts, checkpoint and error per entity; webhook events are idempotent by event hash. |
RoleKey OWNER, ADMIN, ANALYST, SALES_MANAGER, OPERATIONS_MANAGER, MARKETING_MANAGER, VIEWER · PlanKey STARTER, GROWTH, PROFESSIONAL, ENTERPRISE
OrderStatus, ChannelType (web, pos, phone, marketplace, offline, store, kiosk), ProductStatus, PaymentStatus, FulfillmentStatus
InsightType, InsightSeverity, RecommendationType, RecommendationPriority, AlertType, CopilotIntent, AiProvider
SyncStatus, SyncEntity (categories, brands, products, customers, orders, inventory, settings), AlertOperator, NotificationType, ReportType
The schema ships with a single initial migration that creates all tables, indexes and enums. Additive changes follow the same path: edit schema.prisma, generate a timestamped migration, review the SQL, and keep the seed idempotent so demo and tenant data can be regenerated safely.
Ten product modules share 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.
Revenue, orders, AOV, customer count, low-stock and open-alert counters; revenue and order trends; channel mix; top products; the latest insights; recent activity.
Order pipeline by status, revenue trend with period comparison, channel contribution, AOV movement, and order-level detail with customer and channel context.
VIP, high-value, at-risk and inactive segments; lifetime value distribution; segment explorer; win-back targeting with counts and value at stake.
Product performance by revenue and units, status mix, category and brand breakdowns, price and margin view, and a product health score for assortment decisions.
Days-remaining coverage, low-stock and out-of-stock queues, reorder points, stock-level trends and valuation, with variant-level drill-down.
Spend, attributed revenue, ROAS, CTR and conversion per campaign, channel efficiency comparison, and revenue trend in campaign context.
Generated insights with evidence and severity, prioritised recommendations, a full insight history, and the AI copilot for natural-language questions.
Sales, inventory, customer and full-dataset report generation with date ranges, CSV download, scheduled deliveries, and a generation history with status.
Rule management for revenue drops, order anomalies, AOV shifts, low stock and churn; triggered alerts with metric, value and threshold; in-app notification feed.
BigCommerce connection and sync history, team members and roles, subscription and plan, AI provider configuration, notification preferences and audit log.
| Capability | Modules | Notes |
|---|---|---|
| Period-aware analytics (7 / 30 / 90 days, custom) | Dashboard, Sales, Products, Marketing | Period resolution is centralised in @mts/shared, so every chart and stat card compares the same window consistently. |
| Insight generation and recommendation prioritisation | Insights, Dashboard, Alerts | Detectors produce findings; recommendations are ranked by priority and impact. |
| Natural-language Q&A | Insights (copilot) | Intent mapped to typed tool calls over the same metrics — answers are grounded, not invented. |
| Threshold rules and notifications | Alerts, Settings, shell bell | Unread counts in the header; last-run banner; read and bulk-read actions. |
| Data export | Reports | |
| Store lifecycle | Settings | Install link, credential entry, manual sync, sync history with checkpoints, disconnect. |
| Access control | All modules | Permissions are checked server-side per endpoint; the UI only adapts presentation. |
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 / IT lead | All analytics, alerts, reports; manages team and alert rules | All modules except ownership-level plan changes |
| Analyst | Data analyst | Full read across modules; creates insights and reports | All analytics modules |
| Sales manager | Sales lead | Sales, customers, products read; report generation; alert management | Sales, Customers, Products, Reports, Alerts |
| Operations manager | Fulfilment / supply lead | Inventory and products focus; alert rules; report generation | Dashboard, Products, Inventory, Alerts, Reports |
| Marketing manager | Growth / acquisition lead | Marketing and sales focus; report generation; alert viewing | Dashboard, Sales, Marketing, Reports, Alerts |
| Viewer | Finance, agency, stakeholder | Read-only dashboards and report downloads | Dashboard, Sales, Customers, Products, Inventory, Marketing, Reports |
@RequirePermission('key') on a controller or handler; PermissionsGuard resolves the session user's role and compares against its permission set.@Public() marks the ten endpoints reachable without a session: health, auth login/register, the BigCommerce install entry point, plan catalogue, and the documented webhooks.analytics:read, sales:read, customers:read, products:read, inventory:read, marketing:read
insights:read, insights:generate, ai:copilot
reports:read, reports:generate, alerts:read, alerts:manage
settings:read, settings:manage, team:read, team:manage, bigcommerce:connect, bigcommerce:sync, audit:read
Keys are seeded data, not hard-coded constants, so MageTech can extend a merchant's role model without a schema change.
64 endpoints across 18 controllers, mounted under a global /api prefix on port 3001. JSON in, JSON out; authentication is a session cookie; errors follow a consistent status-code contract.
mts_session (HttpOnly, SameSite=Lax)/api — no version segment/api/health — liveness and dependency status| 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/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 |
| Settings | settings | Tenant profile, team, roles, notification preferences, audit log | GET /settings · GET /settings/team · GET /settings/audit |
| BigCommerce | bigcommerce | Install entry, OAuth callback, connect, sync trigger, status, disconnect, webhook | GET /bigcommerce/install · GET /bigcommerce/callback · POST /bigcommerce/connect · POST /bigcommerce/sync · POST /bigcommerce/webhooks |
| Plans | plans | Plan catalogue and current subscription | GET /plans · GET /plans/subscription |
| Audit | audit | Tenant audit trail with actor, action, entity and IP | GET /audit |
| Users (admin) | users | Team member invitations and role changes | GET /users · PATCH /users/:id |
period (7/30/90 or a custom range) and pagination parameters.POST /api/auth/login
{ "email": "admin@magetech.demo", "password": "MTS-demo-2026!" }
→ 200 { "user": {…}, "tenant": {…}, "expiresAt": "…" }
Set-Cookie: mts_session=<opaque token>; HttpOnly; SameSite=Lax
GET /api/auth/me
Cookie: mts_session=<opaque token>
→ 200 { "user": {…}, "tenant": {…}, "role": { "key": "owner" } }
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.
A deterministic rule engine is the product's intelligence; language models are an optional presentation layer. The engine computes findings from the tenant's own metrics, ranks them, and stores them as first-class records.
@mts/analytics computes revenue, orders, AOV, growth, channel mix, stock cover and customer aggregates for the requested window.| Signal | Default | Meaning |
|---|---|---|
| Revenue move | ±5% | Period-over-period revenue change worth investigating |
| Order move | ±5% | Order volume anomaly |
| AOV move | ±5% | Basket-size shift — pricing or mix signal |
| At-risk customers | 30 days | Recency threshold for churn risk |
| Critical low stock | 7 days cover | Stockout imminent |
| Warning low stock | 14 days cover | Reorder planning window |
| Overstock | 90 days cover | Capital tied up in slow-moving stock |
The copilot classifies the question into a typed intent, maps it to a tool call over the same metrics, and returns a grounded answer with the supporting numbers. Examples of supported shapes:
rule (default, fully local) · openai · anthropic · googlestrict (never send context) · balanced (redacted summaries) · connected (full context permitted)AI_MAX_REQUESTS_PER_MONTH=500 with per-tenant usage recorded in AiUsageThe 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 tracked in the roadmap and is a deliberate correctness-first choice.
Two supported authentication paths — a full OAuth 2.0 app install and a staff API-account token — plus a rate-limit-aware client, resumable sync runs, signed webhooks and a canonical channel mapping.
GET /api/bigcommerce/install, which returns the BigCommerce authorisation URL with the requested scopes; the callback exchanges the code, stores encrypted credentials, and registers webhook subscriptions.signed_payload_jwt for control-panel callbacks; HMAC-SHA256 for webhooksOrder, product, customer and inventory events arrive at a raw-body endpoint. Each event is verified with a custom secret header or an HMAC signature, then recorded by event hash so retries are idempotent. Accepted events enqueue the corresponding sync entity.
BigCommerce channels are normalised into a platform enum so channel mix is comparable across stores: 1 web, 2 point of sale, 3 phone, 4 marketplace, 5 offline, 6 store, 7 kiosk.
A development-only endpoint, POST /api/bigcommerce/dev/connect, links a tenant to a seeded store without external calls. It is gated to non-production environments so a real merchant can explore the full sync lifecycle before credentials exist.
Everything asynchronous runs on five dedicated BullMQ queues with a repeatable scheduler. This keeps long-running work off the request path and makes each job independently retryable and observable.
| Queue | Concurrency | Responsibility | Enqueued by | Output |
|---|---|---|---|---|
sync | 1 | Full and incremental store sync per entity, with checkpoints | Scheduler dispatch, manual sync, webhook events | Warehouse rows, sync-run progress |
insights | 2 | Metrics → detectors → insights and recommendations | Nightly schedule, on-demand generate | Insight and recommendation records |
alerts | 2 | Evaluate alert rules against current metrics | Alert sweep schedule, rule changes | Alert and notification records |
reports | 2 | Materialise CSV exports for a report definition | Report generate request, report delivery schedule | storage/reports/<tenant>/<report>.csv |
scheduler | 1 | Fan out pending work and run maintenance | Repeatable jobs registered on boot | Child jobs on the other queues |
Finds pending or stale sync runs and enqueues them with stable job ids, so a burst of triggers collapses into one execution.
Refreshes settings, catalogue, customers, orders and inventory for every connected tenant, then refreshes snapshots.
Runs the rule engine for each active tenant and persists the night's findings and recommendations.
Evaluates every enabled rule, creates alerts on threshold crossings and emits in-app notifications.
Generates the reports defined by active schedules and records the delivery result.
Three attempts with exponential backoff from five seconds; completed jobs retained an hour, failed jobs retained a day for inspection.
Finance-grade CSV exports generated from the warehouse, partitioned per tenant, with definitions that can be scheduled for recurring delivery.
| Report type | Contents | Typical consumer |
|---|---|---|
| Sales summary | Revenue, orders, units and AOV by day, with channel breakdown | Finance, leadership |
| Inventory | SKU, location, on-hand and reserved levels, reorder points, days of cover | Operations, purchasing |
| Customers | Customer, segment, order count, lifetime value, last order date | Marketing, CRM |
| Full dataset | Consolidated commerce extract for warehouse loading and ad-hoc analysis | Data team |
reports job.storage/reports/<tenantId>/<reportId>.csv.Security is enforced at the server boundary. The browser is never trusted for tenant identity, permissions or data access, and every sensitive integration secret is encrypted at rest.
HttpOnly, SameSite=Lax cookie (Secure in production); only a SHA-256 hash is stored, with expiry and last-seen tracking.ENCRYPTION_KEY.signed_payload_jwt before any state change.SameSite=Lax plus an exact-origin CORS allowlist.state parameter yet; add it with the PKCE work in phase 2.PASSWORD_PEPPER and JWT_SECRET are accepted in configuration but not yet consumed by the auth path.One brand, one token set, one module colour contract. Every new page, card, chart and interaction follows the same rules, so the product looks like a single system rather than a collection of screens.
| Module | Accent | Applied to |
|---|---|---|
| Dashboard · Sales | #1E5EFF | Active nav item, page header accent bar, stat card chip, charts |
| Customers | #8B5CF6 | Segment colours, lifetime-value bars |
| Products | #06B6D4 | Catalogue charts, product health |
| Inventory | #16A34A | Coverage bars, stock health |
| Marketing | #EC4899 | Campaign performance, ROAS |
| Insights | #6366F1 | Generate controls, copilot bubbles, AI glow |
| Reports | #2563EB | Export actions, report history |
| Alerts | #F59E0B | Rule chips, threshold and last-run banners |
| Settings | #071A3D | Administration headers, plan card |
@theme defines the palette; the neutral slate ramp is remapped to cool blue-greys so surfaces sit in the same family as the navy shell.brand-gradient, cta-gradient, ai-gradient, hero-wash, ai-glow, accent-strip.Card with accent strip, tinted StatCard, PageHeader with module accent bar, branded Tabs, data tables and notification bell.Card, StatCard, PageHeader and the table pattern; do not invent one-off containers.One command boots a merchant-evaluable stack; one pipeline proves it still works. Local, CI and production share the same configuration contract.
| Service | Image / runtime | Purpose |
|---|---|---|
| Web | Next.js 15 dev server, port 3000 | Marketing site and authenticated application |
| API | NestJS 11, port 3001 | REST surface, auth, business logic |
| Worker | NestJS application context | BullMQ processors and repeatables |
| PostgreSQL | postgres:16-alpine | System of record |
| Redis | redis:7-alpine | Queue broker and job state |
| Adminer | Docker Compose, tools profile | Optional database inspection UI |
npm install # workspace install
npm run setup # install + db:generate + db:deploy + db:seed
npm run dev # turbo dev: web, api, worker
npm run build # dependency-ordered production build
npm run lint # eslint across workspaces
npm run typecheck # tsc --noEmit across workspaces
npm run test:e2e # Playwright, boots dev servers unless E2E_SKIP_SERVERS=1
npm run db:reset # drop, re-migrate and re-seed
Developer experience note: with dev servers already running, skip builds and extra dev instances — shared build directories and Windows file locks (Prisma engine DLLs) are the usual failure causes. The E2E suite supports E2E_SKIP_SERVERS=1 to reuse a live stack.
GitHub Actions runs on every push with two jobs:
Quality is enforced at three layers: static analysis, a real browser suite, and manual operational verification of the background system.
Strict TypeScript across all workspaces and ESLint 9 with the typescript and react-hooks rule sets. Both run in local scripts and in CI.
Authentication (login, session persistence, logout), application (dashboard, module navigation, settings), and BigCommerce connection flows against a live API and database.
Queue processors, checkpoints, insight generation, alert evaluation and report materialisation are exercised against seeded data and inspected in Settings.
| Spec | What it proves |
|---|---|
auth.spec.ts | Demo login succeeds, session survives navigation, protected routes reject anonymous access, logout clears the session. |
app.spec.ts | Dashboard renders seeded metrics, module navigation works across all product areas, settings and team views respond. |
bigcommerce.spec.ts | Install entry point returns a valid BigCommerce URL, connection state is reported, sync can be triggered and observed. |
Every change follows the same loop: typecheck and lint, run the E2E suite against a seeded database, and verify background behaviour after any schema, queue or analytics edit. The demo seed is deterministic enough to make failures reproducible.
A single Zod schema in @mts/shared validates the environment at boot, so a misconfigured deployment fails fast and loudly instead of failing at the first customer request.
| Group | Variables | Purpose |
|---|---|---|
| Runtime | NODE_ENV, PORT, API_PORT, WEB_URL, API_URL, NEXT_PUBLIC_API_URL | Process mode, ports and the web↔API URL contract, including CORS origin |
| Data stores | DATABASE_URL, REDIS_URL | PostgreSQL connection string and Redis broker URL |
| Security | ENCRYPTION_KEY, PASSWORD_PEPPER, JWT_SECRET, SESSION_TTL_DAYS | AES key for integration secrets, hashing and signing material, session lifetime |
| BigCommerce | BIGCOMMERCE_STORE_HASH, BIGCOMMERCE_ACCESS_TOKEN, BIGCOMMERCE_CLIENT_ID, BIGCOMMERCE_CLIENT_SECRET, BIGCOMMERCE_API_URL, BIGCOMMERCE_WEBHOOK_SECRET, BIGCOMMERCE_REDIRECT_URI | API-account and OAuth credentials, endpoints, webhook verification and callback URL |
| AI | AI_PROVIDER, AI_API_KEY, AI_MODEL, AI_PRIVACY_MODE, AI_MAX_REQUESTS_PER_MONTH | Provider selection, credentials, model, privacy policy and budget |
| Billing & email | BILLING_PROVIDER, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROM | Subscription provider and transactional email for alerts and report delivery |
| Product & storage | PRODUCT_NAME, PRODUCT_SHORT_NAME, STORAGE_DIR, LOG_LEVEL | Branding, report output location and log verbosity |
| Demo | MTS_DEMO | Demo-mode affordances in the UI and seed-driven onboarding |
.env.example with purpose and default behaviour..env; the repository contains no credentials.| Plan | Intended for | Controls |
|---|---|---|
starter | Single-operator stores | Seat and store caps, standard history window |
growth | Growing teams | Higher caps, extended history, scheduled reports |
professional | Multi-channel operations | Highest standard caps, advanced alerting and AI budget |
enterprise | Custom deployments | Negotiated limits, dedicated hosting and MageTech services |
Billing provider defaults to in-memory for local development; Stripe checkout and webhook-driven subscription state are phase-2 work.
A deterministic, richly populated tenant is seeded so the entire product can be evaluated — every module, insight, alert and report — without connecting a live store.
admin@magetech.demoMTS-demo-2026!MTS_DEMO=1 · AI provider rule| Entity | Count | Entity | Count |
|---|---|---|---|
| Products | 1,284 | Customers | 12,450 |
| Orders | 8,420 | Order items | 21,160 |
| Revenue | $284,520 | Daily snapshots | 366 |
| Categories / brands | 12 / 8 | Segments | 6 |
| Campaigns | 15 | Insights | 7 |
| Recommendations | 2 | Alert rules / alerts | 5 / 5 |
| Reports / schedules | 3 / 2 | Sync runs | 1 |
| Roles / permissions | 7 / 25 | Audit log entries | 2 |
Log in with the demo owner account, start at the dashboard, then follow the journeys in section 6.1: analyse the business, open Insights to read generated findings, ask the copilot a question, generate a report, and review alert rules. Everything a merchant sees is produced by the same services that run in production.
npm run db:reset # drop, migrate and re-seed
# or re-seed without dropping
npm run seed -w @mts/database
The seed is idempotent by external id, so re-running it converges to the same workspace state instead of creating duplicates.
The repository is the foundation; MageTech Solutions delivers the outcomes around it — implementation, integration, hosting, extension and enablement.
Stand up the stack for a merchant, configure environment and secrets, connect BigCommerce via OAuth or an API account, run the first sync, and train the team on each module and role.
Multi-store and multi-channel configuration, historical backfill, webhook registration, channel-mapping tuning, and reconciliation against the control panel for a trustworthy first report.
Select and govern the AI provider, set privacy mode and monthly budgets, tune thresholds and alert rules to the merchant's seasonality, and extend the copilot with merchant-specific tool calls.
Containerised deployment, database and Redis operations, backup and restore drills, queue monitoring, upgrade management and incident response with agreed response times.
New analytics modules, bespoke reports, forecast models, ERP or 3PL feeds, custom roles, and integrations with the merchant's other systems — delivered in the same architecture and design system.
Merchant-specific branding, domains, colours and copy, plus agency deployments that expose the platform under an agency's own identity with scoped tenants.
Warehouse and metric-layer work: new entity sync, data-quality checks, backfill strategy, and export pipelines feeding the merchant's BI stack.
Pre-internet-exposure hardening — rate limiting, security headers, OAuth state and PKCE, secret rotation, backups and audit exports — plus a documented security review for procurement.
Onboarding workshops, role-based playbooks, alert tuning reviews, quarterly roadmap briefings, and optional ongoing advisory for the merchant's leadership team.
| Model | Shape | Best for |
|---|---|---|
| Launch | Fixed-scope implementation: deploy, connect, configure, train | First deployment for one store or group |
| Managed | Monthly hosting, monitoring, upgrades and support with response commitments | Merchants who want intelligence without operations |
| Build | Custom module or integration development on a fixed timeline | Merchants with bespoke analytics or integration needs |
| Advisory | Roadmap, threshold and AI-governance reviews for an internal team | In-house teams owning the deployment |
The platform can be adopted, extended or operated by us — and priced accordingly. MageTech Solutions is not only a product: we are a BigCommerce development, customisation, integration, AI and managed-services partner. Seven engagement models, every figure a starting point rather than a fixed price.
A specific requirement, bug fix, enhancement or small integration where scope is not yet fixed.
One continuous senior resource on your team — part-time or full-time — for ongoing development and support.
Build or enhance one defined module or integration. The natural way to adopt this platform module by module.
A clearly defined deliverable with agreed scope, acceptance criteria and a fixed price.
Keep an existing application reliable with monitoring, fixes, small enhancements and technical reviews.
A full MageTech engineering team — developer, backend, frontend, QA and lead — as an extension of your organisation.
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.
Every amount is a starting-from figure. Final effort depends on your existing systems, the number of integrations, data volume, customisation and how much work is already reusable. We confirm effort, timeline, team and price in writing before starting, and we do not invoice against an open-ended assumption.
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 |
| Technical consultation | $40–$75 / hour | Architecture review, audits, technology selection, advice |
India-focused engagements: an equivalent starting range of ₹1,500–₹4,500 / hour, depending on skill level and complexity.
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 |
| Senior developer | $3,500 / month | Architecture, complex features, code review, technical ownership |
| Senior AI / integration engineer | $4,000+ / month | Data platforms, AI systems, enterprise integrations |
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 a recruitment cycle, and it scales into a team model when the scope grows.
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 shared foundation — the same data layer, permissions, design system and test harness described in this document.
| 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 modules is normally cheaper than buying them separately, and a full platform implementation is priced as a project — see model 04.
The six intelligence modules correspond to the Sales, Customers, Products, Inventory and Marketing modules plus the shared Dashboard, and the AI and reporting entries correspond to the Insights and Reports modules in Section 9. A module purchase is a first slice of the same platform, not a separate product.
For customers who want a clearly defined deliverable. Scope, acceptance criteria, timeline and price are agreed before work starts.
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 |
| External integrations | ERP, CRM, marketplace and payment connectivity |
| Data history | Backfill depth and initial sync volume |
| Customisation | White-labelling, bespoke metrics, custom report formats |
| Deployment | Managed cloud, customer infrastructure or hybrid |
| AI requirements | Provider choice, privacy mode, volume and budget |
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.
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 |
BigCommerce stores and apps, this intelligence platform, custom web applications, APIs and integrations we built — and inherited applications after a review.
A managed service where we operate and monitor the platform and you use the product; or a support-only arrangement on your own infrastructure.
Unrequested feature development. That is quoted separately as a module, project or hourly item so support cost never hides development cost.
For larger customers who want MageTech Solutions to operate as an extended development team rather than a sequence of projects.
A typical team, scaled to the requirement:
Composition, seniority and hours are agreed per engagement. A single dedicated resource is available at a lower entry point — see model 02.
| 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 18 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 |
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.
We do not price only by hours, because that positions us as a staffing supplier rather than an engineering partner. The right model follows the shape of the requirement.
A fix, an enhancement, a question, something undefined. Model 01 from $25/hour.
A defined module, integration or report with a known outcome. Models 03 and 04 from $1,000 and $5,000.
A full implementation with scope, milestones and acceptance criteria. Model 04 from $5,000, typically $10,000–$30,000+.
An ongoing roadmap needing steady capacity. Model 02 from $1,500/month or model 06 from $6,000/month.
Something already works and must keep working. Model 05 from $299/month.
Multi-store, ERP and CRM, migration, AI programmes, long-term product engineering. Model 07, scoped individually.
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.
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.
What is live today, what is next, and what is deliberately not built yet — stated plainly so expectations match the codebase.
marketing_v3 sync is not yet implemented.Command reference, repository map pointers and document metadata.
# first run
npm install
cp .env.example .env # set DATABASE_URL and REDIS_URL
npm run setup # generate, migrate, seed
# daily development
npm run dev # web + api + worker
npm run typecheck
npm run lint
npm run test:e2e # add E2E_SKIP_SERVERS=1 to reuse a running stack
# database work
npm run db:generate
npm run db:deploy
npm run db:seed
npm run db:reset
# operations
docker compose up -d postgres redis
docker compose --profile tools up -d adminer
| Service | Development URL |
|---|---|
| Web application | http://localhost:3000 |
| REST API | http://localhost:3001/api |
| PostgreSQL | localhost:5432 |
| Redis | localhost:6379 |
| Topic | Location |
|---|---|
| Data model | packages/database/prisma/schema.prisma |
| Environment contract | packages/shared/src/env.ts |
| Metrics and analytics | packages/analytics |
| Rule engine and copilot | packages/ai |
| BigCommerce client | packages/bigcommerce |
| API controllers | apps/api/src/modules |
| Background processors | apps/worker/src/processors |
| Brand tokens | apps/web/src/lib/brand.ts, apps/web/src/app/globals.css |
| Design primitives | apps/web/src/components/ui.tsx |
| Demo seed | packages/database/src/seed/demo.ts |
| Architecture notes | docs/ARCHITECTURE.md, docs/API.md, docs/DEVELOPMENT.md |
mts-bigcommerce-intelligence; figures reflect the implemented system, not aspirations.