Skip to content

albertpratomo/inventory-manager

Repository files navigation

Inventory Manager

image

This is a simple web app to manage inventory, you can preview it here. User can purchase (add) or apply (remove) inventory. The applied inventory will be taken from the oldest available (first-in-first-out). User can also see the total available quantity and its economical valuation. The tech stack used: Laravel, Inertia, Vue 3, Vite, Typescript, Bootstrap 5.

Getting Started

  1. Install Docker Desktop
  2. Git clone this repository
  3. cp .env.example .env
  4. Install Composer dependencies
  5. Add alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail' to ~/.zshrc or ~/.bashrc
  6. sail up -d
  7. sail artisan key:generate
  8. sail artisan storage:link
  9. sail artisan migrate --seed
  10. sail yarn
  11. sail yarn dev
  12. App is live at http://localhost/

Important Files

  1. tests/Unit/Observers/InventoryMovementObserverTest.php
  2. app/Observers/InventoryMovementObserver.php
  3. resources/vue/pages/Home.vue

Refactor List

  1. Implement the Product model, so we can track inventory of various products
  2. Use vue-i18n instead of hardcoding texts in the markup
  3. Extract duplicated markup into small reusable components

Linting

sail pint

sail yarn lint:all --fix
sail yarn lint resources/vue/pages/Home.vue

Testing

sail test
sail test tests/Feature/Pages/HomeTest.php
sail test tests/Feature/Pages/HomeTest.php --filter=user_can_view_home_page
sail test -d --update-snapshots

About

A Laravel-Inertia-Vue app about managing inventory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published