Skip to content
> gerardo.dev
2026Fullstack Developer

Real Estate Lead Management

Real-estate lead tracking module with a metrics dashboard resolved in a single aggregation query.

AngularTypeScriptNode.jsExpressMongoDBPlaywrightDocker
Sign-in, with the demo credentials in plain sight
Lead tracking: metrics, filters by status, source and project, and the prospects table
Adding a lead from a dialog form, without leaving the dashboard

Sign-in, with the demo credentials in plain sight

1 / 3

Problem

The risk was in the dashboard: resolving its metrics with separate queries means six round trips to the database and, worse, six snapshots taken at different moments.

Solution

The dashboard resolves in a single $facet aggregation stage, and validation is layered: at the API and on the database itself.

  • Groupings share a function-generated subpipeline, so adding a new breakdown is one line.
  • Indexes live in migrations with autoIndex off, following ESR: no in-memory sort.
  • Strict Zod at the API closes mass assignment and Mongo operator injection.
  • $jsonSchema on the database, so a script cannot insert invalid data either.

Outcome

Module delivered, tested and documented.

  • Playwright E2E tests and a green SonarCloud quality gate.
  • Written technical analysis: data model and an incident diagnosis.
  • The same analysis covers the AWS architecture and the migration plan.
Read the full story1 min read
Problem
The module needed a filtered, paginated list, status changes, lead creation and a metrics dashboard. The risk was in the dashboard: resolving total, average budget, reserved leads, conversion rate and three breakdowns with separate queries means six round trips to the database and, worse, six snapshots taken at different moments.
Solution
The dashboard resolves in a single $facet aggregation stage, and the groupings share a function-generated subpipeline, so adding a new breakdown is one line. Indexes live in migrations rather than the schema, with autoIndex off, following the ESR pattern so the screen's real query is served without an in-memory sort. Validation is layered: strict Zod at the API, which closes mass assignment and Mongo operator injection at once, plus $jsonSchema on the database itself, so a script or a direct connection cannot insert invalid data either.
Outcome
Delivered with Playwright E2E tests, a green SonarCloud quality gate and a written technical analysis covering the data model, an incident diagnosis, the AWS architecture and the migration plan.