Skip to content

ManoRobotic/ruby-wms-boilerplate

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏭 WMS (Warehouse Management System) - Rails Application

A comprehensive warehouse management system built with Rails 8 for complete inventory and fulfillment operations

Rails Ruby Docker Security

🎯 What is this project?

This is a complete Warehouse Management System (WMS) designed to help you manage inventory, fulfillment, and warehouse operations efficiently. It includes all essential features for professional warehouse management, from multi-location inventory tracking to pick list optimization.

⚑ Why use this WMS?

  • πŸš€ 5-minute setup - Uses Docker and devcontainers for development without complex configurations
  • πŸ“¦ Multi-warehouse - Support for multiple warehouses, zones, and locations
  • πŸ“Š Real-time tracking - Complete inventory transaction audit trail
  • 🎯 Pick optimization - Intelligent pick list generation and route optimization
  • πŸ“± Responsive - Modern design with Tailwind CSS for mobile warehouse operations
  • πŸ” Secure - Complete admin panel with role-based access
  • πŸ“ˆ Analytics - Comprehensive WMS dashboard with KPIs and alerts
  • βœ… Tested - Complete test suite with RSpec and security scanning

🏭 Main WMS Features

Warehouse Management

  • 🏒 Multi-warehouse support with hierarchical organization
  • πŸ—οΈ Zone management (receiving, storage, picking, packing, shipping)
  • πŸ“ Location tracking with coordinate system and capacity management
  • πŸ“Š Utilization monitoring with real-time capacity alerts
  • 🎯 Location optimization for efficient space usage

Inventory Management

  • πŸ“¦ Multi-location inventory with real-time tracking
  • 🏷️ Batch/lot tracking with expiry date management
  • πŸ“ˆ Stock reservations and allocation management
  • βš–οΈ FIFO/LIFO/FEFO inventory allocation methods
  • πŸ”„ Inventory transactions with complete audit trail
  • πŸ“‹ Cycle counting for inventory accuracy
  • ⚠️ Low stock alerts and automatic replenishment

Order Fulfillment

  • πŸ“‹ Pick list generation with route optimization
  • 🎯 Task management (putaway, picking, replenishment, cycle count)
  • πŸ“¦ Order processing with warehouse assignment
  • 🚚 Shipment tracking and fulfillment status
  • ⏱️ Performance metrics and completion time tracking

Analytics & Reporting

  • πŸ“Š Real-time dashboard with WMS KPIs
  • πŸ“ˆ Inventory valuation and movement reports
  • 🎯 Task performance and productivity metrics
  • πŸ“¦ Pick list efficiency and route optimization
  • ⚠️ Alert system for exceptions and low stock

Technical Architecture

  • πŸš€ Rails 8.0.2 with latest improvements and performance optimizations
  • 🐘 PostgreSQL with comprehensive indexing for WMS operations
  • ⚑ Stimulus + Turbo for real-time warehouse operations
  • 🎨 Tailwind CSS with responsive design for mobile warehouse operations
  • πŸ”„ Background jobs (Sidekiq) for inventory synchronization and optimization
  • πŸ—οΈ Service objects for complex WMS business logic
  • 🐳 Docker with devcontainers for consistent development
  • πŸ§ͺ RSpec comprehensive test suite with 289 examples
  • πŸ”’ Brakeman security scanning (0 vulnerabilities)
  • πŸ“Š Performance monitoring with 35+ database indexes

πŸš€ Quick Start

1. Prerequisites

# Install Docker
https://www.docker.com/

# Install Devcontainers CLI
npm install -g @devcontainers/cli
# or with npx
npx install -g @devcontainers/cli

2. Clone and run

# Clone the repository
git clone https://github.com/AlanAlvarez21/ruby-wms-boilerplate.git
cd ruby-wms-boilerplate

# Build the container (includes DB setup)
bin/build_container

# Seed the database with sample data
bin/rails db:seed

# Start the application
bin/dev

