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
- Feature matrix
- Architecture
- Requirements
- Quick start
- Configuration
- Default accounts
- Payment gateways
- Testing
- Project layout
- API
- Documentation
- Licence
Highlights
| Stack | Go 1.26 · Fiber v3.6 · MySQL 8 / MariaDB 10.11 · html/template · Bootstrap 5 |
| Routes | 171 HTTP routes (public, auth, customer area, payments, chat, admin, JSON API) |
| Database | 53 tables, idempotent embedded schema, auto-created database, seeded demo data |
| Payments | 44 gateways (40 automated + 4 manual) with a built-in sandbox simulator |
| Localisation | English out of the box; the language manager in the panel adds any locale with its direction and its 25 editable interface strings |
| Extras | Guest order tracking, 2FA (TOTP), audit log, live chat, CSV exports, invoice PDF, GDPR tools, server metrics, sitemap |
| Tests | Go 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
- Home page with hero, popular services, categories, "how it works" and trust sections
- Service catalogue with category pages, search, brand filters and per-service options
- Booking flow: service → device → date/slot → address → options → coupon → checkout
- Blog with categories, post pages and reviews
- Static pages, FAQ list, contact form, cookie banner, sitemap and robots.txt
- English interface with a language switcher that is ready for more languages: the administrator adds a locale in the admin panel, the direction column keeps a right-to-left language readable and the interface strings live in the database where they can be edited
- Guest order tracking via
/track/:order_no/:token— no account required
Customer area (/dashboard)
- Overview with the next appointment, recent orders and unread notifications
- Order list and detail with live status timeline, technician assignment and invoice download
- Booking, rebooking, and cancellation (paid orders are refund-only, never cancellable)
- Payment history, profile (name, phone, address, city, avatar) and password change
- Support tickets (create, thread, attachments) and live chat
- Notification inbox, 2FA enrolment, privacy/GDPR export and deletion requests
Payments
- 40 automated gateways: Stripe, PayPal, Razorpay, Paystack, Flutterwave, Mollie, Braintree,
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
- 4 manual gateways: cash on delivery, bank transfer, cheque, MoneyGram — submitted with a
reference and verified by the team
- Sandbox simulator so the complete flow is testable without a single API key
- Per-gateway fees, per-gateway currency, admin-side credentials, connection test and toggle
- Manual payments enter a verification queue in the admin panel
Admin panel (/admin)
- Dashboard: revenue, orders, customers, jobs by status, top services, 14-day revenue chart
- Orders: list, filter, export CSV, detail, status workflow, assignment, cancel, refund, invoice PDF
- Catalogue: categories and services with images, options, brands, prices and ordering
- Customers: list, detail, status, role, email/phone verification, password reset
- Payments: list, approve/reject manual payments, per-gateway statistics
- Support: ticket queue, detail, threaded replies, status workflow
- Reports: revenue, services, gateways, categories, status — with CSV export
- Settings (8 groups), Appearance/branding, Extensions, Languages + translation editor,
email/SMS templates, Pages, Sections, Blog, Contact messages, GDPR, Sitemap, Notifications, Server monitoring, Audit log, Roles & permissions
Platform
- JWT sessions in an HTTP-only cookie with a
token_versioncolumn, so bans and role changes
invalidate live sessions instantly
- CSRF protection on every state-changing form, arithmetic CAPTCHA on registration, login
throttling, role guards and a full audit trail
- Server-rendered PDF invoices (no external dependency) and CSV exports
- Live chat widget with polling and a staff inbox
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
- Go 1.26 or newer (the
go.modrequiresgo 1.26.0) - MySQL 8.0+ or MariaDB 10.6+
- Optional: Python 3 with
requestsfor the smoke test, Playwright for the browser test
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.
| Variable | Default | Purpose |
|---|---|---|
APP_NAME | RocketMainta | Brand name shown in the UI and in mails |
APP_URL | http://127.0.0.1:8080 | Public base URL (used in callbacks, sitemaps, mails) |
APP_ENV | production | local relaxes the cookie Secure flag |
ALLOW_FRAMING | false | allows 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_DEBUG | false | Verbose errors and stack traces |
APP_PORT | 8080 | HTTP port |
DB_HOST / DB_PORT | 127.0.0.1 / 3306 | Database address |
DB_USER / DB_PASSWORD | rocket / rocket_pw | Database credentials |
DB_DATABASE | rocketmainta | Application database |
DB_TEST_DATABASE | rocketmainta_test | Database used by the test suite |
JWT_SECRET | (dev value) | Change in production — signs the session tokens |
JWT_TTL_HOURS | 72 | Session lifetime |
COOKIE_SECURE | false | Force the Secure flag (HTTPS only) |
SESSION_COOKIE | rm_session | Session cookie name |
SUPER_ADMIN_EMAIL | admin@rocketmainta.test | Seeded administrator |
SUPER_ADMIN_PASSWORD | Admin@12345 | Seeded administrator password |
MAIL_FROM / MAIL_FROM_NAME | no-reply@rocketmainta.test | Sender identity |
SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASS | — | SMTP relay for notifications |
SMTP_STARTTLS | true | Use STARTTLS |
CURRENCY / BASE_CURRENCY | USD | Display and base currency |
TAX_PERCENT | 0 | Fallback tax rate (the admin panel can override it) |
UPLOADS_DIR | storage/uploads | Where uploaded files are stored |
Default accounts
| Role | Password | |
|---|---|---|
| Administrator | admin@rocketmainta.test | Admin@12345 |
| Demo customer | olivia.bennett@example.com | Customer@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.
- Stripe and PayPal use their real REST APIs — add the credentials in
Admin → Payment gateways and the customer is redirected to the provider.
- The other 38 automated gateways use the generic hosted-checkout adapter: give the gateway a
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.
- The 4 manual gateways (cash on delivery, bank transfer, cheque, MoneyGram) collect a
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
- Go suite —
internal/auth(hashing, JWT, TOTP, recovery codes),internal/paygate
(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.
- Smoke test — drives the running server over HTTP: public pages, registration with the
CAPTCHA, booking, simulated payment, tickets, the customer area, 24 admin screens, admin write operations, the JSON API, the chat widget and the sign-out.
- Browser test — Playwright/Chromium: renders every public, customer and admin screen,
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"
| Method | Path | Auth | Purpose |
|---|---|---|---|
| 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/logout | token | Invalidate the session |
| GET | /api/v1/auth/me | token | Current user |
| GET | /api/v1/orders | token | The caller's orders |
| POST | /api/v1/orders | token | Book a service |
| GET | /api/v1/orders/:no | token | Order detail |
| GET | /api/v1/payments | token | Payment history |
| GET | /api/v1/tickets | token | Support tickets |
| POST | /api/v1/tickets | token | Open a ticket |
| GET | /api/v1/tickets/:no | token | Ticket thread |
| POST | /api/v1/tickets/:no/reply | token | Answer a ticket |
| GET | /api/v1/notifications | token | Notification inbox |
| GET | /api/v1/dashboard | token | Customer dashboard summary |
| GET | /api/v1/admin/stats | staff | Dashboard statistics |
| GET | /api/v1/admin/orders | staff | All orders |
| GET | /api/v1/admin/users | staff | All users |
| GET | /api/v1/admin/reports/:kind | staff | Report data (revenue, services, gateways, categories, status) |
Errors are returned as {"error": "…", "status": 4xx} with the matching HTTP status.
Documentation
docs/ARCHITECTURE.md— request lifecycle, data model, securitydocs/API.md— the JSON API in detaildocs/DEPLOYMENT.md— production deployment, reverse proxy, backupsdocs/TESTING.md— the four test suites, the coverage audit and the release verificationdocs/screenshots/— screenshots captured by the browser test
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
| URL | https://rocketmainta.mintsource.dev |
| Administrator | admin@rocketmainta.test / Admin@12345 |
| Regular user | olivia.bennett@example.com / Customer@12345 |
| Documentation | https://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.