Skip to content

Installation

0neShot edited this page Sep 9, 2026 · 1 revision

Installation Guide

SmartParts is an advanced InvenTree plugin that connects your physical component inventory with major electronic distributors (Mouser, DigiKey, LCSC, element14/Farnell, and TME).

This guide walks you through installing and enabling the plugin across different InvenTree environments.


Prerequisites

Before installing SmartParts, ensure your environment meets the following requirements:

  • InvenTree Version: 0.13.0 or higher (compatible with InvenTree 0.14+ and 0.15+ React/PUI interfaces).
  • Python Version: Python 3.9 or higher.
  • Network Access: Outbound HTTPS access to distributor API gateways (api.mouser.com, api.digikey.com, wmsc.lcsc.com, api.element14.com, api.tme.eu).
  • Dependencies:
    • requests>=2.25.0
    • openpyxl>=3.0.0 (for Altium Excel BOM batch imports)

🔑 TODO (Configuration): [Verify your InvenTree base URL, Docker volume mounts, and network proxy rules if running inside a corporate intranet.]


Installation Methods

Method 1: InvenTree Web UI (Standard Package)

If your InvenTree instance allows package installation via the Web UI:

  1. Log into your InvenTree instance as a Superuser or Admin.
  2. Navigate to Settings Center (gear icon in the top navigation).
  3. Select Plugin Settings from the sidebar.
  4. Click Install Plugin.
  5. Enter the package name or Git URL:
    • Package Name: inventree-smart-parts
    • Git URL: git+https://github.com/0neShot/SmartParts.git
  6. Confirm the installation dialog and allow InvenTree to install the package dependencies.
  7. Restart the InvenTree web server and background worker processes.

📸 TODO (Screenshot): [InvenTree Plugin Settings page showing the Install Plugin modal with inventree-smart-parts entered.]


Method 2: Docker / Container Deployment (Recommended for Production)

For Docker-managed InvenTree installations (e.g. docker-compose.yml):

1. Add to plugins.txt

In your persistent InvenTree data directory, edit or create plugins.txt:

inventree-smart-parts>=1.1.1

2. Ensure Environment Variables Enable Plugins

In your .env or Docker configuration file, confirm plugin loading is enabled:

INVENTREE_PLUGINS_ENABLED=True

3. Restart Container Stack

Recreate or restart the containers so the InvenTree entrypoint installs the new plugin:

docker compose down
docker compose up -d

📸 TODO (Screenshot): [Docker container startup logs showing inventree_smart_parts successfully registered.]


Method 3: Local / Development Editable Install

If you are developing the plugin or mounting a local clone:

  1. Clone the repository into your development directory:
    git clone https://github.com/0neShot/SmartParts.git
    cd SmartParts
  2. Mount the package directory into the InvenTree Docker container (e.g., via docker-compose.yml volume binding):
    volumes:
      - ./SmartParts_Release_v1.1.1/inventree_smart_parts:/home/inventree/data/plugins/inventree_smart_parts:ro
  3. Run the development restart helper:
    make plugin

Enabling & Activating the Plugin

Once installed, the plugin must be activated in the InvenTree registry:

  1. Navigate to InvenTree Settings Center > Plugin Management.
  2. Locate Smart Parts – Inventory Assistant (smartparts) in the list.
  3. Toggle the Enable Plugin switch to Active.
  4. InvenTree will load the plugin mixins:
    • SettingsMixin: Exposes all distributor API settings and parameter filter toggles.
    • UrlsMixin: Registers /plugin/smartparts/ and API endpoints /plugin/smartparts/api/v1/.
    • UserInterfaceMixin: Injects the SmartParts panel into Part and PartCategory pages.

📸 TODO (Screenshot): [InvenTree Plugin Management table showing SmartParts activated with a green checkmark.]


Verifying the Installation

  1. Open your browser and navigate to:
    https://<your-inventree-url>/plugin/smartparts/
    
  2. You should see the SmartParts Dashboard landing page with the single MPN search bar and distributor status indicators.
  3. Verify that the media URL handler is active for part images by testing an MPN lookup.
  4. Navigate to any component detail page in InvenTree and check for the Smart Parts side-panel tab (smartparts-panel).

✍️ TODO (User Input): [Document internal URL or bookmark link for your warehouse kiosk operators.]


Next Steps

Clone this wiki locally