MageTech ServiceFlow Field Service Management SaaS

Technical & Commercial Reference

Never Miss a Service. Never Miss a Follow-up.

A multi-tenant SaaS platform that turns every customer, every piece of equipment and every completed service into a scheduled reminder and a follow-up — so service businesses win repeat work instead of losing customers they forgot to contact. This document is the single source of truth for the platform’s technology, architecture, multi-tenancy model, feature catalogue and recommended India & international pricing.

Version 1.0 Status V1 launch Audience Internal + Sales enablement Currency ₹ (India) / $ (international)
Section 01 · Commercial proposition

The repeat-service flywheel

Customers don’t care about the technology stack. They care about one thing: “Will this help me get more repeat service jobs and stop losing customers because we forgot to follow up?”

STEP 1
Customer
STEP 2
Equipment
STEP 3
Service
STEP 4
Reminder
STEP 5
Follow-up
STEP 6
Repeat Service

This is the cycle that matters for an AC, RO, appliance, pest-control, solar or maintenance company. Every service job the platform records automatically schedules the next service reminder and a post-service follow-up — building a self-replenishing pipeline of repeat revenue.

Section 02 · Stack

Technology stack

A modern, containerised stack: Java 21 + Spring Boot on the backend, Next.js 16 on the frontend, PostgreSQL with row-level security for hard tenant isolation, Redis for performance and RabbitMQ for asynchronous notifications and reminders.

LayerTechnologyNotes
Backend runtimeSpring Boot 3.4.8 · Java 21REST API mounted under the /api context path; versioned resources under /api/v1
Backend buildMaven (Maven wrapper) · MapStruct 1.6.3 · LombokDTO mapping via MapStruct; boilerplate via Lombok
SecuritySpring Security 6 · jjwt 0.12.6 · bcryptJWT access + refresh tokens (HS256), bcrypt password hashing, role-based access control (RBAC)
DatabasePostgreSQL 16 · Spring Data JPA (Hibernate) · FlywayFlyway migrations V1–V17 plus dev demo seeds V901–V907; shared-schema multi-tenancy with RLS
Cache & rate limitRedis 7Token denylist, rate limiting (with in-memory fallback), hot-read caching
MessagingRabbitMQ 3.13 (AMQP)Async notification & reminder delivery (dead-letter handling planned)
EmailSpring Mail (SMTP)Verification / reset / reminder emails; MailHog in dev; log-mode when app.mail.enabled=false
PaymentsRazorpay (REST)Subscriptions API + webhooks; simulated mode by default in dev, live mode via env config
SMSTwilio (opt-in)Activated with SMS_PROVIDER=twilio; fails open to console in dev
FrontendNext.js 16 · React 19 · TypeScript 5.7Standalone build served by nginx; app-router pages, server components
Frontend UITailwind CSS 4 · TanStack Query 5Corporate indigo design system; server-state caching for API data
API docsspringdoc-openapi 2.6Swagger UI (dev) at /api/swagger-ui.html, OpenAPI JSON at /api/v3/api-docs
TestingJUnit 5 · Testcontainers PostgreSQL · H2 · Vitest · React Testing LibraryBackend tests on H2 (PostgreSQL mode) + Testcontainers; frontend unit tests in Vitest
DeliveryDocker Compose · GitHub Actions · GHCR · AWS EC2Local full stack in docker-compose.yml; production stack via docker-compose.prod.yml on a single EC2 host (Phase 1)
Section 03 · Architecture

System architecture

Deployment overview (Phase 1)

