MTS BigCommerce AI Commerce Intelligence Delivery roadmap
Technical & product documentation · v1.0

MTS BigCommerce AI Commerce Intelligence

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

Section 1

Executive summary

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.

◧

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.

◈

How it works

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.

✦

Why it is different

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.

Applications
3 (web, API, worker)
Shared packages
6 (shared, database, ai, bigcommerce, analytics, config)
REST surface
64 endpoints / 18 controllers
Data layer
32 Prisma models / 30 enums
Jobs
5 BullMQ queues / 5 schedules
Governance
7 roles / 25 permissions / tenant-scoped audit log
Integration
BigCommerce OAuth 2.0 + API-account token + webhooks
Quality gates
ESLint 9, strict TypeScript, 10 Playwright E2E tests, GitHub Actions CI
Section 2

Purpose and the problem it solves

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.

Problems in the target environment

  • Fragmented visibility. Sales live in the control panel, inventory in a separate grid, marketing ROI in ad tools; nobody holds the joined picture.
  • Reactive operations. Stockouts and churn are discovered after the revenue is already lost.
  • Manual reporting. Finance and operations rebuild the same exports every week, with no single source of truth and no audit trail.
  • Opaque "AI". Generic AI tools cannot see store data, hallucinate numbers, and leak merchant context to third parties.
  • No governance. Who changed a price, who exported customer data, who switched a plan — frequently unanswerable.

What the platform delivers instead

  • One warehouse, one truth. Orders, customers, products, variants, inventory snapshots, campaigns and analytics in a normalised multi-tenant model.
  • Explainable intelligence. A deterministic rule engine produces insights and recommendations with evidence, severity and priority — every statement traceable to a metric.
  • Action, not dashboards alone. Threshold alerts with in-app notifications, prioritised restock queues, win-back lists and CSV exports for finance.
  • Privacy-first AI. AI_PROVIDER=rule runs fully offline; external LLMs are optional, and any provider failure transparently falls back to the local engine.
  • Enterprise governance. Seven roles, 25 permissions, tenant isolation on every query, bcrypt password hashing, hashed session tokens, encrypted integration secrets and a full audit log.

Design principle: deterministic first, generative second

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.

Section 3

Who uses it and what they get

One platform, five operating personas, each with a scoped view of the same tenant data.

Store owner

P&L clarity

Revenue, order volume, AOV, channel mix and growth at a glance; at-risk customer value; plan, usage and team overview.

Sales manager

Pipeline & revenue quality

Trend analysis by metric, channel contribution, order pipeline detail, customer segmentation and report exports.

Operations manager

Stock and fulfilment control

Days-remaining coverage, low-stock and out-of-stock queues, stock-level history, product health and alert rule management.

Marketing manager

ROI accountability

Campaign spend, attributed revenue, ROAS, CTR and conversion rate, blended with store-wide sales performance.

Analyst

Investigation & AI leverage

Full read access across modules, generated insights and recommendations, copilot Q&A, and ad-hoc report creation and export.

Platform owner (MageTech)

Delivery & operations

Implementation, integration, hosting, custom modules, white-labelling, security hardening and roadmap delivery for merchant tenants.

Section 4

How it differs from the alternatives

Positioning against the tools a merchant already considers: native BigCommerce reporting, general BI, spreadsheet stacks, plug-in AI assistants and custom agency builds.

