Back to portfolio
WebappStudy / personal

Flower Shop ERP

Laravel + Livewire application for managing a flower shop's inventory, with products, quantities, supplier, cost and sale price, unit profit, expiration dates, images, and CRUD operations in a reactive interface.

Flower Shop ERP

Core stack

PHP 8.2
Laravel 12
Eloquent ORM
Livewire 3
Livewire VoltLaravel BreezeBladeTailwind CSSAlpine.jsSQLiteLaravel StorageVite 6AxiosPHPUnit 11

The challenge

The challenge demonstrated by the code is modeling a stock of perishable products in a simple internal interface, where the operator needs to see quantity, cost, price, supplier, and expiration date at the same time and be able to quickly update the data without a separate SPA frontend.

The solution

The solution uses Laravel 12 with Eloquent and a Livewire component for the entire CRUD flow. Search, sorting, and pagination run server-side, validation is centralized in the Livewire actions, images are managed through Laravel Storage, and Blade + Tailwind provide a responsive interface with dark mode. The FlowerProduct model keeps the operational data and calculates unit profit directly from cost and price.

Notable complexity

ERP Florărie is a study project built as a foundation for digitizing a flower shop's internal operations. The analyzed snapshot does not yet represent a complete ERP: the implemented part is a coherent catalog and stock module, where an authenticated user can search, sort, add, edit, and delete products from the same Livewire interface.

The FlowerProduct model keeps the name, description, category, quantity, purchase cost, sale price, stock-entry date, expiration date, supplier as a text attribute, image, and active/inactive state. Eloquent applies casts for dates, booleans, and prices, and the model includes methods for checking stock, expiration, and calculating unit profit. The current interface directly displays profit as the difference between the sale price and the purchase cost.

The main flow is implemented in a classic Livewire component, FlowerProductsTable. The search runs in the database by name, category, or supplier, results are paginated at 10 per page, and can be sorted by the main columns. The add and edit forms validate fields before persisting, and images are validated as image files of up to 1 MB and saved to the public disk. When a product is replaced or deleted, the application also removes the old image when it exists.

The frontend uses Blade, Livewire, and Tailwind CSS, with a responsive layout, CRUD modals, desktop/mobile navigation, and dark mode kept in localStorage. Livewire interactions remove the need for a separate SPA: form state, search, sorting, and pagination are handled server-side, and Alpine is used in interface components and for behaviors such as menus and the theme.

Authentication and the profile come mostly from the Laravel Breeze + Livewire Volt scaffolding: registration, login, password reset, email verification, profile update, and logout. Login is protected by rate limiting, but the Flower Products module only requires authentication, not a verified email. The repository defines no roles, policies, or product-level ownership, so any authenticated account can operate on the entire catalog. For a public deployment, open registration and the lack of granular authorization should be restricted.

From a data standpoint, the application defaults to SQLite and has a single domain table for flower_products, with no relations to separate supplier, order, or recipe tables. There are no dedicated indexes for the search/sort fields, no duplicate constraints, no transactions in the CRUD flows, no locking, and no audit mechanisms. Pagination limits the volume transferred to the UI, and the simple model avoids N+1 issues in its current form, but wildcard searches and the lack of indexes should be revisited before a large data volume.

The Laravel configuration includes standard infrastructure for queue, cache, mail, and S3, but the repository contains no jobs, business workers, active cloud integration, webhooks, payments, SMS, analytics, AI, or external APIs. There is a Laravel health endpoint at /up and a custom Artisan command that creates the storage symlink and the public directory for product images.

The available Git history contains a single portfolio-backup commit, so it does not provide enough of a timeline to demonstrate who implemented each stage or whether the project was greenfield. What can be clearly separated in the snapshot is the Laravel/Breeze/Volt scaffolding from the custom domain logic: the FlowerProduct model and migration, the Livewire component and admin table, the product seed, the dedicated route, the navigation integration, and the storage command. The legacy draft described a broader ERP target with orders, suppliers, reports, and expiration alerts; these are treated only as an evolution direction, not as implemented features.

Key results

  • Functional flower-product administration module with create, edit, and delete
  • Paginated catalog with search by name, category, or supplier and sorting by the main columns
  • Tracking for quantity, purchase cost, sale price, entry date, expiration, supplier, and active status
  • Unit profit calculation exposed in the operational table
  • Image upload with validation, form preview, and cleanup of the old file on replacement or deletion
  • Authentication, registration, password reset, email verification, and profile via Laravel Breeze/Volt scaffolding
  • Login protected by rate limiting
  • Responsive interface with Livewire modals and persistent dark mode
  • Demo data for products and an Artisan command to prepare public storage
  • Laravel health endpoint available at /up

Related projects

Want something similar?

Start with the estimate wizard — answer a few questions and get a realistic price range and timeline.