3. Ready! πŸŽ‰

  • WMS Dashboard: http://localhost:3000/admin
  • System Users:
    • Admin: admin@wmsapp.com / password123 (Full system access)
    • Operador: operador@wmsapp.com / password123 (Production Orders + Products + Manual Printing)
    • Supervisor: supervisor@wmsapp.com / password123 (Warehouse management)
    • Picker: picker@wmsapp.com / password123 (Task execution)
  • Sample Data Includes:
    • 2 Warehouses with 10 zones and 90 locations
    • 15 Products with WMS fields (SKU, dimensions, reorder points)
    • 4 System users with different roles and permissions
    • 10 Sample tasks (picking, putaway, replenishment, cycle count)
    • Inventory transactions and movement history

πŸ“ WMS Project Structure

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ admin/
β”‚   β”‚   β”‚   β”œβ”€β”€ warehouses_controller.rb      # Warehouse management
β”‚   β”‚   β”‚   β”œβ”€β”€ zones_controller.rb           # Zone management
β”‚   β”‚   β”‚   β”œβ”€β”€ locations_controller.rb       # Location management
β”‚   β”‚   β”‚   β”œβ”€β”€ tasks_controller.rb           # Task assignment & tracking
β”‚   β”‚   β”‚   β”œβ”€β”€ pick_lists_controller.rb      # Pick list management
β”‚   β”‚   β”‚   β”œβ”€β”€ inventory_transactions_controller.rb
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── admin_controller.rb       # WMS Dashboard
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ warehouse.rb              # Multi-warehouse support
β”‚   β”‚   β”œβ”€β”€ zone.rb                   # Zone management (receiving, storage, etc.)
β”‚   β”‚   β”œβ”€β”€ location.rb               # Location tracking with coordinates
β”‚   β”‚   β”œβ”€β”€ task.rb                   # Task management system
β”‚   β”‚   β”œβ”€β”€ pick_list.rb              # Pick list optimization
β”‚   β”‚   β”œβ”€β”€ pick_list_item.rb         # Individual pick items
β”‚   β”‚   β”œβ”€β”€ inventory_transaction.rb  # Inventory audit trail
β”‚   β”‚   β”œβ”€β”€ product.rb                # Enhanced with WMS fields
β”‚   β”‚   β”œβ”€β”€ stock.rb                  # Multi-location inventory
β”‚   β”‚   β”œβ”€β”€ order.rb                  # Warehouse fulfillment
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ inventory_service.rb      # Stock allocation & movement
β”‚   β”‚   └── pick_list_service.rb      # Route optimization
β”‚   β”œβ”€β”€ jobs/
β”‚   β”‚   β”œβ”€β”€ inventory_sync_job.rb     # Background inventory sync
β”‚   β”‚   └── pick_list_optimization_job.rb
β”‚   β”œβ”€β”€ helpers/
β”‚   β”‚   └── wms_helper.rb             # WMS-specific view helpers
β”‚   └── views/
β”‚       └── admin/                    # WMS admin interface
β”œβ”€β”€ db/
β”‚   β”œβ”€β”€ migrate/                      # 15 WMS-specific migrations
β”‚   └── seeds.rb                      # Complete WMS sample data
└── spec/                             # Comprehensive test suite

🏭 WMS Configuration

1. Environment Variables

# Database configuration
export DATABASE_URL="postgresql://user:password@localhost:5432/wms_development"

# Rails configuration  
export RAILS_ENV="development"

# Background job processing
export REDIS_URL="redis://localhost:6379"

2. Warehouse Setup

The system comes with sample warehouses, but you can customize:

# In db/seeds.rb or through admin interface
warehouse = Warehouse.create!(
  name: "Main Distribution Center",
  code: "MDC",
  address: "123 Warehouse St, City, State"
)

# Add zones
receiving_zone = warehouse.zones.create!(
  name: "Receiving",
  code: "RCV",
  zone_type: "receiving"
)

# Add locations
receiving_zone.locations.create!(
  aisle: "A",
  bay: "01", 
  level: "01",
  capacity: 1000
)