CapabilityBigCommerce native reportsGeneral BI (warehouse)Spreadsheet reportingGeneric AI chat toolsThis platform
Time to first insightMinutes, but surface-levelWeeks (pipeline build)Hours per reportImmediate but uninformedImmediate on a seeded or synced store
Cross-domain view (sales + stock + customers + marketing)Partial, siloedYesManual joinsNoYes, one warehouse, on-read metrics
Explainable AI insightsNoNo (dashboards only)NoOpaque, prompt-dependentRule-based detectors with evidence + severity
Works with no data leaving the merchant's infran/aDependsYesNoYes — AI_PROVIDER=rule, strict privacy mode
Automated alerts & scheduled reportsBasicExtra toolingManualNoYes — BullMQ schedules, CSV exports, in-app notifications
Role-based access & audit trailLimitedExtra toolingFile permissionsNoYes — 7 roles, 25 permissions, audit log with actor and IP
Time to deploy / cost to ownIncluded but limitedHighLow tech, high labourSubscription, no contextMonorepo deployable with Docker; demo mode runs in minutes
Vendor accountabilityPlatform vendorTool vendorInternalModel vendorMageTech Solutions — implementation, hosting, roadmap
The product is deliberately not "another dashboard". It is the layer between a commerce platform and the decisions a merchant has to make every day — with the auditability of a finance system and the ergonomics of an AI assistant.
MTS BigCommerce AI Commerce Intelligence · product principle
Section 5

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 marketing and the authenticated app
Tailwind CSS 4 design systemBrand tokens, module accent colours, hand-rolled SVG charts
Client data layerTyped fetch hooks, SWR-style caching, cookie sessions, optimistic actions
Application
NestJS 11 API18 controllers, global /api prefix, guards, decorators, CORS, raw body for webhooks
NestJS 11 WorkerBullMQ processors + repeatable schedulers, no HTTP listener
Shared packagesZod env schema, AES-256-GCM crypto, period/metric helpers, constants
Data & integrations
PostgreSQL 16 + Prisma 632 models, 30 enums, one committed migration, tenant-scoped client extensions
Redis 7 + BullMQ 55 queues, retries with exponential backoff, repeatable job schedulers
BigCommerce + AI providersOAuth 2.0, V2/V3 REST, signed JWT payloads, HMAC webhooks; OpenAI / Anthropic / Google optional
BrowserNext.js (3000)Nest API (3001)PostgreSQL / Redis
LayerTechnologyVersionRole in the platform
LanguageTypeScript^5.7.3Strict mode everywhere; shared types across API, worker, packages and web
RuntimeNode.js>=20 (CI on 20)API and worker runtimes; npm 11.6.2 workspaces
Monoreponpm workspaces + Turborepo^2.4.4Dependency-ordered build/lint/typecheck, persistent dev tasks
WebNext.js / React / Tailwind^15.1.3 / ^19.0.0 / ^4.0.0Marketing site, authenticated app, SVG chart library, design system
APINestJS (common, core, platform-express)^11.0.1REST controllers, session + permission guards, metrics service
Worker@nestjs/bullmq / bullmq / ioredis^11.0.3 / ^5.58.0 / ^5.6.1Sync, insights, alerts, reports, scheduler processors
DataPrisma ORM / PostgreSQL^6.2.1 / 16Schema, migrations, typed client, tenant extensions, seeding
Cache & queuesRedis7-alpineBullMQ broker, job dedup IDs, repeatables
ValidationZod^3.24.1Environment schema, BigCommerce payload schemas
Auth cryptobcryptjs + node:crypto + jose^3.0.2 / built-in / ^5.9.6Password hashing, SHA-256 session tokens, AES-256-GCM secrets, HS256 JWT verification
AIRule engine + provider adaptersin-house / optionalDeterministic insights; OpenAI, Anthropic, Gemini adapters with fallback
QualityESLint, typescript-eslint, react-hooks, Playwright^9.39.5 / ^8.70.1 / ^5.2.0 / ^1.63.0Lint gate, type gate, 10 browser E2E tests in CI
Section 6

System architecture

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.

Presentation
apps/webMarketing routes (public) and app routes (session-protected). Server components fetch through a typed client; client components own interaction and charts.
Design systemTailwind v4 tokens, brand.ts module colour map, shell components with per-module accents.
Domain services
apps/apiNestJS. 18 controllers grouped by module: auth, analytics, sales, customers, products, inventory, marketing, insights, reports, alerts, settings, bigcommerce, ai, health, audit, notifications, plans, webhooks.
apps/workerFive processors consuming the same queues the API enqueues: sync, insights, alerts, reports, scheduler.
packages/analyticsShared metric computation (revenue, orders, AOV, growth, channel mix, stock cover) used by API, insights and report generation.
Platform packages
packages/databasePrisma schema, singleton client, tenant extension, seed data for the demo workspace.
packages/aiRule engine (detectors, recommendation builder, copilot tool mapping) plus provider adapters and usage metering.
packages/sharedZod environment schema, crypto helpers, period/format utilities, plan catalogue, product constants.
apps/webapps/apipackages/databasePostgreSQL 16

Request path

  1. BrowserSends a credentialed request; the session travels in the mts_session cookie (HttpOnly, SameSite=Lax, Secure in production).
  2. Next.js proxyThe app's typed client routes /api/* to the Nest API; server components fetch without a base URL, client components resolve it from the environment.
  3. GuardsSessionGuard resolves the hashed token to a live session and attaches tenant, user and role; PermissionsGuard enforces @RequirePermission keys.
  4. Controller + serviceControllers stay thin: validate, delegate to the module service, shape the response. Business rules live in services and shared packages.
  5. Tenant-scoped PrismaQueries run through the extended client; tenant models are filtered by tenantId at the client layer, and sensitive reads are additionally guarded in service code.

Background path

  1. SchedulerFive repeatable jobs are registered on boot: dispatch sync, nightly full sync, daily insights, alert sweep, report delivery.
  2. QueueJobs land on dedicated BullMQ queues with a stable job ID per entity, so repeated enqueues collapse instead of duplicating work.
  3. ProcessorThe worker executes sync (paged BigCommerce fetch → upsert → checkpoint), insights (metrics → detectors → persistence), alerts (rules → notifications), reports (CSV materialisation) and scheduler (fan-out).
  4. Result surfaceOutputs land in the database: insights and recommendations, notification rows, storage/reports/<tenant>/<report>.csv files and sync-run records.

Why one Prisma client factory

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.

Section 6.1

End-to-end user journeys

The three paths a merchant actually walks, from installation to an AI-assisted decision.

Journey A

Install and first sync

  1. Create the workspaceSign up produces a tenant, an owner account and a 30-day trial subscription.
  2. AuthenticateSign in with the session cookie, or start the BigCommerce OAuth flow from Settings.
  3. Connect the storeOAuth callback, or paste a store hash and access token for a staff API account.
  4. Queue the workA sync run is created and enqueued; the dispatch scheduler picks up pending runs.
  5. Watch progressSettings shows entity-level status, item counts, checkpoints and errors.
