RocketMainta documentation

RocketMainta — Service Centre Automation Platform

RocketMainta is a self-hosted, production-shaped service centre automation platform for repair and maintenance businesses: customers book a job, pay online, follow the technician and get support, while the back office runs the catalogue, the orders, the payments, the content and the analytics.

It is written from scratch in Go 1.26 + Fiber v3 + MySQL/MariaDB with no JavaScript build step — the front end is server-rendered html/template plus a small custom CSS layer on top of Bootstrap 5. The project reproduces the feature set of the MaintaLab service-centre product (public booking, customer dashboard, payments, support, CMS, admin panel) with original code.


Table of contents


Highlights

StackGo 1.26 · Fiber v3.6 · MySQL 8 / MariaDB 10.11 · html/template · Bootstrap 5
Routes171 HTTP routes (public, auth, customer area, payments, chat, admin, JSON API)
Database53 tables, idempotent embedded schema, auto-created database, seeded demo data
Payments44 gateways (40 automated + 4 manual) with a built-in sandbox simulator
LocalisationEnglish out of the box; the language manager in the panel adds any locale with its direction and its 25 editable interface strings
ExtrasGuest order tracking, 2FA (TOTP), audit log, live chat, CSV exports, invoice PDF, GDPR tools, server metrics, sitemap
TestsGo unit + integration suite, 103-check HTTP smoke test, 82-check Playwright browser suite, 157-case GUI suite + a control coverage audit (412 controls inventoried)

Feature matrix

Public site

Customer area (/dashboard)

Payments

Square, Authorize.Net, Cashfree, KhdSaa, Paymob, Fawry, InstaPay, Vodafone Cash, Orange Money, MTN MoMo, Wave, M-Pesa, Telebirr, Zelle, Venmo, Wise, Payoneer, Skrill, 2Checkout, Payza, Perfect Money, ePay, EasyPay, SSLCommerz, Tap Payments, Checkout.com, Adyen, Worldpay, Merchant eServices, Paymentwall, Coinbase Commerce, Crypto.com Pay, Binance Pay

reference and verified by the team

Admin panel (/admin)

email/SMS templates, Pages, Sections, Blog, Contact messages, GDPR, Sitemap, Notifications, Server monitoring, Audit log, Roles & permissions

Platform

invalidate live sessions instantly

throttling, role guards and a full audit trail


Architecture

cmd/server/main.go              entry point: config → database → app → HTTP server
internal/config                 environment configuration
internal/store                  MySQL access, embedded schema, idempotent migrations, seeding
internal/auth                   bcrypt, JWT (HS256), TOTP 2FA, recovery codes
internal/i18n                   database-backed translator with fallbacks
internal/paygate                gateway registry + Stripe/PayPal/generic/manual/simulator drivers
internal/notify                 SMTP, Twilio, Vonage and log notification drivers
internal/pdf                    dependency-free PDF writer (invoices)
internal/app                    HTTP layer: routes, middleware, handlers, renderer, templates
web/templates                   layouts, partials and ~55 page templates
web/static                      CSS, brand assets, 44 gateway logos
scripts/smoke_test.py           103-check HTTP end-to-end test
scripts/gui_test.py             82-check Playwright browser test
scripts/gui/                   157-case GUI suite (runner, harness, cases, coverage audit)
scripts/package_release.sh     builds the release archive of the marketplace
scripts/verify_release.sh      installs that archive on a fresh database and tests it
scripts/build_docs_site.py     builds the public documentation site
scripts/make_listing_shots.py  captures the 1920x1080 listing screenshots
tests/integration               full-stack Go test against the test database

Rendering. A custom html/template renderer parses a layout, the requested page and every partial into one template set. Templates live in web/templates/<section>/<page>.html; the renderer resolves the section/page pair, so adding a page never means touching Go code.

Sessions. internal/auth issues an HS256 JWT stored in the rm_session cookie. The token carries the user id and the token_version stored on the user row; every request compares the two, so a password reset, a ban or a role change kills the session immediately.

Payments. internal/paygate keeps a single catalogue of 44 gateways. Each gateway has a driver: Stripe and PayPal talk to their real REST APIs, every other automated gateway uses the generic hosted-checkout adapter (configured with a checkout URL plus an optional HMAC secret), and manual gateways never leave the server. A gateway without credentials falls back to the sandbox simulator so the whole flow stays testable.


Requirements


Quick start

The shortest way — the installer creates the database, writes the configuration, builds the server, applies the schema and seeds the catalogue:

