Skip to content
$ cd ../projects

// case study · Open source · Apr 2025

Stock & Sales Management API

A Laravel API for a retail business with a central warehouse and several branches, covering stock, transfers, customers and multi-item sales.

Laravel 12PHPMySQLPassport (OAuth2)Postman
View source on GitHub ↗
my role
Sole developer
the problem
A shop chain needed to track stock in a central warehouse and in each branch, move items from warehouse to branches, and record sales per branch.

What I built

  • Item categories, items, branches and customers management.
  • Warehouse stock and per-branch stock levels.
  • Transfers from the warehouse to branches, with multiple items per transfer.
  • Sales with multiple items per sale, retrievable per branch or across all branches.
  • OAuth2 token authentication with Laravel Passport.
  • A shared Postman collection for testing every endpoint, plus feature tests for the branch API.

Outcomes

  • Complete stock flow from warehouse to branch to sale in one API.
  • Hands-on experience with OAuth2 and relational stock modelling.