{"id":50787034,"url":"https://github.com/aka-nikko/inventory-management-system","last_synced_at":"2026-06-12T08:33:10.018Z","repository":{"id":362123352,"uuid":"1257444328","full_name":"aka-nikko/inventory-management-system","owner":"aka-nikko","description":"A simple, production-oriented inventory management web application with a React + Vite frontend and a FastAPI backend. The project is containerized with Docker Compose for easy local development and testing.","archived":false,"fork":false,"pushed_at":"2026-06-02T18:28:59.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T20:20:53.995Z","etag":null,"topics":["aqlalchemy","axios","docker","fastapi","javascript","jsx","postgresql","python","react","vite","webapp"],"latest_commit_sha":null,"homepage":"https://inventory-management-system-iul1.onrender.com","language":"JavaScript","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/aka-nikko.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T17:25:44.000Z","updated_at":"2026-06-02T18:36:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aka-nikko/inventory-management-system","commit_stats":null,"previous_names":["aka-nikko/inventory-management-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aka-nikko/inventory-management-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Finventory-management-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Finventory-management-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Finventory-management-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Finventory-management-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aka-nikko","download_url":"https://codeload.github.com/aka-nikko/inventory-management-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Finventory-management-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34236551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aqlalchemy","axios","docker","fastapi","javascript","jsx","postgresql","python","react","vite","webapp"],"created_at":"2026-06-12T08:33:04.457Z","updated_at":"2026-06-12T08:33:10.013Z","avatar_url":"https://github.com/aka-nikko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Inventory Management System\n\nA simple, production-oriented inventory management web application with a React + Vite frontend and a FastAPI backend. The project is containerized with Docker Compose for easy local development and testing.\n\n**Table of contents**\n- Features\n- Tech stack\n- Quick start (Docker)\n- Development (local)\n- API overview\n- Data rules \u0026 validation\n- Contributing\n\n## Features\n- Product management: add, list, update, delete\n- Customer management: add, list, delete\n- Order management: create orders, view orders and order details, delete orders (restores stock)\n- Dashboard: totals and low-stock alerts\n- Responsive, accessible UI with form validation and toast notifications\n- Containerized (Docker Compose) for zero-configuration local setup\n\n## Tech stack\n- **Frontend:** React 18 + Vite, JSX, axios\n- **Backend:** FastAPI, SQLAlchemy, Pydantic\n- **Database:** PostgreSQL\n- **Dev / Deploy:** Docker, docker-compose\n\n## Quick start (Docker)\nPrerequisite: Docker and Docker Compose installed.\n\n1. Build and start services:\n\n```bash\ndocker compose up --build -d\n```\n\n2. Tail logs (optional):\n\n```bash\ndocker compose logs -f backend\n```\n\n3. Open the apps in your browser:\n\n- Frontend: http://localhost:5173/\n- Backend OpenAPI docs: http://localhost:8000/docs\n\n## Development (run locally)\nBackend:\n\n```bash\ncd backend\npython -m venv .venv\nsource .venv/bin/activate   # Windows: .venv\\Scripts\\activate\npip install -r requirements.txt\nuvicorn app.main:app --reload --host 0.0.0.0 --port 8000\n```\n\nFrontend:\n\n```bash\ncd frontend\nnpm install\nnpm run dev -- --host\n```\n\nIf the frontend needs to reach the backend during development, set `VITE_API_URL` (example for local backend):\n\n```bash\nexport VITE_API_URL=http://localhost:8000\n```\n\n## API overview\nThe backend exposes REST endpoints (see OpenAPI at `/docs`). Key endpoints:\n\n- `POST /products/` — create product (201). SKU is unique.\n- `GET /products/` — list products.\n- `PUT /products/{id}` — update product.\n- `DELETE /products/{id}` — delete product.\n\n- `POST /customers/` — create customer (201). Email is unique.\n- `GET /customers/` — list customers.\n- `DELETE /customers/{id}` — delete customer.\n\n- `POST /orders/` — create order (201). Backend validates stock and customer existence, atomically reduces stock, and calculates the order total.\n- `GET /orders/` — list orders (includes `customer_name`).\n- `GET /orders/{id}` — get order details (items and totals).\n- `DELETE /orders/{id}` — delete order (restores stock and removes related order items).\n\nAll endpoints use appropriate HTTP status codes and return JSON error details on failure.\n\n## Data rules \u0026 validation\n- Product `sku` must be unique.\n- Customer `email` must be unique and a valid email address.\n- Product `quantity` is non-negative; order item `quantity` must be \u003e 0.\n- Orders cannot be placed if inventory is insufficient; order creation is transactional and will fail with a `400` if any item is out of stock.\n- Deleting an order restores product stock and removes order items atomically.\n\n## Quick curl checks\nCreate a customer:\n\n```bash\ncurl -X POST http://localhost:8000/customers/ -H \"Content-Type: application/json\" \\\n\t-d '{\"full_name\":\"Test User\",\"email\":\"test@example.com\",\"phone\":\"12345\"}'\n```\n\nTry creating an over-quantity order (should fail with 400):\n\n```bash\ncurl -X POST http://localhost:8000/orders/ -H \"Content-Type: application/json\" \\\n\t-d '{\"customer_id\":\"\u003cid\u003e\",\"items\":[{\"product_id\":\"\u003cid\u003e\",\"quantity\":9999}]}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faka-nikko%2Finventory-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faka-nikko%2Finventory-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faka-nikko%2Finventory-management-system/lists"}