Product catalog
Full catalog with barcode lookup (unique partial index), categories, VAT rates (0/5/8/23%), purchase and sell price tracking, margin calculation, supplier history per product, and active/inactive state management.
Private GitHub repo · public case study
Magazynio replaces a legacy ERP workflow with a focused Python application for products, invoices, stock movements, physical inventory counts, operational analytics, automated backups, and single-user Docker deployment.
Product proof
Use the carousel to inspect every part of the system: dashboard KPIs, product analytics with price history, purchase intelligence, invoice management, printable layouts, periodic reports, and built-in help.
Dashboard
The dashboard gives a fast operational overview: warehouse value, active product count, monthly purchase trend, category breakdown, and recent invoice activity.
Capabilities
Every feature is designed around a real operational need — from barcode scanning at goods receipt to periodic stock reporting with turnover analytics.
Full catalog with barcode lookup (unique partial index), categories, VAT rates (0/5/8/23%), purchase and sell price tracking, margin calculation, supplier history per product, and active/inactive state management.
Purchase and sale invoices with draft states, line-item auto-merge, supplier snapshotting (survives deletion), correction invoices linked to originals with full audit trail, and stock-impacting confirmation with safe rollback on delete.
Every stock change is an immutable movement — six types tracked, current stock is a rebuildable cache from source-of-truth movements. Physical inventory sessions reconcile counted vs. system stock with auto-adjustments. Legacy migration detection included.
Dashboard KPIs, 12-month purchase trend, category breakdown, top products and suppliers. Per-product analytics include weighted average pricing, volatility classification, trend detection, and supplier ranking — all correction-aware.
Configurable reports with start/end stock, period movements, turnover ratio, days-of-supply, and stock value. Twenty-two-column CSV export with UTF-8 BOM. Batch SQL optimization — 6 queries total, regardless of product count.
Single-user bcrypt auth with rate-limited login (5/min), CSP/HSTS security headers, and strict session protection. Twenty-five test files with in-memory SQLite, auto-logged-in client, and a separate Docker test container — never touching live data.
By the numbers
Concrete metrics that define the scope and quality of the project — no fluff, just what's been built.
Engineering
The system favors maintainability and testability: Flask factory pattern, isolated service modules, SQLAlchemy ORM models, inline SQLite migrations, JSON i18n, and a tab-based SPA-like frontend.
create_app())pip install -r requirements.txt
python src/app.py
production
gunicorn src.app:app
docker compose up -d --build
testing
pytest
# in-memory DB, isolated per test
Production and test run as separate Docker containers with their own databases. Development never touches live shop data. A sync script copies production data to the test environment when needed.
DevOps & security
The application runs as a Dockerized Flask service behind gunicorn with Nginx reverse proxy. Three compose files isolate production, testing, and the showcase site — each with its own database and configuration.
docker-compose.yml # production
docker-compose.test.yml # testing
docker-compose.showcase.yml # showcase
production stack
gunicorn src.app:app \
--workers 2 \
--timeout 120 \
--bind 0.0.0.0:5000
Non-root user (uid 1001) inside the container. Separate networks for internal and external traffic.