A neural upgrade for traditional warehouse management systems
Modern inventory tracking with barcode scanning, real-time updates, and intelligent workflows.
Transform inventory management from a chore into an intelligent, responsive system:
- π± Mobile-First: Scan barcodes anywhere in the warehouse
- β‘ Real-Time: Instant stock updates via Redis streams
- π Complete Audit Trail: Every movement tracked and traceable
- π Multi-Platform: Web, mobile, and desktop from one codebase
- π Cloud-Ready: Designed for scale and reliability
Current Status: Phase A - Backend + Web Dashboard Complete!
- Web Dashboard: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs (Swagger): http://localhost:8000/docs
- Database (DBeaver): localhost:5434
- Nix flake development environment with automatic venv
- Docker Compose multi-service setup (Postgres, Redis, FastAPI)
- SQLAlchemy schema with 5 core tables
- FastAPI backend with stock intake endpoint
- Redis event streaming for real-time updates
- Database connection pooling
- Code formatting (Black + isort)
- API documentation (Swagger UI)
- Comprehensive testing guides
- Flutter web dashboard with stock intake interface
- CORS middleware for web access
- Database migrations (Alembic)
- Flutter mobile app (Android + iOS)
- Tauri desktop wrapper
- Authentication system
- Unit and integration tests
- Real-time statistics dashboard
- API Guide - Complete API reference with Postman/DBeaver guides
- Database Setup - Schema, migrations, and maintenance
- Web Dashboard README - Flutter web app guide
- APP.md - Full project vision and roadmap
# Clone the repository
git clone <repository-url>
cd warehouse-neuron
# Allow direnv (automatic environment)
direnv allow
# Or manually activate Nix environment
nix developThe Nix environment provides:
- Python 3.13.8 with venv
- Black & isort formatters
- All backend dependencies
# Start all services (Postgres, Redis, Backend)
docker compose up -d
# View logs
docker compose logs -f backend# Run initial migration
docker exec -i warehouse-neuron_postgres_1 psql -U wn_user -d warehouse_neuron < services/migrations/0001_init.sql
# Verify tables created
docker exec -it warehouse-neuron_postgres_1 psql -U wn_user -d warehouse_neuron -c '\dt'Open http://localhost:8000/docs in your browser to access the interactive API documentation.
Quick test:
curl http://localhost:8000/health
# Expected: {"status":"healthy"}Backend:
- FastAPI 0.121.0 - Modern async web framework
- PostgreSQL 15 - Primary data store
- Redis 7 - Event streaming and caching
- SQLAlchemy 2.0 - Async ORM
- Pydantic 2.12 - Data validation
Frontend (Coming):
- Flutter - Cross-platform UI (mobile + web)
- Tauri - Desktop wrapper (Windows, macOS, Linux)
DevOps:
- Nix Flakes - Reproducible environments
- Docker Compose - Local development
- GitHub Actions - CI/CD (future)
locations β Warehouse zones/bins
skus β Product catalog
sku_barcodes β Barcode mappings (many-to-one)
stock_ledger β Current inventory levels
stock_movements β Complete transaction history
See DATABASE_SETUP.md for detailed schema documentation.
warehouse-neuron/
βββ flake.nix # Nix development environment
βββ .envrc # direnv auto-activation
βββ docker-compose.yml # Multi-service orchestration
βββ README.md # This file
βββ APP.md # Project vision & roadmap
βββ docs/
β βββ API_GUIDE.md # Complete API documentation
β βββ DATABASE_SETUP.md # Database guide
βββ apps/ # Frontend applications (future)
βββ services/
βββ backend/ # FastAPI backend
β βββ Dockerfile
β βββ requirements.txt
β βββ app/
β βββ main.py # Application entry point
β βββ config.py # Settings management
β βββ database.py # DB connection pool
β βββ models.py # SQLAlchemy models
β βββ schema.py # Pydantic schemas
β βββ crud.py # Database operations
β βββ routes/
β βββ stock.py # Stock management API
βββ migrations/
βββ 0001_init.sql # Initial schema
# Format all Python files
black .
isort .
# Check without changes
black --check .
isort --check-only .# Start services
docker compose up -d
# Rebuild after code changes
docker compose up -d --build --no-cache
# View logs
docker compose logs -f backend
# Stop services
docker compose down
# Reset everything
docker compose down -v # Removes volumes too# Connect via psql
psql -h localhost -p 5434 -U wn_user -d warehouse_neuron
# Or via Docker
docker exec -it warehouse-neuron_postgres_1 psql -U wn_user -d warehouse_neuron
# Run query
docker exec -it warehouse-neuron_postgres_1 psql -U wn_user -d warehouse_neuron -c 'SELECT * FROM skus;'- Base URL: http://localhost:8000
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Host: localhost
- Port: 5434 (external), 5432 (internal)
- Database: warehouse_neuron
- User: wn_user
- Password: wn_pass
- Host: localhost
- Port: 6379
Health Check
GET /healthStock Intake (Main Feature)
POST /api/v1/stock/intake
Content-Type: application/json
{
"barcode": "123456789012",
"qty": 10,
"location_code": "WH-A-01",
"movement_type": "IN",
"auto_create_sku": true,
"created_by": "user@example.com"
}Interactive Documentation
- Full API reference: http://localhost:8000/docs
- Complete testing guide: docs/API_GUIDE.md
See API_GUIDE.md for:
- Postman collection setup
- Example requests
- Complete testing scenarios
See DATABASE_SETUP.md for:
- Connection setup
- Sample queries
- Performance monitoring
# Test health endpoint
curl http://localhost:8000/health
# Test stock intake
curl -X POST http://localhost:8000/api/v1/stock/intake \
-H "Content-Type: application/json" \
-d '{"barcode":"TEST-001","qty":10,"auto_create_sku":true}'Backend service configuration (set in docker-compose.yml):
DATABASE_URL=postgresql+asyncpg://wn_user:wn_pass@postgres:5432/warehouse_neuron
REDIS_URL=redis://redis:6379
APP_ENV=development# Check container status
docker ps -a
# View logs
docker compose logs backend
docker compose logs postgres
# Restart services
docker compose restart# Check what's using port 5434
netstat -tuln | grep 5434
# Or use different port in docker-compose.yml# Test from host
psql -h localhost -p 5434 -U wn_user -d warehouse_neuron
# Test from container
docker exec warehouse-neuron_postgres_1 pg_isready -U wn_userSee troubleshooting sections in:
Backend scaffold, schema, basic scanning
Error handling, offline queue, retry logic
AI-powered predictions, anomaly detection
Multi-warehouse, advanced analytics
UI/UX refinement, performance tuning
See APP.md for complete roadmap details.
- Follow existing code style (Black + isort)
- Run formatters before committing
- Test changes locally with Docker Compose
- Update documentation for new features
- Write tests for new functionality
[License TBD]
- Documentation: docs/
- Issues: GitHub Issues
- API Docs: http://localhost:8000/docs
Built with β€οΈ for modern warehouse operations