unzip rocketmainta-1.0.0.zip && cd rocketmainta-1.0.0
./install.sh --db-user cms --db-password 'your-password' \
             --app-url https://book.example.com

The manual way:

# 1. database (the app creates the schema itself, this is only the user)
mysql -uroot <<'SQL'
CREATE DATABASE IF NOT EXISTS rocketmainta CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'rocket'@'localhost' IDENTIFIED BY 'rocket_pw';
GRANT ALL PRIVILEGES ON rocketmainta.* TO 'rocket'@'localhost';
FLUSH PRIVILEGES;
SQL

# 2. configuration
cp .env.example .env
set -a && . ./.env && set +a

# 3. run
make run            # or: go run ./cmd/server

The server listens on http://127.0.0.1:8080 by default, creates the database when it is missing, applies the schema, seeds the demo catalogue and creates the administrator.

make migrate        # apply the schema only
make seed           # (re)seed the demo data
make test           # go vet + go test ./...
make smoke          # HTTP end-to-end test against a running server
make gui            # Playwright browser test + screenshots

Configuration

Every value is read from the environment; see .env.example for the complete list.

VariableDefaultPurpose
APP_NAMERocketMaintaBrand name shown in the UI and in mails
APP_URLhttp://127.0.0.1:8080Public base URL (used in callbacks, sitemaps, mails)
APP_ENVproductionlocal relaxes the cookie Secure flag
ALLOW_FRAMINGfalseallows the site to be embedded in an iframe (the marketplace preview)
FRAME_ANCESTORS—the origins that may embed the site, for example https://preview.codecanyon.net
APP_DEBUGfalseVerbose errors and stack traces
APP_PORT8080HTTP port
DB_HOST / DB_PORT127.0.0.1 / 3306Database address
DB_USER / DB_PASSWORDrocket / rocket_pwDatabase credentials
DB_DATABASErocketmaintaApplication database
DB_TEST_DATABASErocketmainta_testDatabase used by the test suite
JWT_SECRET(dev value)Change in production — signs the session tokens
JWT_TTL_HOURS72Session lifetime
COOKIE_SECUREfalseForce the Secure flag (HTTPS only)
SESSION_COOKIErm_sessionSession cookie name
SUPER_ADMIN_EMAILadmin@rocketmainta.testSeeded administrator
SUPER_ADMIN_PASSWORDAdmin@12345Seeded administrator password
MAIL_FROM / MAIL_FROM_NAMEno-reply@rocketmainta.testSender identity
SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASS—SMTP relay for notifications
SMTP_STARTTLStrueUse STARTTLS
CURRENCY / BASE_CURRENCYUSDDisplay and base currency
TAX_PERCENT0Fallback tax rate (the admin panel can override it)
UPLOADS_DIRstorage/uploadsWhere uploaded files are stored

Default accounts

RoleEmailPassword
Administratoradmin@rocketmainta.testAdmin@12345
Demo customerolivia.bennett@example.comCustomer@12345

The installation is filled with a demo dataset: six customers, eight bookings in different states, three support tickets and three reviews. Administration → Dashboard → Remove the demo content deletes it with one click before the installation goes to a customer.

The administrator is created on the first boot only, and the credentials can be changed with SUPER_ADMIN_EMAIL / SUPER_ADMIN_PASSWORD before the first run. Change the password immediately in any real deployment.


Payment gateways

All 44 gateways are enabled out of the box and appear on the checkout page.

Admin → Payment gateways and the customer is redirected to the provider.

checkout_url (and optionally a secret_key used to sign callbacks) and it behaves exactly like a provider-hosted page. With no configuration they transparently fall back to the sandbox simulator, so the flow is always completable.

reference and a note, then wait for the team to approve them in Admin → Payments.

Each gateway stores its own fee (fee_percent, fee_fixed), currency and active flag. The admin panel can test a connection, toggle a gateway and change its credentials at any time.


Testing

export DB_HOST=127.0.0.1 DB_USER=rocket DB_PASSWORD=rocket_pw
make test                                   # go vet + go test ./...  (unit + integration)
python3 scripts/smoke_test.py               # 103 HTTP checks against a running server
python3 scripts/gui_test.py                 # 82 browser checks + screenshots
python3 scripts/gui/run.py                  # 157 GUI cases + the control coverage audit
./scripts/package_release.sh                # build the release archive
./scripts/verify_release.sh                 # install the archive and test the installation

