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.
- Install Docker Desktop
- Git clone this repository
cp .env.example .env
- Install Composer dependencies
- Add
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
to~/.zshrc
or~/.bashrc
sail up -d
sail artisan key:generate
sail artisan storage:link
sail artisan migrate --seed
sail yarn
sail yarn dev
- App is live at http://localhost/
tests/Unit/Observers/InventoryMovementObserverTest.php
app/Observers/InventoryMovementObserver.php
resources/vue/pages/Home.vue
- Implement the Product model, so we can track inventory of various products
- Use vue-i18n instead of hardcoding texts in the markup
- Extract duplicated markup into small reusable components
sail pint
sail yarn lint:all --fix
sail yarn lint resources/vue/pages/Home.vue
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