Journey B

Analyse the business

  1. Open the dashboardRevenue, orders, AOV, customers and alerts at a glance, scoped to the selected period.
  2. Drill into a moduleSales trends, customer segments, product performance, inventory coverage, campaign ROI.
  3. Read the insight feedGenerated findings with severity, evidence, impact and recommended action.
  4. Ask the copilotNatural-language questions route to tool calls over the same metrics.
  5. ExportGenerate a report, then download the CSV for finance and planning.
Journey C

Act on an alert

  1. Get notifiedAn in-app notification arrives when a rule's threshold is crossed.
  2. Assess impactOpen the alert to see the rule, the breached metric and the evidence.
  3. Apply a recommendationFollow the suggested action: reorder, win-back, promotion review or stock review.
  4. Close the loopMark it read/resolved; the audit log records who did what and when.
Section 7

Repository structure

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

Conventions that keep the tree predictable

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.

Section 8

Data model

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.

Identity

Tenant, User, Role, Permission, Session, AuditLog, Subscription, Plan.

Commerce

Order, OrderItem, Customer, Product, ProductVariant, Category, Brand, InventoryLevel, InventorySnapshot.

Analytics

SalesSnapshot (pre-aggregated daily), CustomerSegment, Campaign, Insight, Recommendation, CopilotMessage, AiUsage.

Operations

AlertRule, Alert, Notification, Report, ReportSchedule, SyncRun, BigCommerceConnection, WebhookEvent.

AreaKey modelsDesign notes
TenancyTenant → all scoped models30 of the 32 models are tenant-scoped; the client extension injects tenantId automatically, and services may still assert it for defence in depth.
Identity & accessUser, Role, Permission, SessionUsers 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.
OrdersOrder, OrderItemOrders 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.
CustomersCustomer, CustomerSegmentCustomer aggregates (order count, lifetime value, last order) are denormalised for fast segmentation; segments are rules stored as JSON with member counts.
CatalogueProduct, ProductVariant, Category, BrandProducts 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).
InventoryInventoryLevel, InventorySnapshotCurrent level plus location and reorder data; snapshots give the coverage trend used for days-remaining and stockout risk.
AnalyticsSalesSnapshotOne 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.
MarketingCampaignSpend, clicks, impressions, attributed revenue and derived ROAS/CTR/CVR, with channel and status enums.
IntelligenceInsight, Recommendation, CopilotMessage, AiUsageInsights 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.
AutomationAlertRule, Alert, Notification, Report, ReportScheduleRules 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.
IntegrationBigCommerceConnection, SyncRun, WebhookEventConnection 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.

Representative enums

Core

RoleKey OWNER, ADMIN, ANALYST, SALES_MANAGER, OPERATIONS_MANAGER, MARKETING_MANAGER, VIEWER · PlanKey STARTER, GROWTH, PROFESSIONAL, ENTERPRISE

Commerce

OrderStatus, ChannelType (web, pos, phone, marketplace, offline, store, kiosk), ProductStatus, PaymentStatus, FulfillmentStatus

Intelligence

InsightType, InsightSeverity, RecommendationType, RecommendationPriority, AlertType, CopilotIntent, AiProvider

Operations

SyncStatus, SyncEntity (categories, brands, products, customers, orders, inventory, settings), AlertOperator, NotificationType, ReportType

Migration discipline

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.

Section 9

Modules and capabilities

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.

▦
Dashboard

Command centre

Revenue, orders, AOV, customer count, low-stock and open-alert counters; revenue and order trends; channel mix; top products; the latest insights; recent activity.

◔
Sales

Revenue quality

Order pipeline by status, revenue trend with period comparison, channel contribution, AOV movement, and order-level detail with customer and channel context.

◎
Customers

Segments and retention

VIP, high-value, at-risk and inactive segments; lifetime value distribution; segment explorer; win-back targeting with counts and value at stake.

◫
Products

Catalogue health

Product 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 & copilot

Generated insights with evidence and severity, prioritised recommendations, a full insight history, and the AI copilot for natural-language questions.

▤
Reports

Exports and schedules

Sales, inventory, customer and full-dataset report generation with date ranges, CSV download, scheduled deliveries, and a generation history with status.

◉
Alerts

Threshold monitoring

Rule management for revenue drops, order anomalies, AOV shifts, low stock and churn; triggered alerts with metric, value and threshold; in-app notification feed.

⚙
Settings

Platform administration

BigCommerce connection and sync history, team members and roles, subscription and plan, AI provider configuration, notification preferences and audit log.

Capability map

Four report types, parameterised date ranges, CSV files partitioned per tenant.

CapabilityModulesNotes
Period-aware analytics (7 / 30 / 90 days, custom)Dashboard, Sales, Products, MarketingPeriod resolution is centralised in @mts/shared, so every chart and stat card compares the same window consistently.
Insight generation and recommendation prioritisationInsights, Dashboard, AlertsDetectors produce findings; recommendations are ranked by priority and impact.
Natural-language Q&AInsights (copilot)Intent mapped to typed tool calls over the same metrics — answers are grounded, not invented.
Threshold rules and notificationsAlerts, Settings, shell bellUnread counts in the header; last-run banner; read and bulk-read actions.
Data exportReports
Store lifecycleSettingsInstall link, credential entry, manual sync, sync history with checkpoints, disconnect.
Access controlAll modulesPermissions are checked server-side per endpoint; the UI only adapts presentation.
Section 10

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.

