- Clone this repository:
git clone https://github.com/your-username/ecommerce-admin-api.git cd ecommerce-admin-api
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Set up MySQL database and configure `DATABASE_URL` in `database.py`.
4. Run the application:
```bash
uvicorn app.main:app --reload
```
5. Populate the database with demo data:
```bash
python demo_data.py
```
## API Endpoints
* `GET /sales/status`: Retrieve sales status.
* `GET /sales/revenue/{period}`: Retrieve revenue based on period (daily, weekly, etc.).
* `GET /inventory`: Retrieve inventory status with low stock alerts.
* `POST /product/`: Create a new product.
After setting everything up, you can run your FastAPI app using Uvicorn:
uvicorn app.main:app --reload