A minimal but production-ready starter for tracking inventory and assets with Flask on macOS using Visual Studio Code.
- Items: name, category, serial number, quantity, location, condition/status, notes, purchase date
- Locations: manage locations and assign items
- CRUD UI with Flask-WTF forms and Bootstrap 5
- Search + simple filters
- CSV export/import (basic)
- SQLite by default; swap DB via
DATABASE_URL - Migrations with Flask-Migrate
- REST-style JSON endpoints for items/locations (basic read/create/update/delete)
- Open in VS Code
- Unzip the project.
- In VS Code,
File > Open...the project folder.
- Create venv
python3 -m venv .venv
source .venv/bin/activate- Install deps
pip install -r requirements.txt- Environment
- Copy
.env.exampleto.envand set a SECRET_KEY.
cp .env.example .env- Initialize DB
flask db init
flask db migrate -m "init"
flask db upgrade- Run
flask run- Visit http://127.0.0.1:5000
- A
launch.jsonis provided. After activating your venv, press F5 to run the app in debug mode.
CSV headers for items (case-insensitive):
name,category,serial_number,quantity,location,condition,status,purchase_date,notes
quantitydefaults to 1 if blankpurchase_dateacceptsYYYY-MM-DD
Set DATABASE_URL in .env. Examples:
- SQLite (default):
sqlite:///inventory.db - Postgres:
postgresql+psycopg2://user:pass@localhost:5432/inventory - MySQL:
mysql+pymysql://user:pass@localhost/inventory
inventory_tracker_flask/
├─ app.py
├─ models.py
├─ forms.py
├─ requirements.txt
├─ .env.example
├─ README.md
├─ templates/
│ ├─ base.html
│ ├─ dashboard.html
│ ├─ items_list.html
│ ├─ item_form.html
│ ├─ locations_list.html
│ ├─ location_form.html
├─ static/
│ └─ styles.css
└─ .vscode/
└─ launch.json