RoleTypical holderCapabilitiesSees
OwnerFounding merchant principalEverything, including team, plan and integration administrationAll modules and settings
AdminOperations / IT leadAll analytics, alerts, reports; manages team and alert rulesAll modules except ownership-level plan changes
AnalystData analystFull read across modules; creates insights and reportsAll analytics modules
Sales managerSales leadSales, customers, products read; report generation; alert managementSales, Customers, Products, Reports, Alerts
Operations managerFulfilment / supply leadInventory and products focus; alert rules; report generationDashboard, Products, Inventory, Alerts, Reports
Marketing managerGrowth / acquisition leadMarketing and sales focus; report generation; alert viewingDashboard, Sales, Marketing, Reports, Alerts
ViewerFinance, agency, stakeholderRead-only dashboards and report downloadsDashboard, Sales, Customers, Products, Inventory, Marketing, Reports

How enforcement works

  • @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.
  • 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.

Permission key families

Analytics

analytics:read, sales:read, customers:read, products:read, inventory:read, marketing:read

Intelligence

insights:read, insights:generate, ai:copilot

Execution

reports:read, reports:generate, alerts:read, alerts:manage

Administration

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.

Section 11

API reference

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.

Base URL (dev)
http://localhost:3001/api
Auth
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 map

ControllerBase pathResponsibilitiesSample endpoints
AuthauthRegistration, login, session inspection, logoutPOST /auth/register · POST /auth/login · GET /auth/me · POST /auth/logout
HealthhealthService liveness and dependency checksGET /health
AnalyticsanalyticsDashboard summary, trends, channel mix, top productsGET /analytics/dashboard · GET /analytics/trends
SalessalesOrder pipeline, revenue trend, channel performanceGET /sales/orders · GET /sales/revenue
CustomerscustomersSegments, value distribution, segment membersGET /customers/segments · GET /customers/:id
ProductsproductsCatalogue performance, health, product detailGET /products · GET /products/:id
InventoryinventoryLevels, low stock, coverage, snapshotsGET /inventory/levels · GET /inventory/low-stock
MarketingmarketingCampaign performance and channel efficiencyGET /marketing/campaigns
InsightsinsightsList, generate, summary; recommendationsGET /insights · POST /insights/generate · GET /insights/recommendations
AI / CopilotaiCopilot turns and provider configurationPOST /ai/copilot · GET /ai/config
ReportsreportsList, generate, download, schedulesPOST /reports/generate · GET /reports/:id/download
AlertsalertsRules, triggered alerts, acknowledge/resolveGET /alerts/rules · POST /alerts/rules · GET /alerts
NotificationsnotificationsIn-app feed, unread count, mark readGET /notifications · POST /notifications/:id/read · POST /notifications/read-all
SettingssettingsTenant profile, team, roles, notification preferences, audit logGET /settings · GET /settings/team · GET /settings/audit
BigCommercebigcommerceInstall entry, OAuth callback, connect, sync trigger, status, disconnect, webhookGET /bigcommerce/install · GET /bigcommerce/callback · POST /bigcommerce/connect · POST /bigcommerce/sync · POST /bigcommerce/webhooks
PlansplansPlan catalogue and current subscriptionGET /plans · GET /plans/subscription
AuditauditTenant audit trail with actor, action, entity and IPGET /audit
Users (admin)usersTeam member invitations and role changesGET /users · PATCH /users/:id

Conventions

  • Collection routes are plural nouns; list endpoints accept period (7/30/90 or a custom range) and pagination parameters.
  • Mutations return the created or updated resource, or a compact acknowledgement for actions.
  • List responses wrap records with pagination metadata where the dataset can grow unbounded.
  • Errors use standard status codes: 400 validation, 401 unauthenticated, 403 forbidden, 404 missing, 409 conflict, 429 rate-limited (documented future control), 501 not yet implemented.

Example: session lifecycle

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.

Section 12

The AI engine

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.

Rule engine pipeline

  1. Gather metrics@mts/analytics computes revenue, orders, AOV, growth, channel mix, stock cover and customer aggregates for the requested window.
  2. Run detectorsRevenue, product, inventory, customer, segment, order and marketing detectors evaluate configured thresholds and return findings with type, severity, title, message and evidence.
  3. Build recommendationsFindings are translated into concrete actions (reorder, win-back, promotion review, stock review), deduplicated by category plus action and ranked high, medium or low.
  4. PersistInsights and recommendations are written with status and impact, feeding the dashboard, the insight feed and the alert engine.

Default thresholds

SignalDefaultMeaning
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 customers30 daysRecency threshold for churn risk
Critical low stock7 days coverStockout imminent
Warning low stock14 days coverReorder planning window
Overstock90 days coverCapital tied up in slow-moving stock

