Skip to content
TuxiNet.dk edited this page Apr 27, 2026 · 2 revisions

Component Inventory Wiki

Component Inventory is a self-hosted inventory management system for electronic components. It was built as a practical local alternative to the discontinued Mouser Inventory workflow, but it is not affiliated with Mouser, RS, or any distributor.

The system runs with Docker Compose, PHP 8.3, Apache, and SQLite.

Main Features

  • Inventory management for electronic components
  • Multiple storage locations
  • Products with part number, manufacturer, vendor part number, bin, quantity, and reorder point
  • CSV product import
  • Receive stock by part number or printed INV-* label
  • Issue/loan components to consumers
  • Return tracking and non-returned quantity tracking
  • Active transactions and transaction history
  • Reports and CSV export
  • Reorder list
  • Printable Code39 barcode labels
  • Users, roles, and per-location permissions
  • Dark mode by default
  • Optional Mouser Search API integration
  • RS reorder search links

Installation

Clone the repository:

git clone https://github.com/tuxinetdk/inventory.git
cd inventory

Copy the environment file:

cp .env.example .env

Start the container:

docker compose up -d --build

Open the application:

http://localhost:8080

On Windows PowerShell:

Copy-Item .env.example .env
docker compose up -d --build

First Setup

On first start, the setup wizard is shown.

Create:

  • organisation
  • first storage location, for example Primary Rack
  • first administrator user

After setup, the system logs in as the administrator.

Environment

Default .env:

APP_NAME="Component Inventory"
APP_ENV=production
APP_URL=http://localhost:8080
APP_PORT=8080

MOUSER_API_KEY=
MOUSER_API_BASE=https://api.mouser.com/api/v1

RS_SEARCH_BASE=https://dk.rs-online.com/web/c/?searchTerm=

To change the host port:

APP_PORT=8090
APP_URL=http://localhost:8090

Then restart:

docker compose up -d --build

Daily Use

Products

Go to:

Products

Here you can:

  • view active products
  • search part numbers, descriptions, bins, and vendor part numbers
  • create products manually
  • edit products
  • import CSV files
  • print labels
  • run Mouser Match

Receive Stock

Go to:

Receive

Enter or scan:

  • INV-* label
  • internal part number
  • vendor part number
  • Mouser part number
  • manufacturer part number

Enter quantity and save. The system adds the quantity to stock and logs the inventory movement.

Issue / Loan

Go to:

Products

Select one or more products and choose:

Issue selected

Enter consumer, quantity, and optional return due date. The system subtracts the quantity from stock and creates an active transaction.

Returns

Go to:

Transactions

Open an active transaction, enter returned quantity or non-return quantity, and save. When all lines are closed, the transaction is marked as completed.

CSV Import

Download the template inside the app:

Products -> Import CSV

CSV headers:

part_number,manufacturer,manufacturer_part_number,vendor,vendor_part_number,description,bin,quantity_on_hand,reorder_point,reorder_quantity,loanable,active

If a part_number already exists in the selected location, the product is updated.

Labels

Labels use Code39 barcode and the system's internal INV-* ID.

Supported formats:

  • Avery 5163-style, 2" x 4"
  • DYMO 30256-style, 2 5/16" x 4"

Labels can be used in the Receive input field.

Reports

Go to:

Reports

Available reports:

  • Current inventory snapshot
  • Historical inventory report
  • Usage by bin
  • Usage by consumer
  • Overdue loans
  • Inventory reorder

All reports can be exported as CSV.

Reorder

Go to:

Reorder

This shows products where:

quantity_on_hand <= reorder_point

The system shows suggested reorder quantity and links to Mouser/RS search.

Mouser API

Mouser API support is optional. The system works without an API key.

When MOUSER_API_KEY is configured, Products -> Mouser Match can fetch data such as:

  • Mouser part number
  • manufacturer part number
  • manufacturer
  • description
  • datasheet URL
  • product URL
  • product image
  • lifecycle status
  • RoHS status
  • packaging

Set the API key in .env:

MOUSER_API_KEY=your_key_here

Restart:

docker compose up -d --build

The Mouser API is only used for lookup and enrichment of local inventory records.

RS

RS is currently used as a search link in the reorder flow:

RS_SEARCH_BASE=https://dk.rs-online.com/web/c/?searchTerm=

If RS later provides API access, a real API adapter can be added.

Backup

The database is stored here:

storage/inventory.sqlite

Backup:

docker compose down
cp storage/inventory.sqlite storage/inventory-backup.sqlite
docker compose up -d

Windows PowerShell:

docker compose down
Copy-Item .\storage\inventory.sqlite .\storage\inventory-backup.sqlite
docker compose up -d

Reset

This deletes all local data:

docker compose down
rm storage/inventory.sqlite
docker compose up -d

Windows PowerShell:

docker compose down
Remove-Item .\storage\inventory.sqlite
docker compose up -d

Troubleshooting

Container Status

docker compose ps

Logs

docker compose logs -f

Application Does Not Respond On Localhost

Check that the container is running:

docker compose ps

Check if the port was changed in .env:

APP_PORT=8080
APP_URL=http://localhost:8080

Mouser Match Does Not Work

Check:

  • MOUSER_API_KEY is set in .env
  • the container was restarted after changing .env
  • the API key has access to the Mouser Search API

Restart:

docker compose up -d --build

GitHub Wiki Publishing

GitHub Wiki is technically a separate git repository:

https://github.com/tuxinetdk/inventory.wiki.git

When the GitHub repository exists and Wiki is enabled, publish this page like this:

git clone https://github.com/tuxinetdk/inventory.wiki.git inventory.wiki
cp docs/wiki/Home.md inventory.wiki/Home.md
cd inventory.wiki
git add Home.md
git commit -m "Add project wiki home page"
git push

Windows PowerShell:

git clone https://github.com/tuxinetdk/inventory.wiki.git inventory.wiki
Copy-Item .\docs\wiki\Home.md .\inventory.wiki\Home.md
Set-Location .\inventory.wiki
git add Home.md
git commit -m "Add project wiki home page"
git push

Status

The project is ready as a first self-hosted version. The most useful future improvements would be more label formats, better audit filtering, XLSX import/export, and real distributor API adapters.