An open API service indexing awesome lists of open source software.

https://github.com/prateekbhujel/wms

Warehouse management system for small store. Single Vendor.
https://github.com/prateekbhujel/wms

bootstrap inventrory laravel php warehouse

Last synced: about 1 month ago
JSON representation

Warehouse management system for small store. Single Vendor.

Awesome Lists containing this project

README

          

# WMS

WMS is an API-first Laravel + React warehouse management system built for source-code sale, agency customization, and shared-hosting deployment.

## Stack

- Laravel 10
- React 18
- Vite
- MySQL/MariaDB
- First-party JWT bearer tokens with logout revocation
- OpenAPI JSON endpoint
- Shared-hosting friendly build

## Features

- Token login and role-aware permissions
- Enterprise backend boundaries: DTOs, FormRequests, Resources, Services, Repositories, and repository interfaces
- Modular React frontend structure under `resources/js/core` and `resources/js/modules`
- Owner, warehouse manager, and picker roles
- Warehouse, zone, rack, shelf, and bin setup
- Scannable bin barcodes
- Product SKU and barcode catalogue
- Supplier and customer records
- Bin-level inventory balances
- Receive, transfer, pick, and adjustment stock movements
- Insufficient-stock protection during movement posting
- Barcode/SKU scan endpoint and UI
- Smart putaway suggestions by bin capacity, same-SKU consolidation, warehouse, and zone
- Wave and batch picking plan generator
- Packing verification with carrier/tracking fields and shipment label payload
- Full activity audit trail for stock, order, and shipment events
- Low stock dashboard
- Recent movement activity
- Inbound order creation and one-click receiving
- Outbound order creation and one-click picking
- Cycle counts with variance posting
- Master data create/update/archive APIs
- Accounting ledger posting for receives, picks, and adjustments
- Trial balance, stock valuation, bin occupancy, and order backlog reports
- CSV import preview, validation, staging, and commit flow
- CSV report export payloads
- Printable barcode label payloads for products and bins
- Subdirectory-aware frontend API base path for XAMPP/shared-hosting installs
- Modular DTO/service/repository/controller structure for buyer customization
- Swagger UI at `/api-docs`
- OpenAPI spec at `/api/openapi.json` and `/docs/api-docs.json`

## Demo Login

```text
Email: admin@wms.test
Password: password
```

## Local Setup

```bash
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
npm run build
php artisan serve
```

Open `http://127.0.0.1:8000/app`.

For XAMPP or shared hosting subdirectory installs, open `http://localhost/wms/app`. The frontend reads the current base path automatically, so API calls work under `/wms`, root domain hosting, and `php artisan serve`.

## Development

```bash
npm run dev
php artisan serve
```

## Tests

```bash
composer validate --strict
composer audit --no-interaction
npm audit --omit=dev
php artisan test
npm run build
php artisan module:doctor --openapi
php artisan app:doctor
```

## Hardening Checks

WMS includes a deployment safety surface for packaging, selling, and shared-hosting deployment:

- `php artisan module:doctor --openapi` verifies enabled modules, DTO/service/repository folders, repository interface bindings, providers, route files, and OpenAPI route coverage.
- `php artisan app:doctor` checks app key, debug posture, URL, writable Laravel paths, storage link, built assets, and JWT secret readiness.
- `php artisan jwt:token admin@wms.test --days=1` creates a short-lived bearer token for API testing.

CI runs these checks after the API tests and frontend build, so architecture drift and undocumented API routes fail before packaging or deployment.

## Deployment

- Set `APP_ENV=production` and `APP_DEBUG=false`.
- Set a dedicated `WMS_JWT_SECRET` with at least 32 characters.
- Configure MySQL credentials.
- Build assets with `npm run build`.
- Upload the Laravel project and built `public/build` assets.
- Run `php artisan migrate --force --seed` for a fresh demo or `php artisan migrate --force` for an existing install.
- Run `php artisan app:doctor --strict` before publishing the install.
- The included root `.htaccess` rewrites shared-hosting traffic to `public/` and preserves auth headers for Sanctum bearer tokens.
- Keep `.env`, backups, logs, and database dumps private.

## GitHub CI/CD

The workflow at `.github/workflows/ci.yml` runs Composer validation/audit, npm audit, API tests, the Vite build, module/OpenAPI checks, and deployment readiness checks.

SSH deploy is disabled by default. To enable it, set repository variable `ENABLE_SSH_DEPLOY=true` and add these repository secrets:

- `SSH_HOST`
- `SSH_USER`
- `SSH_KEY`
- `SSH_PATH`

The deploy job pulls the repository on the server, installs production dependencies, builds assets, clears stale Laravel caches, runs migrations, refreshes the storage link, and caches config/routes/views.