Copilot

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:

  • revenue and order questions for a period, with comparison to the previous window;
  • top products and best-performing channels;
  • inventory risk and low-stock questions;
  • customer segment and lifetime-value questions;
  • marketing campaign and ROAS questions;
  • "what should we do" — answered with the current recommendations, not a new invention.

Provider configuration

Providers
rule (default, fully local) · openai · anthropic · google
Privacy mode
strict (never send context) · balanced (redacted summaries) · connected (full context permitted)
Budget
AI_MAX_REQUESTS_PER_MONTH=500 with per-tenant usage recorded in AiUsage
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 evidence JSON a user can read.
  • Auditable. Provider, tokens and request counts are logged per tenant and user.
  • Cost-aware. Monthly request budget and per-tenant metering make AI spend attributable.

Known gap (transparent about)

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 tracked in the roadmap and is a deliberate correctness-first choice.

Section 13

BigCommerce integration

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.

Authentication

  • OAuth 2.0 app install. Settings links to 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.
  • API account token. For stores without an app registration, the merchant pastes a store hash and access token; the connection is verified on save and a sync is queued.
  • Credential storage. Access tokens and client secrets are encrypted with AES-256-GCM before persistence; only ciphertext and a key version are stored.
  • Uninstall handling. BigCommerce control-panel uninstall and user-removal events are processed to disable the connection and stop future syncs.

Sync engine

  • Seven sync entities: categories, brands, products, customers, orders, inventory, settings.
  • Paged fetch (page/limit 250) through the shared client, so no request is issued without budget.
  • Per-entity checkpoints on the sync run, so an interrupted sync resumes rather than restarts.
  • Idempotent upserts keyed on external ids — a repeated run converges instead of duplicating.
  • Run status, item counts, errors and duration are visible in Settings.

Client behaviour

Scopes
store_v3, catalog_v3, customers_v3, orders_v3, marketing_v3
Rate limit
Token bucket at 90 requests/minute (floor 20), concurrency 6
Retries
Up to 5 attempts, exponential backoff with jitter, honours Retry-After
Timeout
30 seconds per request
Auth proof
HS256 signed_payload_jwt for control-panel callbacks; HMAC-SHA256 for webhooks

Webhooks

Order, 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.

Channel mapping

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.

Demo-mode shortcut

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.

Section 14

Queues and scheduled work

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.

QueueConcurrencyResponsibilityEnqueued byOutput
sync1Full and incremental store sync per entity, with checkpointsScheduler dispatch, manual sync, webhook eventsWarehouse rows, sync-run progress
insights2Metrics → detectors → insights and recommendationsNightly schedule, on-demand generateInsight and recommendation records
alerts2Evaluate alert rules against current metricsAlert sweep schedule, rule changesAlert and notification records
reports2Materialise CSV exports for a report definitionReport generate request, report delivery schedulestorage/reports/<tenant>/<report>.csv
scheduler1Fan out pending work and run maintenanceRepeatable jobs registered on bootChild jobs on the other queues

Repeatable schedules

Every 15 seconds

Sync dispatch

Finds pending or stale sync runs and enqueues them with stable job ids, so a burst of triggers collapses into one execution.

02:15 daily

Nightly full sync

Refreshes settings, catalogue, customers, orders and inventory for every connected tenant, then refreshes snapshots.

03:30 daily

Daily insights

Runs the rule engine for each active tenant and persists the night's findings and recommendations.

Every 2 hours

Alert sweep

Evaluates every enabled rule, creates alerts on threshold crossings and emits in-app notifications.

07:00 daily

Report delivery

Generates the reports defined by active schedules and records the delivery result.

Policy

Retry and retention

Three attempts with exponential backoff from five seconds; completed jobs retained an hour, failed jobs retained a day for inspection.

Section 15

Reports and exports

Finance-grade CSV exports generated from the warehouse, partitioned per tenant, with definitions that can be scheduled for recurring delivery.

Report typeContentsTypical consumer
Sales summaryRevenue, orders, units and AOV by day, with channel breakdownFinance, leadership
InventorySKU, location, on-hand and reserved levels, reorder points, days of coverOperations, purchasing
CustomersCustomer, segment, order count, lifetime value, last order dateMarketing, CRM
Full datasetConsolidated commerce extract for warehouse loading and ad-hoc analysisData team

How generation works

  • A report definition is created with type and date range; the request enqueues a reports job.
  • The worker queries the warehouse through the shared analytics package and writes a CSV to storage/reports/<tenantId>/<reportId>.csv.
  • The report record tracks status, parameters, file path and generation time, and is downloadable from the Reports module.
  • Schedules repeat a definition daily; the 07:00 delivery job materialises them automatically.

Design notes

  • Tenant partitioning at the filesystem level matches the database boundary — one tenant's export is never addressable from another's path.
  • Historical correctness: item prices are snapshotted at order time, so a past sales export still reconciles after a catalogue price change.
  • Exports are read-only by design; nothing in a report mutates the warehouse.
  • Current limitation: the API generate endpoint records the request, while CSV materialisation is performed by the worker — the job is the source of the file.
Section 16

Security model

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.

