95 lines
2.2 KiB
Markdown

# Small Business Inventory Management System
A RESTful API for managing inventory for small businesses, built with FastAPI and SQLite.
## Features
- **Inventory Management**: Track items, categories, and suppliers
- **User Authentication**: Secure API endpoints with JWT authentication
- **Reporting**: Generate inventory reports
- **RESTful API**: Well-documented API with Swagger UI
## Technologies Used
- **FastAPI**: High-performance web framework
- **SQLAlchemy**: SQL toolkit and ORM
- **Alembic**: Database migration tool
- **SQLite**: Lightweight database
- **JWT**: Authentication mechanism
- **Pydantic**: Data validation
- **Uvicorn**: ASGI server
## API Endpoints
- **Authentication**: `/api/v1/auth/*`
- **Users**: `/api/v1/users/*`
- **Items**: `/api/v1/items/*`
- **Categories**: `/api/v1/categories/*`
- **Suppliers**: `/api/v1/suppliers/*`
- **Reports**: `/api/v1/reports/*`
- **Health Check**: `/health`
## Getting Started
### Prerequisites
- Python 3.7+
### Installation
1. Clone the repository
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run the migrations:
```bash
alembic upgrade head
```
4. Start the server:
```bash
uvicorn main:app --reload
```
5. Visit the API documentation at [http://localhost:8000/docs](http://localhost:8000/docs)
## Project Structure
```
├── app
│ ├── api
│ │ ├── api_v1
│ │ │ ├── endpoints
│ │ │ │ ├── auth.py
│ │ │ │ ├── categories.py
│ │ │ │ ├── items.py
│ │ │ │ ├── reports.py
│ │ │ │ ├── suppliers.py
│ │ │ │ └── users.py
│ │ │ └── api.py
│ │ └── deps.py
│ ├── core
│ │ ├── config.py
│ │ └── security.py
│ ├── crud
│ ├── db
│ │ └── session.py
│ ├── models
│ ├── schemas
│ └── utils
├── migrations
│ ├── versions
│ ├── env.py
│ └── script.py.mako
├── storage
│ └── db
├── alembic.ini
├── main.py
├── README.md
└── requirements.txt
```