Skip to content
N1
Laravel · API · product catalog

A product catalog REST API with flexible attributes

Client: Personal project Category: Laravel Stack: Laravel, PHP 8.2+, PostgreSQL/MySQL/SQLite, PHPUnit, GitHub Actions Timeline: 1 week
Problem

A compact product catalog REST API was needed with fully dynamic attributes — no fixed field schema — and flexible filtering by several values at once.

Constraints

The attribute set had to change with no migration for every new field, and filtering had to work correctly with multi-select values, including Unicode strings in query parameters.

What I did
  • An EAV schema: products, attributes and their values — with no fixed field set
  • Filtering via nested queries with support for multi-select values
  • Caching the available-filters lookup with auto-invalidation on data changes
  • Localized API responses (ru/en) via middleware
  • CI: tests on PostgreSQL, static analysis, style checks and a dependency security audit on every push
Architecture
REST API EAV model (products/attributes/values) Filter cache CI/CD
Result

A working API with a flexible data model, reproducible on SQLite/MySQL/PostgreSQL with no extra setup, with automatic quality and security checks on every code change.

What can be reused
EAV schema with multi-value filtering Self-invalidating filter-lookup cache CI setup: tests + static analysis + security audit