πŸ› οΈ Development Commands

# Development
bin/dev                     # Server + Tailwind watcher
bin/rails server            # Rails server only
bin/rails tailwindcss:watch # Tailwind watcher only

# Database
bin/rails db:create         # Create database
bin/rails db:migrate        # Run migrations
bin/rails db:seed           # Seed with sample data
bin/rails db:reset          # Reset and seed

# Testing
bundle exec rspec           # Run tests (289 examples)
bin/brakeman               # Security analysis (0 vulnerabilities)
bin/rubocop                # Code linting

# WMS Operations
# (Sidekiq jobs removed - using ActiveJob inline adapter)

# Assets
bin/rails assets:precompile # Compile assets for production
bin/rails tailwindcss:build # Build Tailwind CSS

🎨 WMS Customization

1. Warehouse Layout Customization

# Configure zone types for your operation
Zone::ZONE_TYPES = %w[receiving storage picking packing shipping returns]

# Customize location coordinate system
Location.create!(
  zone: zone,
  aisle: "A",      # Aisle identifier
  bay: "01",       # Bay number within aisle  
  level: "01",     # Level/shelf within bay
  capacity: 1000   # Weight or volume capacity
)

2. Inventory Allocation Methods

# In app/services/inventory_service.rb
# Customize allocation strategy
ALLOCATION_METHODS = {
  fifo: -> { order(:created_at) },           # First In, First Out
  lifo: -> { order(created_at: :desc) },     # Last In, First Out  
  fefo: -> { order(:expiry_date) }           # First Expired, First Out
}

3. Task Types and Priorities

# Customize task types for your warehouse operations
Task::TASK_TYPES = %w[putaway picking replenishment cycle_count receiving shipping]
Task::PRIORITIES = %w[low medium high urgent]

4. WMS Translations

# In config/locales/es.yml (Spanish included)
es:
  wms:
    warehouse: "AlmacΓ©n"
    pick_list: "Lista de Picking"
    task: "Tarea"
    inventory: "Inventario"

πŸ“Š WMS Administration Panel

The comprehensive WMS admin panel includes:

Dashboard & Analytics

  • πŸ“ˆ WMS Dashboard: Real-time KPIs, warehouse utilization, alerts
  • πŸ“Š Inventory Analytics: Stock levels, movement reports, valuation
  • 🎯 Task Metrics: Performance tracking, completion rates, overdue alerts
  • πŸ“‹ Pick List Analytics: Route efficiency, completion times

Warehouse Operations

  • 🏒 Warehouse Management: Multi-warehouse CRUD with utilization metrics
  • πŸ—οΈ Zone Management: Receiving, storage, picking, packing, shipping zones
  • πŸ“ Location Management: Coordinate tracking, capacity management
  • πŸ“¦ Stock Management: Multi-location inventory with batch/lot tracking

Task & Fulfillment

  • 🎯 Task Assignment: Putaway, picking, replenishment, cycle count tasks
  • πŸ“‹ Pick List Management: Route optimization, progress tracking
  • πŸ“¦ Order Processing: Warehouse assignment, fulfillment status
  • 🚚 Shipment Tracking: Outbound logistics management

Inventory Control

  • πŸ”„ Transaction History: Complete audit trail with filtering
  • πŸ“Š Movement Reports: Inventory flow analysis with CSV export
  • ⚠️ Alert System: Low stock, expired products, overstock warnings
  • 🏷️ Batch Tracking: Lot management with expiry date monitoring

Access Control

  • URL: /admin
  • Authentication: Devise with role-based user management
  • User Roles:
    • Admin: Complete system access
    • Operador: Production orders, products, manual printing
    • Supervisor: Warehouse operations management
    • Picker: Task execution and inventory updates
  • Security: Role-based permissions, Brakeman scanned (0 vulnerabilities)
  • Responsive: Mobile-optimized for warehouse floor operations

πŸ§ͺ Testing

Complete test suite:

# Unit tests
bundle exec rspec spec/models/