Controls in place

  • Password hashing. bcryptjs with a per-tenant-independent work factor; plaintext passwords are never stored or logged.
  • Opaque session tokens. Random token in an HttpOnly, SameSite=Lax cookie (Secure in production); only a SHA-256 hash is stored, with expiry and last-seen tracking.
  • Secret encryption. BigCommerce access tokens and client secrets encrypted with AES-256-GCM; key supplied via ENCRYPTION_KEY.
  • Tenant isolation. Tenant context is derived from the session, injected by the Prisma client extension on all scoped models, and asserted in sensitive service paths.
  • Permission enforcement. Server-side guard on every mutating and sensitive read endpoint; 51 endpoints carry explicit permission requirements.
  • Signed webhooks. Raw-body verification with custom secret header or HMAC-SHA256, plus event-hash idempotency to prevent replay-driven duplication.
  • Audit trail. Tenant-scoped log of actor, action, entity, metadata and IP for configuration and administrative changes.
  • Callback JWT proof. BigCommerce control-panel callbacks verified with an HS256 signed_payload_jwt before any state change.
  • Dependency hygiene. A single committed migration, one lockfile, CI on every push, and a strict TypeScript build gate.

Deliberate limits, stated honestly

Not yet implemented

  • No inbound rate limiting on authentication or API routes — add a guard before public internet exposure.
  • No CSRF token; today safety comes from SameSite=Lax plus an exact-origin CORS allowlist.
  • No OAuth state parameter yet; add it with the PKCE work in phase 2.
  • No password reset, email verification or MFA flows.
  • PASSWORD_PEPPER and JWT_SECRET are accepted in configuration but not yet consumed by the auth path.
  • No Helmet-style security headers on the API, and no global validation pipe; validation is per-boundary.
  • Session cookie domain variable is accepted but not applied; sessions are host-only.

Hardening path

  1. Edge controlsRate limiting, security headers, request size limits at the reverse proxy.
  2. Session defenceOAuth state + PKCE, rotation on privilege change, idle timeout, optional MFA.
  3. Secret hygieneWire the pepper into password hashing, rotate the encryption key with versioned re-encryption.
  4. OperationsDatabase backups, Redis persistence, log shipping, dependency scanning in CI.
Section 17

Design system

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.

Brand palette

Commerce Navy#071A3D
Commerce Blue#1E5EFF
MTS Orange#F97316
AI Indigo#6366F1
AI Cyan#22D3EE
AI Purple#8B5CF6
Page#F6F8FC
Surface#FFFFFF
Ink#172033
Line#E2E8F0

Module colour contract

ModuleAccentApplied to
Dashboard · Sales#1E5EFFActive nav item, page header accent bar, stat card chip, charts
Customers#8B5CF6Segment colours, lifetime-value bars
Products#06B6D4Catalogue charts, product health
Inventory#16A34ACoverage bars, stock health
Marketing#EC4899Campaign performance, ROAS
Insights#6366F1Generate controls, copilot bubbles, AI glow
Reports#2563EBExport actions, report history
Alerts#F59E0BRule chips, threshold and last-run banners
Settings#071A3DAdministration headers, plan card

Tokens and primitives

  • Tailwind v4 @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.
  • Status ramps: emerald, rose, amber, orange, indigo, violet, sky — one set for success, error, warning, accent and AI states.
  • Utility gradients: brand-gradient, cta-gradient, ai-gradient, hero-wash, ai-glow, accent-strip.
  • Shell: navy sidebar and header, white logo chip, per-module active nav colour with shadow, indigo AI copilot CTA with cyan glow, orange unread badge.
  • Primitives: Card with accent strip, tinted StatCard, PageHeader with module accent bar, branded Tabs, data tables and notification bell.
  • Charts are hand-rolled SVG: brand series colours, light gridlines, responsive view boxes, no charting dependency.

Contribution rules — the same every time

  1. Register the module colourAdd the module to the brand colour map; the nav, header bar and stat chip pick it up automatically.
  2. Reuse primitivesCompose pages from Card, StatCard, PageHeader and the table pattern; do not invent one-off containers.
  3. One accent, one CTAModule colour for identity; orange gradient reserved for primary conversion actions.
  4. AI means indigo/cyanCopilot, generated content and AI states use the AI gradient, never the commerce orange.
  5. Motion with restraintReveal transitions and chart animations use the shared timing and easing; respect reduced-motion.
  6. Verify, don't eyeballCheck type, lint, route responses and computed styles before shipping a visual change.
Section 18

DevOps and delivery

One command boots a merchant-evaluable stack; one pipeline proves it still works. Local, CI and production share the same configuration contract.

Local stack

ServiceImage / runtimePurpose
WebNext.js 15 dev server, port 3000Marketing site and authenticated application
APINestJS 11, port 3001REST surface, auth, business logic
WorkerNestJS application contextBullMQ processors and repeatables
PostgreSQLpostgres:16-alpineSystem of record
Redisredis:7-alpineQueue broker and job state
AdminerDocker Compose, tools profileOptional database inspection UI

Root scripts

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.

Continuous integration

GitHub Actions runs on every push with two jobs:

  1. verifyInstall, generate Prisma, then build, lint and typecheck every workspace.
  2. e2ePostgreSQL 16 and Redis 7 services, database deploy and seed, Chromium install, full Playwright run.

