You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inventory management system for a multi-location sneaker retail chain.
Built with Express.js, Prisma ORM, PostgreSQL, and Redis.
Quick Start
# 1. Clone and install
git clone <repo-url>cd leanstock
cp .env.example .env
# 2. Start infrastructure
docker compose up -d
# 3. Run migrations and seed the database
npx prisma migrate deploy
npx prisma db seed
# 4. Start the dev server
npm run dev
The API will be available at http://localhost:3000 and Swagger docs at http://localhost:3000/docs.
Docker-only (no local Node.js needed)
docker compose up --build
This starts the app, PostgreSQL 16, and Redis 7. Migrations run automatically on startup.
Dead stock decay — runs every 6 hours with configurable thresholds
Testing
# Unit tests (no database needed)
npm run test:unit
# Integration tests (requires running postgres + redis)
npm run test:integration
# All tests
npm test
Environment Variables
See .env.example for all required variables with descriptions.