aligovro.com
← All work

Case study · Enterprise ERP / CRM

Advertising ERP

An internal ERP and CRM for a holding of advertising businesses. It covers the whole path from a lead to a paid deal, with finance, telephony and a separate workspace for each of 15 roles.

Period
Oct 2025 — present
Role
Sole engineer
Team
Solo, working directly with department heads
user roles, each with its own workspace
15
automated tests
1,800+
API routes
210+
data models
60

Context

What it is

The holding sells outdoor and digital advertising through several businesses. Sales, procurement, legal, accounting and management all work on the same deals, and before this system they did it in a tool that no longer fit how the company operates.

I designed and built the replacement alone and moved the real data over from the previous system. It is an internal product, so there is no public link; the details below are described without client data.

Problem

What made it hard

  • 01

    Fifteen roles look at the same deal and each must see a different part of it, from a sales manager's own clients to the accountant's payments.

  • 02

    Several businesses share one installation and must never see each other's clients, deals or money.

  • 03

    Money rules are strict: approvals with a quorum, budget thresholds, document numbering per business, commissions and manager payouts.

  • 04

    Phone calls are part of the sales process and had to land in the right client card without anyone entering them by hand.

Architecture

How it is built

Controllers are thin. Each business operation is a single-purpose action class (about 80 of them), lists and counters are separate query objects, and every major entity has its own access policy. That keeps a rule such as who may approve a media plan in one place.

The business a user works in is resolved once per request and applied as a scope on the models, so isolation does not depend on each query remembering a filter. Workflow rules, approval quorums and document statuses live in configuration, which lets the company change a rule without a code change.

Engineering

Decisions worth a closer look

Tenant isolation that is tested

A dedicated test suite logs in as users of one business and tries to reach the data of another through every list, card and export. Isolation is a tested property of the system, checked on every push.

Approval workflow

A media plan goes from procurement to management and then to the client. Approval needs a quorum of managers and depends on a budget threshold, and both numbers are configured per business.

Finance module

Invoices, acts and payments with configurable numbering, supplier costs, commissions, manager payouts, payroll and cash-flow reports with spreadsheet export.

Telephony inside the CRM

Calls from the cloud phone system are imported every five minutes, matched to clients automatically, and their recordings are stored and later purged by a retention rule.

Document previews

Office files are converted to previews in a background queue. The converter sits behind an interface with a fake implementation, so the pipeline is covered by tests without the real converter.

A workspace per role

Every role has its own dashboard metrics, menu with live counters and visibility rules, and notifications arrive in real time over private WebSocket channels.

Toolbox

Stack

Backend
PHP 8 · Laravel 12 · MySQL · queues & scheduler · Laravel Reverb (WebSockets) · role and permission management · OpenAPI spec
Frontend
React 19 · TypeScript · Inertia.js · Tailwind CSS 4 · Radix UI · typed routes generated from the backend
Quality & ops
PHPUnit (1,800+ tests) · GitHub Actions (lint and tests) · staging and production environments · scripted deploys · S3-compatible file storage

Outcome

Where it stands

  • The system is in daily use across the holding's departments, with real data migrated from the previous tool.
  • It was built in about nine months by one engineer, with more than 860 commits.
  • New rules from the business usually land as configuration or one new action class, not as a rewrite of existing screens.