Partomate (日本語)
Partomate is a web application for managing parts inventory. It lets you track part quantities and categories, and review the components and estimated cost of each product. With the AI chat feature, you can create proposals for inventory additions, inventory consumption, and product composition changes using natural language.
- Create, edit, and delete parts in inventory
- Organize parts using three-level categories
- Manage quantities with decimal values
- Review low-stock thresholds and total inventory value
- Define product compositions and calculate costs
- Consume component inventory when assembling products
- Integrate AI chat through OpenAI-compatible APIs or Ollama
- Connect external LLM clients through the MCP server
- Qwen3-VL-4B-Instruct-GGUF
- GPT-5.4 nano
- Docker Desktop or Docker Engine
- Docker Compose
Copy .env.example to .env and set SECRET_KEY to a random value. SECRET_KEY is required; if it is not set, docker compose will stop with an error during startup.
cp .env.example .env
# Set SECRET_KEY in .env (for example, use the output of: openssl rand -hex 32)
docker compose up --buildAfter the application starts, open the following URL in your browser:
http://localhost:15173
The API is available at:
http://localhost:18000
If ports 18000 or 15173 are already in use by another application, you can change them in .env:
FRONTEND_PORT=5173
BACKEND_PORT=8000The Docker version stores the database and uploaded files in the host-side data/ directory:
data/
partomate.db
partomate.db-shm
partomate.db-wal
uploads/
As long as you keep the data/ directory, your inventory, products, and settings will remain intact even if you recreate the containers or images.
To back up your data or migrate to another computer, copy the data/ directory first.
The administrator registration screen appears the first time you access the application. After creating the administrator account, you can log in and start managing your inventory.
Partomate is designed as a self-hosted application operated by a single administrator. After the initial registration, there are no features for registering or managing additional users.
When the database is empty, the following sample data is added automatically:
M2 6 mm screw: 100 piecesM2 nut: 100 piecesPro Micro microcontroller: 1 pieceLead-type 1N4148 diode: 9 piecesRubber foot: 4 piecesProduct A: A sample product made from the parts listed above
Sample data is not added if the database already contains any parts or products.
There is no password reset feature. If you forget the administrator password, empty the users table in the database. This re-enables the initial registration screen so that you can register a new administrator.
Emptying the users table does not delete inventory, product compositions, settings, or other application data.
Before proceeding, stop the application or container and back up the data/ directory as a precaution.
When using Docker with ./data/partomate.db mounted as a volume:
sqlite3 ./data/partomate.db "DELETE FROM users;"For local development with backend/partomate.db:
sqlite3 backend/partomate.db "DELETE FROM users;"Restart the application after running the command. The initial registration screen will appear when you open the application in your browser.
The AI features connect to an external LLM server, such as an OpenAI-compatible API or Ollama. Partomate does not include an AI model or Ollama.
You can configure the following options on the Settings page:
- LLM provider
- API URL
- Model name
- OpenAI-compatible API key
- System prompt
Backend:
SECRET_KEY is required for signing JWTs. The backend will stop with an error at startup if it is not set, so set it to a random value for development.
cd backend
source venv/bin/activate
export SECRET_KEY=$(openssl rand -hex 32)
uvicorn app.main:app --reload --port 18000Frontend:
cd frontend
npm run devOpen http://localhost:15173 in your browser.
The default database for local development is backend/partomate.db.
The Docker version uses data/partomate.db through DATABASE_URL.
Backend:
cd backend
python -m pytest test_api.pyFrontend:
cd frontend
npm run build- Specification: docs/spec.md
- Development notes: docs/development.md
- Distribution policy: docs/deployment.md
- MCP connection: README_MCP.md