(catalogue, drivers, signatures, simulator), internal/pdf (structure, escaping, compression), internal/i18n (fallbacks, placeholders, direction) and internal/store (schema, seeding, idempotency) plus tests/integration which boots the whole application against rocketmainta_test and exercises the pages, the authentication, the CSRF guard, the API and the admin panel.

CAPTCHA, booking, simulated payment, tickets, the customer area, 24 admin screens, admin write operations, the JSON API, the chat widget and the sign-out.

runs the full customer journey, checks for horizontal overflow at 1440px and 390px, fails on console errors and stores screenshots in docs/screenshots/.


Project layout

rocketmainta/
├── cmd/server/            entry point
├── internal/
│   ├── app/               routes, middleware, handlers, renderer, views
│   ├── auth/              bcrypt · JWT · TOTP
│   ├── config/            environment configuration
│   ├── i18n/              database-backed translations
│   ├── notify/            SMTP · Twilio · Vonage · log
│   ├── paygate/           44-gateway catalogue and drivers
│   ├── pdf/               dependency-free PDF writer
│   └── store/             MySQL, schema, migrations, seeding
├── web/
│   ├── templates/         layouts · partials · public · auth · dashboard · admin
│   └── static/            css, brand assets, gateway logos
├── migrations/            reference copy of the SQL schema
├── scripts/               smoke_test.py · gui_test.py
├── tests/integration/     full-stack Go test
└── docs/                  architecture, API, deployment, screenshots

API

The JSON API lives under /api/v1. Public endpoints need no credentials; everything else takes Authorization: Bearer <token> (the token returned by POST /api/v1/auth/login).

TOKEN=$(curl -s -X POST http://127.0.0.1:8080/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"admin@rocketmainta.test","password":"Admin@12345"}' | python3 -c 'import json,sys;print(json.load(sys.stdin)["token"])')

curl -s http://127.0.0.1:8080/api/v1/orders -H "Authorization: Bearer $TOKEN"
MethodPathAuthPurpose
GET/api/v1/health–Liveness probe
GET/api/v1/config–Public configuration (currencies, tax, categories)
GET/api/v1/categories–Category list
GET/api/v1/categories/:slug–Category detail with its services
GET/api/v1/services–Service list (paginated)
GET/api/v1/services/:slug–Service detail with options
GET/api/v1/gateways–Active payment gateways
POST/api/v1/auth/register–Create an account, returns a token
POST/api/v1/auth/login–Sign in, returns a token
POST/api/v1/auth/logouttokenInvalidate the session
GET/api/v1/auth/metokenCurrent user
GET/api/v1/orderstokenThe caller's orders
POST/api/v1/orderstokenBook a service
GET/api/v1/orders/:notokenOrder detail
GET/api/v1/paymentstokenPayment history
GET/api/v1/ticketstokenSupport tickets
POST/api/v1/ticketstokenOpen a ticket
GET/api/v1/tickets/:notokenTicket thread
POST/api/v1/tickets/:no/replytokenAnswer a ticket
GET/api/v1/notificationstokenNotification inbox
GET/api/v1/dashboardtokenCustomer dashboard summary
GET/api/v1/admin/statsstaffDashboard statistics
GET/api/v1/admin/ordersstaffAll orders
GET/api/v1/admin/usersstaffAll users
GET/api/v1/admin/reports/:kindstaffReport data (revenue, services, gateways, categories, status)

Errors are returned as {"error": "…", "status": 4xx} with the matching HTTP status.


Documentation

A static documentation site is built with python3 scripts/build_docs_site.py — it is the page the marketplace asks for, reachable without a purchase.

Publishing

marketplace/ holds everything the listing needs: the description in HTML, the feature list, the screenshots in 1920×1080, the video script, the publishing guide and the checklist with the steps that need the author (the accounts, the price).


Live demo

URLhttps://rocketmainta.mintsource.dev
Administratoradmin@rocketmainta.test / Admin@12345
Regular userolivia.bennett@example.com / Customer@12345
Documentationhttps://rocketmainta.mintsource.dev/documentation/

The demo is a real installation of this package on a public server with a certificate of its own. It is embedded in the preview frame of a marketplace, and it is reset every 30 minutes so that it looks the same to every visitor.


Licence

Original code written for this project. The MaintaLab product by ViserLab is a commercial reference for the feature set; no code, markup or assets from that product were copied. The bundled brand assets (logo, gateway logos) are original SVG artwork.