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.
System Architecture & Design Patterns
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
Engineering Challenges & Solutions
Heavy CPU operations (PDF invoice rendering, bulk payroll calculations, email dispatch) caused HTTP event loop lag.
Architected asynchronous BullMQ queues backed by Redis, offloading intensive tasks to isolated worker threads with exponential backoff retries and graceful shutdown handlers.
Stripe webhook signature verification failures caused by Express automatic JSON body parsing.
Mounted the raw-body Stripe webhook route (/api/stripe/webhook) prior to global express.json() middleware, guaranteeing uncorrupted payload verification.
Tech Stack
Core Capabilities
- 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