← Back to ideas

Redson Dev · Idea

WebIntermediateAges 18+A weekend

Smart Shelf Inventory with QR Codes and Web App

Published July 23, 2026

This project is for small business owners, like an independent bookstore in Portland, Oregon, who need an affordable, low-tech way to track inventory without a complicated POS system. You'll build a system that uses QR codes to log items in and out of stock, accessible via a simple web application. This allows for quick, accurate inventory management, reducing manual counting errors and improving reordering efficiency.

What you'll need

  • 1x Raspberry Pi 4 (2GB RAM minimum)
  • 1x microSD card (16GB or larger)
  • 1x USB barcode/QR code scanner
  • 1x Power supply for Raspberry Pi
  • 1x HDMI cable (optional, for initial setup)
  • Small thermal printer (optional, for printing QR codes on demand)
  • Roll of thermal label paper (optional)

Step-by-step

  1. 01

    Set up your Raspberry Pi and Install OS

    Flash Raspberry Pi OS Lite (64-bit) onto your microSD card using Raspberry Pi Imager. Insert the card into your Pi, connect power and optionally a monitor/keyboard. Log in with the default credentials, then update your system using `sudo apt update && sudo apt upgrade -y`. Ensure SSH is enabled for remote access.

  2. 02

    Install Web Server and Database

    Install Nginx as your web server: `sudo apt install nginx -y`. Install Python3 and pip for your web application: `sudo apt install python3 python3-pip -y`. Set up a lightweight database like SQLite for inventory data, which comes pre-installed with Python, or install PostgreSQL if you prefer: `sudo apt install postgresql -y`.

  3. 03

    Develop the Inventory Web Application

    Create a Python Flask or FastAPI web application. Design database schema for `items` (e.g., `id`, `name`, `sku`, `quantity`, `qr_code_data`) and `transactions` (e.g., `item_id`, `type` [in/out], `timestamp`). Implement routes for adding new items, scanning QR codes to adjust quantity, and viewing inventory reports. Use a library like `qrcode` for generating QR codes dynamically if you're not pre-generating them.

  4. 04

    Integrate QR Code Scanning

    Connect the USB QR code scanner to your Raspberry Pi. Most USB scanners emulate a keyboard, so input will appear directly in your web application's input fields. Configure your web app's UI to have an active input field that captures the scanned QR code data, then processes it to update inventory. For example, a dedicated 'Scan In' or 'Scan Out' page.

  5. 05

    Deploy and Test the Application

    Configure Nginx to serve your Flask/FastAPI application using a WSGI server like Gunicorn: `pip install gunicorn`. Create a systemd service file to automatically start your Gunicorn application on boot. Test the entire workflow: add a new item, print its QR code (if applicable), scan it in, scan it out, and verify inventory updates via the web interface.

Tips

  • Consider using environment variables for sensitive configurations like database credentials.
  • For easier development, test your Python application on your local machine before deploying to the Raspberry Pi.
  • Implement basic user authentication for your web application to protect inventory data.
#raspberry-pi#inventory-management#qr-codes#web-application#small-business