-
Notifications
You must be signed in to change notification settings - Fork 0
Development & Production
SIMple is built using Python, Flask/Jinja, HTML, CSS, and Javascript, and utilizes a SQLite backend. By default, the database is located at $SIMple-dir/inventory.sqlite, but this can be changed to a different location by using the DATABASE_NAME environment variable.
Information on Flask can be found at their website
Deployment using a WSGI such as gunicorn can be used like this:
$ DATABASE_NAME=$USER/inventory.sqlite gunicorn -w 4 inventory.app:appAfter the WSGI application is started, you'll need to use Apache2 or NGINX to proxy pass to your desired domain or subdomain.
NOTE: There is currently a bug when using NGINX proxy pass to a gunicorn instance. To date I've only successfully gotten Apache2 to successfully proxy pass, so Apache2 is recommended.
Currently, the database is initialized with the following tables:
-
productsKeys (* = required)- prod_id - Product ID (Primary Key)
- prod_name - Product Name*
- prod_upc - Product UPC*
- prod_quantity - On-hand quantity*
- quick_take_qty - Amount to take quickly*
- reorder_qty - When to reorder more*
- restock_qty - How much is in a new shipment
- location - Where the product is located*
- categories - A category to help locate the item
- been_reordered - A boolean to check if a product has been reordered
- vendor - The vendor of the item
- vendor_url - The URL to order more of the item
- purchase_cost - The cost to purchase the item
- sale_price - The sale price of the item
- unallocated_quantity - A holdover from the original project
For more information on quick_take_qty, reorder_qty, and restock_qty, see Features.
-
locationKeys (* = required)- loc_id - Location ID (Primary Key)
- loc_name - Name of Location*
-
categoryKeys (* = required)- cat_id - Category ID (Primary Key)
- category_name - Category Name*
-
prod_categoriesKeys (* = required)- set_id - Primary Key for table
- prod_id - Product ID for Category*
- cat_id - Category ID for Product*
The prod_categories table is currently not used, but is planned for use in order to set multiple categories per item.
-
settingsKeys (* = required)- settings_id - Setting ID (Primary Key)
- setting_name - Name of Setting
- setting_val - Value of Setting
The settings table is currently only used to set the "account-wide" default filters, but will hopefully be used more in the future.