# Controller tests
bundle exec rspec spec/controllers/

# Request tests
bundle exec rspec spec/requests/

# System tests (E2E)
bundle exec rspec spec/system/

# Coverage report
open coverage/index.html

πŸš€ Deployment

Heroku

# Create application
heroku create your-store

# Configure variables
heroku config:set RAILS_MASTER_KEY=your_master_key
heroku config:set MERCADOPAGO_ACCESS_TOKEN=your_token

# Deploy
git push heroku main

# Initial setup
heroku run rails db:migrate
heroku run rails db:seed

🎯 WMS Seeds summary: 🏒 Warehouses: 2 πŸ—οΈ Zones: 10 πŸ“ Locations: 90 πŸ“¦ Products: 15 (with WMS fields) πŸ“Š Stock entries: 15 (multi-location) 🎯 Tasks: 10 (various types) πŸ“‹ Pick lists: Sample data πŸ”„ Inventory transactions: Movement history πŸ‘€ Admin users: 1

πŸ” System credentials: Admin: admin@wmsapp.com / password123 Operador: operador@wmsapp.com / password123 (Orders + Products + Manual Printing) Supervisor: supervisor@wmsapp.com / password123 (Warehouse Management) Picker: picker@wmsapp.com / password123 (Task Execution)

Docker Production

# Build image
docker build -t your-store .

# Run
docker run -p 3000:3000 \
  -e RAILS_ENV=production \
  -e DATABASE_URL=postgres://... \
  your-store

🀝 Contributing

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

πŸ“ Ideal Use Cases

This WMS is perfect for:

  • 🏭 Manufacturing facilities with complex inventory tracking needs
  • πŸ“¦ Distribution centers requiring multi-location inventory management
  • 🚚 3PL providers managing inventory for multiple clients
  • πŸͺ Retail operations with multiple warehouses and stores
  • πŸ’Š Pharmaceutical companies requiring batch/lot tracking and expiry management
  • πŸ• Food & beverage operations with FEFO inventory rotation
  • πŸ”§ Spare parts management with precise location tracking
  • πŸ“± E-commerce fulfillment requiring pick optimization
  • πŸ—οΈ Construction supply with bulk inventory and location management
  • πŸ‘¨β€πŸ’» Developers needing a professional WMS foundation

πŸ“‹ WMS Roadmap

Completed Features:

  • 🏒 Multi-warehouse management with zones and locations
  • πŸ”„ Complete inventory transaction audit trail
  • 🎯 Task management system with assignment and tracking
  • πŸ“‹ Pick list generation with route optimization
  • 🏷️ Batch/lot tracking with expiry date management
  • πŸ“Š Comprehensive WMS dashboard with real-time metrics
  • βš–οΈ FIFO/LIFO/FEFO inventory allocation methods
  • πŸ”„ Background jobs for inventory sync and optimization
  • πŸ“± Mobile-responsive design for warehouse operations

Recently Added:

  • πŸ” Advanced search and filtering system
  • πŸ”” Notification system for alerts and updates
  • πŸ“± API endpoints for mobile warehouse applications

Future Enhancements:

  • πŸ“Š Advanced analytics and machine learning insights
  • πŸ€– AI-powered demand forecasting
  • πŸ“± Native mobile app for warehouse operations
  • 🏷️ RFID and barcode scanning integration
  • 🚚 Advanced shipping carrier integrations
  • πŸ“¦ Automated replenishment recommendations
  • 🌍 Multi-language interface expansion
  • πŸ”„ Integration with ERP systems (SAP, Oracle, etc.)

πŸ“„ License

This project is under the MIT license. See LICENSE for more details.


πŸ†˜ Support


🏭 Deploy your WMS today! This comprehensive system saves you months of warehouse management development.

Releases

No releases published

Packages

No packages published

Languages

  • HTML 41.4%
  • Ruby 38.2%
  • JavaScript 13.7%
  • Python 5.9%
  • CSS 0.3%
  • Shell 0.2%
  • Other 0.3%