Stone Portal
Enterprise Field-Service & Operations Platform
A robust backend API and real-time operations engine for landscaping and field-service enterprises—handling estimates, automated invoicing, project scheduling, crew attendance, payroll, equipment dispatch, and Stripe one Time payment.
What was the measurable impact?
Processes async background jobs & real-time crew dispatches with sub-20ms database queries
What problem did Stone Portal solve?
Field-service enterprises struggled with disconnected operations, manual crew attendance tracking, delays in job estimate approvals, and unhandled payment race conditions during high-volume customer checkouts.
How was Stone Portal solved?
Engineered a modular monolithic REST & WebSocket API with Express 5, Prisma 7 (PostgreSQL), Redis & BullMQ worker queues, JWT authentication with double-submit CSRF protection, and real-time Socket.IO dispatch.
How is Stone Portal architected?
Modular Monolith with Feature Slices, Prisma ORM & BullMQ Queue Workers
Maintains clear domain boundaries across feature modules while offloading CPU-bound tasks (PDF generation, bulk attendance calculations, email notifications) to isolated BullMQ Redis workers.
- Vertical slice module scaffolding isolating controller, service, route, and Zod schema per feature domain
- BullMQ worker pool backed by Redis with exponential backoff retry strategies (3 attempts)
- Stripe webhook pipeline registered prior to body parsing for raw-buffer signature verification
What was hard to build in Stone Portal?
Challenge 1
Heavy CPU operations (PDF invoice rendering, bulk payroll calculations, email dispatch) caused HTTP event loop lag.
How it was solved
Architected asynchronous BullMQ queues backed by Redis, offloading intensive tasks to isolated worker threads with exponential backoff retries and graceful shutdown handlers.
Challenge 2
Stripe webhook signature verification failures caused by Express automatic JSON body parsing.
How it was solved
Mounted the raw-body Stripe webhook route (/api/stripe/webhook) prior to global express.json() middleware, guaranteeing uncorrupted payload verification.
What can Stone Portal do?
- Estimates & Invoicing workflow (approvals, change orders, schedule management)
- Operations & resource tracking (materials, vehicles, equipment assignments, request workflows)
- Workforce & attendance management (time tracking, payroll processing, employee dashboards)
- Stripe billing (checkout sessions, packages, raw body webhook verification)
- Async background job processing via BullMQ (queued emails, attendance processing, schedule rescheduling)
- Real-time bidirectional WebSocket events powered by Socket.IO
- Automated document generation and PDF rendering (PDFKit, Puppeteer)
- Double-submit CSRF protection & granular Role-Based Access Control (USER, EMPLOYEE, SUPER_ADMIN)