Deployment Guide
This guide covers comprehensive deployment instructions for the Inventory Management API, including production deployment, development setup, and local testing environments.
Table of Contents
- TOC
Overview
The Inventory Management API can be deployed in several configurations:
- π Production Deployment - Windows Server with Apache/Nginx and MariaDB
- π» Development Environment - Local development with PHP artisan serve and Vite
- π§ͺ Testing Environment - Local testing with SQLite database
Quick Start
Development Environment
# Clone the repository
git clone https://github.com/metanull/inventory-app.git
cd inventory-app
# Install dependencies
composer install
npm install
# Setup environment
cp .env.example .env
php artisan key:generate
# Start development servers
composer dev-start
Production Deployment
# Use the automated deployment script
.\deployment\deploy-windows.ps1 -Domain "your-domain.com"
Architecture Overview
The application follows a modern N-tier architecture:
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Web Server β β Laravel API β β Database β
β (Apache/Nginx) βββββΊβ Application βββββΊβ (MariaDB) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
Static Assets Business Logic Data Storage
Vue.js Frontend REST API Endpoints Inventory Data
Image Files Authentication Audit Logs
Technology Stack
Component | Technology | Version | Purpose |
---|---|---|---|
Backend | PHP Laravel | 12+ | REST API Framework |
Frontend | Vue.js | 3+ | Single Page Application |
Database | MariaDB | 10.5+ | Production Database |
Web Server | Apache/Nginx | 2.4+/1.18+ | HTTP Server |
Build Tool | Vite | 7+ | Asset Compilation |
Package Manager | Composer/NPM | Latest | Dependency Management |
Security Considerations
- β Authentication - Laravel Sanctum token-based authentication
- β Authorization - Role-based access control
- β HTTPS - SSL/TLS encryption for all communications
- β CSRF Protection - Cross-site request forgery protection
- β Input Validation - Comprehensive request validation
- β SQL Injection Prevention - Eloquent ORM with prepared statements
- β Security Headers - HSTS, CSP, and other security headers
Performance Optimization
- β‘ Caching - Redis/File-based caching for API responses
- β‘ Asset Optimization - Minified and compressed CSS/JS
- β‘ Database Indexing - Optimized database queries
- β‘ Image Optimization - Compressed images with Laravel Intervention
- β‘ CDN Ready - Static assets can be served via CDN
Next Steps
- π Production Deployment - Complete production setup guide
- π» Development Setup - Local development environment
- π§ Configuration - Environment and application configuration
- π Server Configuration - Web server setup guides