NsInventory

Enhanced Inventory Management System with Lab Assets

A comprehensive Laravel-based inventory management system that combines traditional product/donation management with advanced lab asset tracking and AI-powered photo scanning capabilities.

🚀 Features

Traditional Inventory Management

Lab Assets Management (NEW)

🛠️ Technology Stack

📦 Installation

Prerequisites

Setup Steps

  1. Clone the repository
    git clone https://github.com/yourusername/enhanced-inventory-system.git
    cd enhanced-inventory-system
    
  2. Install dependencies
    composer install
    npm install
    
  3. Environment configuration
    cp .env.example .env
    php artisan key:generate
    
  4. Configure your .env file ```env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_username DB_PASSWORD=your_password

OpenAI API for photo scanning

OPENAI_API_KEY=your_openai_api_key_here OPENAI_API_BASE=https://api.openai.com/v1

Queue configuration (recommended)

QUEUE_CONNECTION=database


5. **Database setup**
```bash
php artisan migrate
php artisan db:seed
  1. Storage setup
    php artisan storage:link
    
  2. Build assets
    npm run build
    
  3. Start the application
    php artisan serve
    

🎯 Usage

Traditional Inventory

Lab Assets

  1. Navigate to Lab Assets → Photo Scanning
  2. 4-Step Scanning Process:
    • Step 1: Device overview photo
    • Step 2: Serial numbers and labels
    • Step 3: Components and accessories
    • Step 4: Review AI-extracted information and save
  3. Asset Management:
    • View all assets with search and filtering
    • Track assignments, locations, and conditions
    • Monitor missing components and maintenance schedules

🔧 Configuration

For better performance with photo processing:

# Create queue table
php artisan queue:table
php artisan migrate

# Run queue worker
php artisan queue:work

OpenAI API Setup

  1. Get an API key from OpenAI
  2. Add to your .env file: OPENAI_API_KEY=your_key_here
  3. Ensure you have sufficient API credits for photo processing

📱 Mobile Usage

The photo scanning interface is optimized for mobile devices:

🔒 Security

📊 API Endpoints

Lab Assets API

GET    /lab-assets              # List all assets
GET    /lab-assets/dashboard    # Dashboard data
POST   /lab-assets              # Create new asset
GET    /lab-assets/{id}         # View asset details
PUT    /lab-assets/{id}         # Update asset
DELETE /lab-assets/{id}         # Delete asset

Scanning API

POST   /api/scanning/start      # Start scanning session
POST   /api/scanning/upload     # Upload photo for processing
GET    /api/scanning/session/{id} # Get session status
POST   /api/scanning/session/{id}/complete # Complete session

🚀 Deployment

Production Deployment

  1. Set APP_ENV=production in .env
  2. Configure proper database credentials
  3. Set up queue workers with supervisor
  4. Configure web server (Apache/Nginx)
  5. Set up SSL certificates
  6. Configure file storage (S3 recommended for production)

Docker Deployment

docker-compose up -d

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

Common Issues

Getting Help

🎉 Features Showcase

AI Photo Processing

Comprehensive Asset Management

Unified Interface


Built with ❤️ for efficient inventory and lab asset management