Deployment model

  • Web is stateless and server-render capable — suitable for container or serverless deployment.
  • API and worker are stateless Node services; the worker scales horizontally because BullMQ coordinates work through Redis.
  • Database changes ship as reviewed SQL migrations applied before application rollout.
  • Report storage is a mounted volume; swap to object storage for multi-node deployments.
  • Environment configuration is entirely environment-driven — 43 documented variables, no secrets in the repository.
Section 19

Testing and quality

Quality is enforced at three layers: static analysis, a real browser suite, and manual operational verification of the background system.

Static

Types and lint

Strict TypeScript across all workspaces and ESLint 9 with the typescript and react-hooks rule sets. Both run in local scripts and in CI.

E2E

Playwright, 10 specs

Authentication (login, session persistence, logout), application (dashboard, module navigation, settings), and BigCommerce connection flows against a live API and database.

Operational

Worker verification

Queue processors, checkpoints, insight generation, alert evaluation and report materialisation are exercised against seeded data and inspected in Settings.

E2E coverage map

SpecWhat it proves
auth.spec.tsDemo login succeeds, session survives navigation, protected routes reject anonymous access, logout clears the session.
app.spec.tsDashboard renders seeded metrics, module navigation works across all product areas, settings and team views respond.
bigcommerce.spec.tsInstall entry point returns a valid BigCommerce URL, connection state is reported, sync can be triggered and observed.

Regression discipline

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.

Section 20

Configuration reference

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.

GroupVariablesPurpose
RuntimeNODE_ENV, PORT, API_PORT, WEB_URL, API_URL, NEXT_PUBLIC_API_URLProcess mode, ports and the web↔API URL contract, including CORS origin
Data storesDATABASE_URL, REDIS_URLPostgreSQL connection string and Redis broker URL
SecurityENCRYPTION_KEY, PASSWORD_PEPPER, JWT_SECRET, SESSION_TTL_DAYSAES key for integration secrets, hashing and signing material, session lifetime
BigCommerceBIGCOMMERCE_STORE_HASH, BIGCOMMERCE_ACCESS_TOKEN, BIGCOMMERCE_CLIENT_ID, BIGCOMMERCE_CLIENT_SECRET, BIGCOMMERCE_API_URL, BIGCOMMERCE_WEBHOOK_SECRET, BIGCOMMERCE_REDIRECT_URIAPI-account and OAuth credentials, endpoints, webhook verification and callback URL
AIAI_PROVIDER, AI_API_KEY, AI_MODEL, AI_PRIVACY_MODE, AI_MAX_REQUESTS_PER_MONTHProvider selection, credentials, model, privacy policy and budget
Billing & emailBILLING_PROVIDER, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROMSubscription provider and transactional email for alerts and report delivery
Product & storagePRODUCT_NAME, PRODUCT_SHORT_NAME, STORAGE_DIR, LOG_LEVELBranding, report output location and log verbosity
DemoMTS_DEMODemo-mode affordances in the UI and seed-driven onboarding

Configuration principles

  • Every variable is documented in .env.example with purpose and default behaviour.
  • Secrets live only in a gitignored .env; the repository contains no credentials.
  • Missing or malformed values fail validation at process start.
  • Provider toggles are explicit: the system runs end to end with only database and Redis configured.

Plan catalogue

PlanIntended forControls
starterSingle-operator storesSeat and store caps, standard history window
growthGrowing teamsHigher caps, extended history, scheduled reports
professionalMulti-channel operationsHighest standard caps, advanced alerting and AI budget
enterpriseCustom deploymentsNegotiated 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.

Section 21

Demo workspace

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.

Access

Workspace
NovaCart Commerce (demo tenant)
Email
admin@magetech.demo
Password
MTS-demo-2026!
Mode
MTS_DEMO=1 · AI provider rule

Seeded volumes

EntityCountEntityCount
Products1,284Customers12,450
Orders8,420Order items21,160
Revenue$284,520Daily snapshots366
Categories / brands12 / 8Segments6
Campaigns15Insights7
Recommendations2Alert rules / alerts5 / 5
Reports / schedules3 / 2Sync runs1
Roles / permissions7 / 25Audit log entries2

What the seed makes visible

  • A full revenue and order history with seasonality, so trends and period comparisons are meaningful.
  • Realistic customer distribution across VIP, high-value, at-risk and inactive segments.
  • Low-stock and overstock situations that trigger coverage maths and recommendations.
  • Campaigns with varied efficiency, producing genuine ROAS comparisons.
  • Pre-generated insights, recommendations and alerts so the Intelligence and Alerts modules are populated on first login.
  • A completed sync run record, so the integration lifecycle can be demonstrated end to end.

Evaluation path

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.

Resetting the demo

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.

Section 22

What MageTech Solutions can do with this product

The repository is the foundation; MageTech Solutions delivers the outcomes around it — implementation, integration, hosting, extension and enablement.

◧

Implementation & onboarding

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.

⇄

Store & data integration

Multi-store and multi-channel configuration, historical backfill, webhook registration, channel-mapping tuning, and reconciliation against the control panel for a trustworthy first report.

