beggarFridge/
│
├── app/
│ └── main.py
│
├── photos/
├── database/
│ └── fridge.db
│
├── .venv/
└── requirements.txt
main.py 中,會包含了 很多很多 API,在同一個檔案中,是個破千行的程式
main.py
├── Wi-Fi Device API
├── Photo API
├── Product API
├── Inventory API
├── Barcode
├── Camera
├── Recipe
├── AI
└── Notification
┌────────────────────────────┐
│ API Layer │
│ FastAPI │
│ │
│ GET /api/products │
│ POST /api/photos │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ Service Layer │
│ │
│ PhotoService │
│ InventoryService │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ Data Layer │
│ │
│ SQLite │
│ File System │
└────────────────────────────┘
main.pyapp/
├── main.py
│
└── routers/
├── __init__.py
├── health.py
├── photos.py
└── products.py
詳情請見 gitHub