How dodiar/it-inventory works
IT Inventory is a Laravel API-first backend for managing IT inventory and assets. The documented user flow is an API client calling versioned endpoints; the sampled implementation shows authentication validating credentials, issuing or revoking a token, and returning user data. The domain model covers item and location catalogs, stock balances and movements, and individually tracked assets with assignments, movements, maintenance, and retirement. MySQL is documented as the database. CRUD routes and most domain handlers were not sampled, so those capabilities are represented as model subsystems without guessed controller flows.
Main entry points: Asset.php Assets · Item.php Items · Location.php Locations · AuthController.php Authentication
Components 22
API and authentication
- API routes
backend/routes/api.php - Authentication
backend/app/Http/Controllers/Api/V1/AuthController.php - Login validation
backend/app/Http/Requests/LoginRequest.php - User response
backend/app/Http/Resources/UserResource.php - Roles
backend/app/Models/Role.php - Users
backend/app/Models/User.php - Active-user check
backend/app/Http/Middleware/EnsureUserIsActive.php - Application routing
backend/bootstrap/app.php
Inventory catalog
- Categories
backend/app/Models/Category.php - Units
backend/app/Models/Unit.php - Items
backend/app/Models/Item.php - Locations
backend/app/Models/Location.php - Employees
backend/app/Models/Employee.php
Stock operations
- Stock balances
backend/app/Models/StockBalance.php - Stock movements
backend/app/Models/StockMovement.php
Asset lifecycle
- Assets
backend/app/Models/Asset.php - Assignments
backend/app/Models/AssetAssignment.php - Asset movements
backend/app/Models/AssetMovement.php - Maintenance tickets
backend/app/Models/MaintenanceTicket.php - Asset retirement
backend/app/Models/AssetRetirement.php
Other components
- API client
- MySQL database
Connections 28
- API client → API routes: calls API
README.md - API routes → Authentication: routes auth
backend/routes/api.php - Authentication → Login validation: validates with
backend/app/Http/Controllers/Api/V1/AuthController.php - Authentication → Users: loads and updates
backend/app/Http/Controllers/Api/V1/AuthController.php - Authentication → User response: returns user
backend/app/Http/Controllers/Api/V1/AuthController.php - User response → Roles: serializes role
backend/app/Http/Resources/UserResource.php - Users → Roles: belongs to
backend/app/Models/User.php - Application routing → API routes: registers routes
backend/bootstrap/app.php - Application routing → Active-user check: aliases middleware
backend/bootstrap/app.php - Items → Categories: belongs to
backend/app/Models/Item.php - Items → Units: belongs to
backend/app/Models/Item.php - Items → Assets: has assets
backend/app/Models/Item.php - Items → Stock balances: has balances
backend/app/Models/Item.php - Items → Stock movements: has movements
backend/app/Models/Item.php - Locations → Assets: has assets
backend/app/Models/Location.php - Locations → Stock balances: has balances
backend/app/Models/Location.php - Stock movements → Items: references item
backend/app/Models/StockMovement.php - Stock movements → Locations: references location
backend/app/Models/StockMovement.php - Assets → Items: belongs to
backend/app/Models/Asset.php - Assets → Locations: belongs to
backend/app/Models/Asset.php - Assets → Assignments: has assignments
backend/app/Models/Asset.php - Assets → Asset movements: has movements
backend/app/Models/Asset.php - Assets → Maintenance tickets: has tickets
backend/app/Models/Asset.php - Assets → Asset retirement: has retirement
backend/app/Models/Asset.php - Assignments → Employees: references employee
backend/app/Models/AssetAssignment.php - Asset movements → Locations: references location
backend/app/Models/AssetMovement.php - MySQL database → Items: stores records
- MySQL database → Assets: stores records