✦

AI enablement

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.

◉

Managed hosting & SRE

Containerised deployment, database and Redis operations, backup and restore drills, queue monitoring, upgrade management and incident response with agreed response times.

+

Custom modules & extensions

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.

▣

White-label & brand

Merchant-specific branding, domains, colours and copy, plus agency deployments that expose the platform under an agency's own identity with scoped tenants.

▤

Data engineering

Warehouse and metric-layer work: new entity sync, data-quality checks, backfill strategy, and export pipelines feeding the merchant's BI stack.

⚑

Security & compliance

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.

◎

Support & enablement

Onboarding workshops, role-based playbooks, alert tuning reviews, quarterly roadmap briefings, and optional ongoing advisory for the merchant's leadership team.

Engagement models

ModelShapeBest for
LaunchFixed-scope implementation: deploy, connect, configure, trainFirst deployment for one store or group
ManagedMonthly hosting, monitoring, upgrades and support with response commitmentsMerchants who want intelligence without operations
BuildCustom module or integration development on a fixed timelineMerchants with bespoke analytics or integration needs
AdvisoryRoadmap, threshold and AI-governance reviews for an internal teamIn-house teams owning the deployment
Section 23

Pricing and engagement models

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.

01

Hourly development

$25/ hour

A specific requirement, bug fix, enhancement or small integration where 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 module by module.

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 full 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. 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.

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.

ServiceRecommended rateTypical work
BigCommerce development$25–$40 / hourStorefront and app changes, catalogue, checkout, theme work
AI / commerce intelligence development$35–$60 / hourInsight detectors, copilots, recommendation and forecast logic
Integration / API development$30–$50 / hourBigCommerce, ERP, CRM, webhook and third-party connectivity
UI / frontend development$25–$40 / hourDesign systems, components, data visualisation, accessibility
QA / testing$20–$30 / hourFunctional, regression and browser end-to-end testing
Technical consultation$40–$75 / hourArchitecture review, audits, technology selection, advice

India-focused engagements: an equivalent starting range of ₹1,500–₹4,500 / hour, depending on skill level and complexity.

How to choose — the hybrid model

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.

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.

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.

www.magetechsol.com · MageTech services

We publish our prices because we would rather compete on the work than on the opacity of the quote.
MageTech Solutions · commercial principle
Section 24

Roadmap and current limits

What is live today, what is next, and what is deliberately not built yet — stated plainly so expectations match the codebase.

Delivered

  • LiveFull platform foundationMonorepo, API, worker, web app, warehouse, 64 endpoints, 10 modules.
  • LiveBigCommerce integrationOAuth install, API-account connect, paged resumable sync, signed webhooks, channel mapping.
  • LiveExplainable intelligenceRule engine with seven detectors, recommendations, alert rules and in-app notifications.
  • LiveCopilot & brand systemGrounded Q&A with usage metering; complete brand palette, module colour contract and design primitives.
  • LiveQuality gatesStrict types, ESLint, 10 Playwright tests, GitHub Actions verify and E2E jobs.

Next

  • Phase 3Scale and intelligenceMulti-store tenants, forecasting, BigCommerce marketing sync, more provider tool calls, mobile or PWA views.
  • Phase 3White-label programmePer-tenant theming, custom domains and agency distribution packages.

Known limitations today

  • External AI provider calls do not yet carry the assembled business facts; all figures still come from the local rule engine.
  • Report CSV materialisation happens in the worker; the API records the request and status.
  • No inbound rate limiting, security headers, OAuth state or CSRF token — required hardening before public exposure.
  • Registration returns a not-implemented response pending the production BigCommerce OAuth app configuration.
  • Campaign data is seeded; a live marketing_v3 sync is not yet implemented.
  • Subscription state is in-memory by default; Stripe is configured but not wired to checkout.
Section 25

Appendix

Command reference, repository map pointers and document metadata.

Command reference

# 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

Ports and URLs

ServiceDevelopment URL
Web applicationhttp://localhost:3000
REST APIhttp://localhost:3001/api
PostgreSQLlocalhost:5432
Redislocalhost:6379

Where to look in the codebase

TopicLocation
Data modelpackages/database/prisma/schema.prisma
Environment contractpackages/shared/src/env.ts
Metrics and analyticspackages/analytics
Rule engine and copilotpackages/ai
BigCommerce clientpackages/bigcommerce
API controllersapps/api/src/modules
Background processorsapps/worker/src/processors
Brand tokensapps/web/src/lib/brand.ts, apps/web/src/app/globals.css
Design primitivesapps/web/src/components/ui.tsx
Demo seedpackages/database/src/seed/demo.ts
Architecture notesdocs/ARCHITECTURE.md, docs/API.md, docs/DEVELOPMENT.md

About this document

  • Generated from the running codebase of mts-bigcommerce-intelligence; figures reflect the implemented system, not aspirations.
  • Self-contained HTML: no external scripts, styles, fonts or network calls.
  • Print to PDF for an offline review copy; the layout and colours are print-aware.
  • Maintained by MageTech Solutions alongside the product.
Build once, deploy per merchant, and keep every merchant's intelligence explainable.