Delivered remotely for a business based in Lisbon, Portugal. Names withheld by agreement.
Project Overview
Administering a formal regulatory enforcement programme demands precision at every procedural step. When an industry oversight body receives a violation report—whether from field inspectors, partner agencies, or external stakeholders—that intake triggers a sequence governed by strict administrative rules: conflict screening, evidence preservation, formal respondent notification, opportunity to contest, penalty assessment, and financial collection. Managing those stages through shared mailboxes and manual document folders introduces procedural risk, inconsistent rulings, and delayed fine recovery.
We engineered an end-to-end regulatory compliance and enforcement case management platform using Laravel, PHP, Blade, Vue, Bootstrap, MySQL, Google Cloud, and Stripe. The system consolidates external violation reporting, investigator triage, legal review, formal notice generation, and online penalty settlement into a single auditable web platform with strict visibility boundaries between internal staff and regulated parties.
Oversight & Case-Handling Bottlenecks
Oversight teams operating on legacy spreadsheets and disconnected billing tools faced persistent operational hazards:
- Procedural drift across cases: Without an enforced state machine, cases occasionally jumped to penalty billing before statutory notice periods elapsed or formal findings were signed off.
- Evidence chain fragmentation: Photos, compliance certificates, and correspondence arrived across email attachments and local drives, making complete hearing packets laborious to assemble.
- Manual deadline arithmetic: Calculating cure periods, response windows, and appeal cutoffs by hand created compliance exposure whenever holidays or stay requests paused the clock.
- Disconnected fine collection: Finance staff struggled to match bank remittances or card receipts back to specific docket numbers, leaving resolved cases marked delinquent in enforcement logs.
Architectural Strategy
We anchored the platform around a deterministic case state machine inside Laravel backed by Google Cloud SQL (MySQL). No user—not even a senior administrator—can arbitrarily flip a docket status without satisfying domain preconditions such as mandatory evidence attachments, supervisor sign-off, or expired statutory wait periods.
For the presentation tier, we matched tool weight to workflow complexity. Public violation intake forms, respondent login portals, and administrative lists render cleanly via Laravel Blade and Bootstrap for accessibility and predictable server validation. Inside the investigator workbench, interactive Vue components power side-by-side evidence annotation, timeline filtering, and dynamic penalty-matrix calculations without full-page reloads. All evidentiary files reside in encrypted Google Cloud Storage buckets rather than application servers, keeping compute stateless and horizontally scalable.
Core Capabilities
- Structured Violation Intake Portal: Guided multi-step submission forms capture incident geolocation, regulatory code citations, involved entity details, and supporting attachments with automatic reference numbers.
- Configurable Investigation & Adjudication Lifecycle: Enforces sequential transitions across triage, active investigation, formal notice issuance, respondent rebuttal, hearing review, and final disposition.
- Role-Isolated Evidence Binders: Vue-powered document panels organize photos, PDFs, and correspondence with explicit tagging that separates sealed internal notes from formal respondent disclosures.
- Automated Notice & Penalty Matrix Engine: Computes statutory base fines, repeat-offense multipliers, and remediation credits, generating standardized PDF notices ready for electronic delivery.
- Integrated Stripe Penalty Settlement: Regulated entities review itemized assessments and settle penalties online via Stripe, automatically updating docket balances and issuing official clearance receipts.
Technical Architecture
Incoming requests terminate over TLS at Google Cloud load balancers routing to containerized Laravel PHP workers. Blade serves initial portal views and embeds compiled Vue widgets that communicate with Laravel JSON endpoints protected by session authentication and CSRF tokens.
Flow: Reporter / Respondent / Staff Browser → Google Cloud Load Balancer → Laravel (Blade + Vue API) → MySQL (Cloud SQL Case & Audit Ledger) → Google Cloud Storage (Signed Evidence Vault) & Stripe (Checkout + Idempotent Webhooks)
When an investigator uploads large field evidence, Laravel issues a constrained upload policy to private Google Cloud Storage and records cryptographic checksums in MySQL. When a respondent initiates penalty payment, Laravel generates a Stripe session bound to the exact assessment version; Stripe webhook callbacks verify signatures, record settlement entries inside MySQL transactions, and trigger automated clearance notifications.
Technology Stack
| Category | Technology detail |
|---|---|
| Backend Case Engine | Laravel 11 on PHP 8.4 enforcing statutory case state transitions |
| Interactive Workspace UI | Vue components embedded for evidence binders and timeline adjudication |
| Portal Shell & Forms | Laravel Blade templates and Bootstrap responsive administrative layouts |
| Case & Audit Persistence | MySQL on Google Cloud SQL storing relational cases and append-only logs |
| Evidence Vault & Hosting | Google Cloud Storage private buckets with signed URLs and Cloud Run/Compute |
| Penalty Checkout & Billing | Stripe PaymentIntents and Checkout sessions for statutory fine remittance |
| Webhook Reconciliation | Idempotent Laravel webhook processor syncing Stripe ledger settlements |
| Deadline & SLA Engine | Laravel Scheduler and Queue jobs tracking statutory notice expirations |
| Role & Access Control | Policy-driven RBAC separating reporters, respondents, and adjudicators |
Engineering Trade-offs & Solutions
| Engineering Challenge | Solution & Trade-off |
|---|---|
| Statutory appeals could invalidate cases if historical edits went untracked | Built an append-only MySQL audit ledger alongside soft-versioned assessments; increases storage footprint slightly in exchange for courtroom-grade procedural provenance. |
| Mixing confidential investigator notes with respondent views risked leaks | Enforced visibility tiers at the Eloquent scope and API serializer layers rather than relying solely on frontend hiding in Vue components. |
| Full SPA rewrite would slow delivery of accessible government-style intake forms | Paired server-rendered Blade + Bootstrap pages with targeted Vue widgets only on high-interaction investigator screens, simplifying validation and SEO/accessibility compliance. |
| Concurrent webhook retries or browser refreshes could double-credit a fine | Keyed payment ledger entries by Stripe PaymentIntent and Webhook Event ID inside unique MySQL constraints so settlement updates execute idempotently. |
Auditability, Security & Compliance
Regulatory systems sit under scrutiny from both regulated businesses and judicial reviewers. Access control follows strict least-privilege RBAC via Laravel Policies: intake clerks cannot alter penalty formulas, investigators cannot erase submitted violation reports, and respondents access only dockets explicitly served to their verified organization.
Evidence integrity relies on server-side MIME inspection, SHA-256 file hashing upon ingestion into Google Cloud Storage, and time-limited signed download links so document URLs cannot be bookmarked or shared publicly. All database connections to Google Cloud SQL enforce TLS encryption, and Stripe cardholder handling remains completely isolated within Stripe-hosted checkout flows, keeping the core application outside PCI card-storage scope.
Workload Throughput & Scale
Enforcement programmes experience cyclical bursts—such as seasonal inspection sweeps or mass statutory renewal deadlines—alongside steady daily docket review. Keeping the Laravel web tier stateless on Google Cloud allows instances to scale horizontally without local session or disk dependencies.
Heavy operations—including PDF notice packet assembly, zip exports of hearing exhibits, and batch reminder emails—run asynchronously via Laravel Queue workers so interactive investigator searches remain snappy. Composite MySQL indexes across docket numbers, entity tax IDs, violation codes, and statutory due dates keep filtered queue views responsive as case archives expand across years of oversight activity.
Operational Outcomes
Replacing manual spreadsheets and ad-hoc payment tracking with a unified regulatory case platform delivered measurable operational discipline across the oversight body:
- Enforced procedural consistency: Every violation follows verified statutory gates from intake to closure, preventing premature enforcement actions or overlooked appeal holds.
- Cohesive hearing preparation: Investigators and legal officers assemble complete, chronologically indexed evidentiary binders in minutes rather than hunting across email archives.
- Automated penalty reconciliation: Direct Stripe settlement hooks eliminate manual bank-statement matching and immediately reflect cleared standing on respondent accounts.
- Defensible oversight records: Complete actor, timestamp, and document-hash trails provide transparent accountability for internal audits and formal administrative reviews.