{"id":27106276,"url":"https://github.com/ejach/inventoryapplication","last_synced_at":"2025-04-06T19:39:10.518Z","repository":{"id":38019575,"uuid":"404418608","full_name":"ejach/InventoryApplication","owner":"ejach","description":"Application that tracks inventory. Intended for use by SOS irrigation to track the inventory on the vans they use.","archived":false,"fork":false,"pushed_at":"2023-05-30T22:59:20.000Z","size":670,"stargazers_count":5,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-02T02:47:31.222Z","etag":null,"topics":["docker","flask","inventory","inventory-management","inventory-management-system","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ejach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-08T16:27:37.000Z","updated_at":"2024-03-31T21:30:57.000Z","dependencies_parsed_at":"2023-02-15T23:15:28.461Z","dependency_job_id":null,"html_url":"https://github.com/ejach/InventoryApplication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejach%2FInventoryApplication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejach%2FInventoryApplication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejach%2FInventoryApplication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejach%2FInventoryApplication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejach","download_url":"https://codeload.github.com/ejach/InventoryApplication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247542956,"owners_count":20955859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","flask","inventory","inventory-management","inventory-management-system","python"],"created_at":"2025-04-06T19:39:08.794Z","updated_at":"2025-04-06T19:39:10.510Z","avatar_url":"https://github.com/ejach.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InventoryApplication\n\n[![PyPI](https://img.shields.io/pypi/v/flask?logo=python\u0026label=flask\u0026style=flat-square\u0026color=FFD43B)](https://pypi.org/project/flask/)\n[![PyPI](https://img.shields.io/pypi/v/gunicorn?logo=python\u0026label=gunicorn\u0026style=flat-square\u0026color=FFD43B)](https://pypi.org/project/gunicorn/)\n[![PyPI](https://img.shields.io/pypi/v/sqlalchemy?logo=python\u0026label=SQLAlchemy\u0026style=flat-square\u0026color=FFD43B)](https://pypi.org/project/sqlalchemy/)\n[![PyPI](https://img.shields.io/pypi/v/pymysql?logo=python\u0026label=PyMySQL\u0026style=flat-square\u0026color=FFD43B)](https://pypi.org/project/pymysql/)\n\n\n[![LGTM](https://img.shields.io/lgtm/grade/python/github/ejach/InventoryApplication?color=FFD43B\u0026logo=python\u0026style=flat-square)](https://lgtm.com/projects/g/ejach/InventoryApplication/)\n[![LGTM](https://img.shields.io/lgtm/grade/javascript/github/ejach/InventoryApplication?color=FFD43B\u0026logo=javascript\u0026style=flat-square)](https://lgtm.com/projects/g/ejach/InventoryApplication/)\n\n### Project Details\nThere is a need to have a system in place that allows for part inventory to be tracked over each of the company vans that SOS Irrigation utilizes. Each technician has an iPad or a personal device to use on the van, so by developing a web application to sync across all devices helps keep track of all inventory in each van. A database of each part SOS Irrigation uses is necessary to keep track of all inventory in the system. The database will have the ability to add or remove parts in inventory. A count of each available part on a given van will be visible to the user. The ability to see what parts are low in stock or missing is important to know what parts to order. It will export data from the system to generate a list of all the parts the company has in inventory.\n\n## [Installation](https://github.com/ejach/InventoryApplication/wiki/Installation)\n\n### Manual\n\n#### Prerequisites\n\nMake sure you have a MySQL database running with the [correct database schema](https://github.com/ejach/InventoryApplication/blob/main/database.sql)\n\n1. Clone the repo by running `$ git clone https://github.com/ejach/InventoryApplication.git`\n2. `cd` into the cloned directory `$ cd InventoryApplication`\n3. Change the environment variables to your liking by [exporting them](https://bash.cyberciti.biz/guide/Export_Variables) shown in `example.env`\n```bash\n# Host for the MySQL database and the WebUI (default is localhost)\nhost=localhost\n# Host for the WebUI\nwebui_host=localhost\n# Port for the WebUI using a WSGI server (default is 5000 for development, 8000 for production)\nwebui_port=5000\n# Username for the MySQL database (default is root)\nusername=root\n# Password for the MySQL database (default is root)\npassword=root\n# Port for the MySQL database (default is 3306)\ndb_port=3306\n# Database schema name in the MySQL database (default is parts)\ndb_schema=parts\n# Database table in the MySQL database (default is parts)\ndb=parts\n# A string of text or characters used in the Flask sessions module\nSECRET_KEY=YOURKEY\n# Only use/uncomment if you are planning on deploying to Heroku; Default is False\nDYNO=FALSE\n# Need to have a TILL URL with the username/api embedded to use SMS \nTILL_URL=xxx\n```\n5. Install the requirements `$ pip install -r requirements.txt`\n\n    _Make sure that your user has read/write permissions in the database/table that has been created or else it will not work._\n\n6. Setup your database and add an admin account by running `$ python db_setup.py`\n\n7. Run the program using `python wsgi.py`\n\n### Docker Run\n`$ docker run -it -e host=\u003chost\u003e -e db_port=\u003cdb_port\u003e -e username=\u003cusername\u003e -e password=\u003cpassword\u003e -e webui_host=\u003cwebui_host\u003e -e webui_port=\u003cwebui_port\u003e -e db_port=\u003cdb_port\u003e -e db=\u003cdb\u003e -e db_schema=\u003cdb_schema\u003e ghcr.io/ejach/inventoryapplication:latest`\n\n_Change the corresponding environment variables as needed_\n\n### Docker-Compose\n\n1. Run `$ docker volume create --name db-data` to create the volume used by the MySQL database\n2. Use the [docker-compose](https://github.com/ejach/InventoryApplication/blob/main/docker-compose.yml) file and edit the `environment` variables as needed:\n\n```yaml\nversion: '3.8'\nservices:\n  db:\n    image: mysql\n    restart: always\n    environment:\n      MYSQL_ROOT_PASSWORD: root\n      MYSQL_DATABASE: parts\n    volumes:\n      - db-data:/var/lib/mysql\n    ports:\n      - \"3308:3306\"\n  phpmyadmin:\n    image: phpmyadmin/phpmyadmin:latest\n    restart: always\n    environment:\n      PMA_HOST: db\n      PMA_USER: root\n      PMA_PASSWORD: root\n    ports:\n      - \"8080:80\"\n  invapplication:\n    image: ghcr.io/ejach/inventoryapplication:latest\n    restart: always\n    environment:\n      host: db\n      webui_host: localhost\n      webui_port: 5000\n      username: root\n      password: root\n      db_port: 3306\n      db: parts\n    ports:\n      - \"5000:8000\"\nvolumes:\n  db-data:\n    external: true\n```\n2. Run `$ docker-compose -f docker-compose.yml up -d`\n\n### Docker Build\n1. Make sure you have a MySQL database running with the [correct database schema](https://github.com/ejach/InventoryApplication/blob/main/database.sql)\n2. Change the environment variables to your liking by [exporting them](https://bash.cyberciti.biz/guide/Export_Variables) shown in `example.env`\n3. Build the image using the existing `Dockerfile` by running `$ docker build -t inventoryapplication .`\n4. Run the newly created image using `$ docker run inventoryapplication`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejach%2Finventoryapplication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejach%2Finventoryapplication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejach%2Finventoryapplication/lists"}