Skip to content
Mauricio Pereira BragaFull stack developer
All work

Categoriza Brasil

An ecosystem for food-service health ratings, connecting public information, establishments and institutional management.

Visit platform

Role
Full stack development
Period
Since 2023
Type
Public platform
Categoriza Brasil home page showing the A, B and C health quality seals

The problem

Health ratings for bars, restaurants and bakeries needed to move off paper and become public, searchable information, without losing institutional control over who issues and maintains each seal.

Requirements

Functional

  • Register establishments with an A, B or C seal, category, address, coordinates, contact, inspection date and cover photo.
  • Fill in the record from a Google Places search and adjust the position by dragging the map marker.
  • Show the public a map of published establishments, with marker clustering.
  • Publish news with galleries, publications and institutional pages from the admin panel.
  • Organize media in folders, with files on S3 storage.
  • Run a newsletter with one-click unsubscribe.
  • Create accounts with email verification by PIN, with admin-panel access granted by an administrator.

Non-functional

  • Keep each domain in its own module inside a single monolith.
  • Apply CSP, rate limiting on login and sign-up, and upload validation by file content.
  • Log admin actions with user, action, target and IP.
  • Refuse to boot against an unmigrated database and block destructive commands outside the local environment.

My contribution

I built the platform as a modular Laravel monolith with six separate domains (public site, admin panel, identity, accounts, application clients and the institutional area). Its centerpiece is establishment registration wired to the Google Places API. Autocomplete search fills in the name, an address split into fields, coordinates, phone, website and a cover photo, and maps Google's categories onto the platform's health categories. Dragging the map marker triggers reverse geocoding. The first version of the interface used Vue with Pinia, and I migrated all of it to Livewire 4, which removed about 2,000 lines and left the application on a single stack. I also built the publications and media CMS with S3 storage, the public map with Leaflet clustering and the security layer, with CSP, rate limiting on login and sign-up, uploads validated by file content, email verification by PIN and a log of admin actions. In production, the app refuses to boot against a database without migrations and blocks commands that would wipe a non-local database.

Project highlights

  • 6domains in one monolith
  • 1 searchfills in the establishment record
  • −2,000lines from moving Vue to Livewire

Technologies

Laravel 12, Livewire 4, Alpine.js, PostgreSQL, Google Places API, Leaflet, Tailwind CSS, S3, Docker

Data model

Establishments, news, publications, pages and media record who created them, and the audit log stores the user's id and name without a foreign key, so the entry remains even if the account is deleted.
Establishments, news, publications, pages and media record who created them, and the audit log stores the user's id and name without a foreign key, so the entry remains even if the account is deleted.

Inside the product

The georeferenced map with clustering, filters by seal and location, and a list kept in sync with the viewport.
The georeferenced map with clustering, filters by seal and location, and a list kept in sync with the viewport.