Skip to content

Brick Inventory ​

A LEGO inventory management system for tracking owned sets, parts, and storage locations. Personal project of the team lead.

Tech Stack ​

  • Backend: Laravel 12 (lego-storage)
  • Frontend: Vue 3 (lego-storage-frontend)
  • Database: PostgreSQL

Architecture Overview ​

The backend follows the same Action pattern as the Kendo — final readonly action classes with a single execute() method, DTOs for type safety, and Form Requests for validation.

The project uses a custom ResourceData base class for API responses instead of Laravel's JsonResource. This pattern provides constructor-promoted readonly properties, automatic serialization, and runtime relation validation. See Unified ResourceData Pattern.

Key Decisions ​

DecisionStatusImpact
Import AtomicityAcceptedPartial imports preserved with honest error reporting
Cascade DeletionAcceptedExplicit deletion, no database cascading
ResourceData PatternAcceptedStandard across both projects
Config Attribute InjectionAccepted#[Config] attribute for all config access

External Integration ​

The application integrates with the Rebrickable API to import LEGO set data. Imports are paginated and can fail mid-pagination — the Import Atomicity decision handles this gracefully with per-page transactions and honest reporting.

Architecture documentation for contributors and collaborators.