MageTech ServiceFlow deployment overview: Vercel/nginx (Next.js 16) -> HTTPS /api/* -> AWS EC2 (Nginx/ALB, Spring Boot) -> PostgreSQL 16, Redis 7, RabbitMQ 3.13

Request flow

Request ──▶ Nginx/ALB ──▶ /api ──▶ Spring Security (JWT) ──▶ TenantFilter │ set TenantContext ▼ Controller ──▶ Service ──▶ Repository ──▶ TenantAwareDataSource │ SET app.current_tenant=<id> ▼ PostgreSQL 16 with FORCE ROW LEVEL SECURITY
Every tenant-scoped query is filtered twice: the application layers its tenant_id predicates on index-aligned (tenant_id, …) indexes, and PostgreSQL row-level security enforces the same boundary at the database — so a buggy query can never leak cross-tenant data.

Asynchronous notifications (RabbitMQ)

Publisher (job status change, follow-up, subscription event) │ publish JSON NotificationMessage ▼ serviceflow.notification.exchange (direct, durable) │ routing key: serviceflow.notification.send ▼ serviceflow.notification.queue ──▶ @RabbitListener consumer │ ├─▶ persist in-app notification (IN_APP) └─▶ fan out to EMAIL / SMS / WhatsApp providers

JSON via Jackson2JsonMessageConverter; poison-message dead-lettering is planned for Phase 2. Redis supports rate limiting, the JWT denylist and hot dashboard reads.

Reminder engine

per-tenant fixed-delay scheduler (Spring @Scheduled) │ scan: equipment.next_service_date − rule.days_before <= today ▼ reminder_rules (service_category, days_before INT[], channels) │ ▼ dedupe via reminder_logs unique (tenant, equipment, rule, channel, days_before) │ ▼ insert reminder_log (PENDING) ──▶ publish to RabbitMQ ──▶ deliver channel │ (IN_APP · EMAIL · SMS) └─▶ mark SENT / FAILED (+ error_message)

Module boundaries (bounded contexts)

com.magetech.serviceflow
  • config — Security, Web MVC, Redis, RabbitMQ, OpenAPI, JPA auditing, Jackson
  • shared — ApiResponse/PageResponse, BaseEntity, auditing, exception handling
  • tenant — TenantContext (ThreadLocal), filter, interceptor, data source decorator
  • auth — login/register/refresh/logout, JWT provider & filter, refresh-token store
  • user — users, Role enum (OWNER/MANAGER/TECHNICIAN)
Domain modules
  • customer — customers CRUD, tags, search
  • equipment — assets, warranty, service frequency, next-service date
  • technician — skills, categories, availability, assignments
  • job — service jobs, status/assignment transitions, payments
  • followup — follow-ups (due/overdue scheduler)
  • reminder — reminder rules, engine, logs
  • notification — in-app inbox + channel providers
  • subscription — plans, limits, Razorpay billing

Security model

Scalability roadmap

Section 04 · Multi-tenancy

Multi-tenancy & data isolation

Model: shared schema + tenant_id column. Every tenant-scoped table carries a tenant_id UUID and a composite (tenant_id, …) index. One PostgreSQL cluster serves all tenants — the most cost-efficient model for Phase 1 — while isolation is enforced at two independent layers.

Layer 1 — application context (per request)

Layer 2 — database connection binding

Layer 3 — PostgreSQL row-level security (defense in depth)

Each tenant-scoped table is protected with ENABLE + FORCE ROW LEVEL SECURITY and a single policy:

-- applied to every tenant-scoped table (V14)
ALTER TABLE service_jobs ENABLE ROW LEVEL SECURITY;
ALTER TABLE service_jobs FORCE ROW LEVEL SECURITY;

CREATE POLICY tenant_isolation ON service_jobs
  FOR ALL
  USING (tenant_id::text = current_setting('app.current_tenant', true))
  WITH CHECK (tenant_id::text = current_setting('app.current_tenant', true));
Because policies are FOR ALL and forced, even the database owner cannot read or write rows outside the current tenant. An accidental cross-tenant query is filtered — or rejected — at the database layer, regardless of application bugs.
Table groupRLS protectedReason
Customers, equipment, technicians, service jobs, follow-ups, reminder rules/logs, notifications, organizations, subscriptions✅ YesTenant-scoped business data
tenants (registry)Accessed without tenant context
refresh_tokens (auth)Auth store; no tenant context

Why this design scales

Section 05 · Feature catalogue

Product features

Status legend: Implemented shipped in V1, Partial core shipped / next milestone, Planned roadmap item built into the pricing model.

Roles & Access Control Implemented

  • Three built-in roles: OWNER (full access, billing & settings), MANAGER (customers, equipment, jobs, technicians, reminders), TECHNICIAN (assigned jobs, notes, own schedule).
  • JWT authentication: 15-minute access token + 7-day refresh token stored hashed with rotation & revocation.
  • bcrypt password hashing; email verification; single-use 2-hour password-reset links; no user enumeration.
  • Redis-backed rate limiting on login & forgot-password with in-memory fallback.

Customer Management Implemented

  • Full CRUD with profile: name, phone, email, address/city/area, customerType, notes and tags[].
  • Paginated search by query (?q=) and city filter; duplicate-email guard per tenant.

Equipment / Asset Management Implemented

  • Assets tracked per customer: asset type, brand, model, serial number, installation & warranty dates.
  • serviceFrequencyMonths drives an automatic nextServiceDate that feeds the reminder engine.
  • Asset lifecycle status (ACTIVE, history) with per-asset notes.

Service Management Implemented

  • Service jobs with a cluster-wide human-readable jobNumber (sequential).
  • Guided status flow: NEW → SCHEDULED → IN_PROGRESS → COMPLETED | CANCELLED; assign to a technician; priority levels.
  • Parts used (JSON), labour charges, total amount and payment status per job.
  • On completion the system sets completedAt and computes the next service date from service frequency — automatically spawning the next reminder.

Technician Management Implemented

  • Technician profiles: skills, service categories, weekly availability (JSON), status.
  • Optional link to a TECHNICIAN user account for app access.
  • Filter technicians by service category for smart dispatching.

Automatic Service Reminder System Implemented SMS delivery partial

  • Per-tenant reminder_rules: service category → days_before thresholds (e.g. 30/15/7/1) and enabled channels.
  • Background scheduler scans next_service_date daily and raises reminders exactly once per equipment/rule/channel/day (idempotent via a dedupe index on reminder_logs).
  • Delivery channels: IN_APP, EMAIL (SMTP), SMS (Twilio, opt-in); every delivery is audited as SENT or FAILED.

Follow-Up Management Implemented

  • Follow-ups per customer with assignee, date/time, notes, priority and opt-in reminders.
  • Daily scheduler (FOLLOWUP_CRON, default 07:00) raises DUE (today) and OVERDUE notifications; each follow-up fires once.

Dashboard Implemented

  • Live summary: open jobs, jobs today / this week, active customers & equipment, due follow-ups, upcoming reminders, revenue this month, unpaid revenue and top technician.
  • Revenue trend vs previous month (month-over-month comparison).

Calendar Implemented

  • Date-based service-job planning view with day-level scheduling and status colouring.

Notifications Implemented

  • In-app inbox delivered asynchronously via RabbitMQ (job completed, follow-up due/overdue, reminders).
  • Event types: JOB_COMPLETED, FOLLOW_UP_SCHEDULED, FOLLOW_UP_DUE, FOLLOW_UP_OVERDUE, REMINDER.
  • Channel codes: IN_APP, EMAIL, SMS, WHATSAPP (reserved), PUSH (reserved); mark one or all as read.

Reports & Analytics Partial

  • Reports page with revenue and service-volume metrics; deeper analytics, custom report builders and exports are next milestone.
  • Roadmap: churn-risk scoring and predictive service scheduling land with the AI tier.

Subscription & SaaS Billing Implemented Live payments optional

  • Plan tiers with server-enforced limits (create operations return 403 once a limit is reached):
PlanMax usersMax customersMax technicians
FREE31005
STARTER5100010
PROFESSIONAL10500025
BUSINESS5010000100
  • Razorpay integration: simulated mode by default (RAZORPAY_ENABLED=false activates plans instantly); live mode creates a Razorpay subscription, sets requestedPlan, and the plan activates when signature-verified webhooks (subscription.activated, subscription.charged, payment.captured) arrive. Cancellations handled via subscription.cancelled / subscription.completed.
  • Webhook security: HMAC-SHA256 signature verification of the raw body using RAZORPAY_WEBHOOK_SECRET.

AI Features Planned

  • Predictive service scheduling, churn-risk scoring and auto-generated service notes.
  • Commercial model: monthly AI credits included in Professional / Business; additional usage billed separately.

API & Integration Layer Implemented Advanced planned

  • Versioned REST API at /api/v1 with consistent ApiResponse<T> / PageResponse<T> envelopes, OpenAPI spec and Swagger UI (dev).
  • Bearer-token auth, tenant-aware routing, pagination & filtering on every list endpoint.
  • Roadmap: API keys, outbound webhooks (Business+), WhatsApp automation, ERP/accounting integration and customer portal.
Section 06 · Commercial

Recommended India pricing (V1 launch)

Positioning: “Never Miss a Service. Never Miss a Follow-up.” The Professional plan is the featured offer — the tier most customers should land on. Before finalising any price, the per-tenant infrastructure + WhatsApp/SMS + email + AI + support cost should be calculated to confirm gross margin at these price points.

PlanSuitable forSuggested price (monthly)
StarterSmall service business, 1–3 technicians₹999
Professional Growing business, 4–10 technicians₹2,499
Business10–25 technicians / multiple teams₹4,999
EnterpriseLarger / multi-branch companiesCustom (from ≈ ₹9,999)

What each plan includes

Starter — ₹999/month

  • 1 business / workspace
  • Up to 3 users
  • Customer management
  • Equipment / asset management
  • Service jobs
  • Basic technician management
  • Follow-ups
  • Service reminders
  • Dashboard & basic reports

Professional — ₹2,499/month ★ featured

Everything in Starter, plus:

  • Up to 10 users
  • Advanced scheduling / calendar
  • Recurring services
  • Automated reminders
  • WhatsApp / email integrations
  • Technician mobile interface
  • Invoices & payments
  • Advanced reports
  • More automation

Business — ₹4,999/month

Everything in Professional, plus:

  • Up to 25 users
  • Multiple branches
  • Advanced roles & permissions
  • Advanced analytics
  • Workflow automation
  • API access & webhooks
  • Priority support
  • AI features with usage limits

Enterprise — ₹9,999+/month

  • Multiple branches / locations
  • Custom user limits
  • Custom workflows
  • Dedicated onboarding
  • Advanced API / integrations
  • Custom reports
  • SLA / support
  • Dedicated infrastructure if required
  • Custom AI / automation
  • One-time implementation / onboarding fee
Honest mapper note (internal)
The commercial tiers above are launch positioning. The current V1 code enforces the platform limits shown in Section 05 (FREE 3/100/5, STARTER 5/1000/10, PROFESSIONAL 10/5000/25, BUSINESS 50/10000/100). Plan limits are tunable per tenant before release to match the commercial targets exactly. No base subscription includes unlimited usage — WhatsApp/SMS/AI/storage are priced separately (see Add-ons).
Section 07 · Billing

Annual billing — roughly 10–20% below monthly

Offer an early-adopter annual plan rather than permanently discounting the product.

PlanMonthly ₹Yearly at 12 × monthlyAnnual — 10% offAnnual — 20% off
Starter₹999₹11,988≈ ₹10,789≈ ₹9,590
Professional₹2,499₹29,988≈ ₹26,989≈ ₹23,990
Business₹4,999₹59,988≈ ₹53,989≈ ₹47,990
EnterpriseCustom quote (annual pricing negotiated in the contract)
Section 08 · Commercial

Implementation fees & add-on pricing

One-time implementation / onboarding fees

Implementation is never free for business customers. Fees cover business configuration, user setup, service categories, reminder configuration, data import, initial training, WhatsApp/SMS/email configuration and basic customisation.

PlanOne-time setup estimateNotes
Starter₹2,500 – ₹5,000Standard self-setup + guided onboarding
Professional₹5,000 – ₹15,000Includes data import & channel configuration
Business₹15,000 – ₹30,000Multi-branch setup, automation & API onboarding
Enterprise₹30,000 – ₹1,00,000+Dedicated onboarding, custom workflows & integrations

Add-ons (usage-based — never unlimited in base plans)

Add-onPricing model
Additional users≈ ₹199 – ₹399 / user / month
Additional branches≈ ₹999 – ₹2,499 / branch / month
Extra storageUsage-based (bytes stored per month)
WhatsAppPass-through at actual provider / conversation / template costs + optional MageTech platform fee
SMSPay-as-you-go or prepaid credits (actual provider cost)
AI usageMonthly credits included in Professional / Business; additional usage billed separately
WhatsApp, SMS, AI and storage carry variable provider costs — this is why the base subscription excludes unlimited usage and these line items are priced transparently as pass-through + optional platform fee.
Section 09 · Commercial

ServiceFlow Custom — separate software offering

Some companies won’t want SaaS at all; they will ask MageTech to customise ServiceFlow for their business. A dedicated “Custom Software” line protects SaaS pricing while capturing these deals.

OfferingPrice rangeWhat drives the bill
ServiceFlow SaaS₹999 – ₹9,999+ / monthStandard multi-tenant platform, subscription plans
ServiceFlow Custom₹2,00,000 – ₹10,00,000+Custom workflows · custom UI · ERP integration · CRM migration · accounting integration · WhatsApp automation · mobile application · customer portal · advanced AI · third-party integrations · multi-country requirements

Large enterprise implementations are quoted significantly higher based on scope. A one-time implementation / onboarding fee always applies.

Section 10 · Commercial

International pricing (US / UK / UAE / Australia / Canada)

Do not simply convert ₹2,499 into dollars. A separate international price structure — adjusted by market and customer size — protects margin where willingness-to-pay is higher.

PlanInternational starting price
Starter$19 / month
Professional$49 / month
Business$99 / month
EnterpriseCustom