{"id":24811789,"url":"https://github.com/al-chris/inventory","last_synced_at":"2025-03-25T14:25:59.702Z","repository":{"id":255642065,"uuid":"852587932","full_name":"al-chris/Inventory","owner":"al-chris","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-05T18:28:49.000Z","size":344,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T13:16:19.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/al-chris.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T04:21:05.000Z","updated_at":"2024-10-05T18:28:52.000Z","dependencies_parsed_at":"2024-09-13T01:38:14.588Z","dependency_job_id":null,"html_url":"https://github.com/al-chris/Inventory","commit_stats":null,"previous_names":["al-chris/inventory"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FInventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FInventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FInventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FInventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al-chris","download_url":"https://codeload.github.com/al-chris/Inventory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245478877,"owners_count":20622048,"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":[],"created_at":"2025-01-30T13:16:21.257Z","updated_at":"2025-03-25T14:25:59.674Z","avatar_url":"https://github.com/al-chris.png","language":"Python","readme":"# Inventory Management System\n\nThis is a simple inventory management system built using FastAPI, Streamlit, and SQLite3.\n\n## Project Structure\n\n```\ninventory_management_system/\n│\n├── backend/\n│   ├── main.py                 # FastAPI application\n│   ├── database.py             # Database models and setup using SQLAlchemy\n│   ├── util.py                 # Utility functions\n│   ├── __init__.py             # Initialize the backend module\n│   └── requirements.txt        # Backend dependencies (FastAPI, SQLAlchemy, etc.)\n│\n├── frontend/\n│   ├── app.py                  # Streamlit application\n│   ├── __init__.py             # Initialize the frontend module\n│   └── requirements.txt        # Frontend dependencies (Streamlit, requests, etc.)\n│\n├── inventory.db                # SQLite database file (auto-generated)\n│\n├── .env                        # ENV file to store sensitive information (e.g., PASSWORD)\n│\n├── .gitignore                  # Git ignore file to ignore unnecessary files (e.g., inventory.db, __pycache__)\n│\n└── README.md                   # Project documentation\n\n```\n\n\n## Setup Instructions\n\n### Backend (FastAPI)\n\n1. Navigate to the `backend` directory:\n\n    ```bash\n    cd backend\n    ```\n\n2. Create a virtual environment and activate it:\n\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n    ```\n\n3. Install the required dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. Run the FastAPI server:\n\n    ```bash\n    uvicorn main:app --reload\n    ```\n\n### Frontend (Streamlit)\n\n1. Navigate to the `frontend` directory:\n\n    ```bash\n    cd frontend\n    ```\n\n2. Create a virtual environment and activate it:\n\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n    ```\n\n3. Install the required dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. Run the Streamlit app:\n\n    ```bash\n    streamlit run app.py\n    ```\n\n## Usage\n\n- Access the FastAPI documentation at `http://127.0.0.1:8000/docs`.\n- Access the Streamlit app at `http://localhost:8501`.\n\n## Features\n\n- **Category Management**: \n    - Create, view, and update categories, with each category displaying its creation date. \n    - Categories can also be deleted when no longer needed.\n\n- **Item Management**: \n    - Create, view, edit, delete, and search for items by name or description. \n    - Items include fields for quantity, category, and creation/last updated dates to track changes. \n    - Detailed logging tracks modifications to items, including changes in quantity and other fields.\n\n- **Error Handling**: \n    - Provides clear and user-friendly error messages for failed operations, including specific error \n      handling for missing categories, items, or server errors.\n\n- **Export Data to CSV**: \n    - The application allows users to export inventory data to CSV format for easy reporting, sharing, \n      or backup. \n    - Items within categories and search results can be downloaded directly from the web interface \n      using the \"Download as CSV\" button, available in both the category view and search results.\n\n- **Action Logging**: \n    - The system logs key actions such as item creation, updates, and deletions.\n    - Logs track changes made to items, including old and new values for fields such as name, \n      description, quantity, and category.\n\n## Notes\n\n- The project uses a simple password authentication for the Streamlit app. Update the password in `.env` as required.\n- Make sure to start the FastAPI server before running the Streamlit app to ensure the frontend can communicate with the backend.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-chris%2Finventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal-chris%2Finventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-chris%2Finventory/lists"}