Files
Fridger/README.md
T
me0nline 9a2d77ffec
Build and Push Fridger Container / Build & Push Fridger Image (push) Failing after 31s
ci(docker): add production dockerfile, compose config, and gitea actions pipeline
2026-10-10 22:38:01 +02:00

100 lines
3.1 KiB
Markdown

# 🧊 Fridger
> Smart Fridge Inventory & Grams Tracker with live Barcode Scanner and Dual View/Manage modes.
![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker)
![Node.js](https://img.shields.io/badge/Node.js-22+-339933?logo=node.js)
![SQLite](https://img.shields.io/badge/Database-SQLite-003B57?logo=sqlite)
---
## ✨ Features
- **👁️ Fridge View Mode ("What's in my fridge?")**:
- Visual layout organized by shelf/compartment (Top Shelf, Middle Shelf, Bottom Shelf, Crisper Drawer, Door Rack, Freezer).
- Clear stock level and remaining grams/ml progress indicators with percentage fullness.
- Expiration countdown badges (Fresh, Expiring Soon, Expired).
- Quick consume buttons (`-50g`, `-100g`, `-1 item`, or custom slider).
- **⚙️ Manage Fridge Mode**:
- Full inventory CRUD management.
- **Dynamic Grams/Weight Tracking**: When an item has weight (e.g. 250g cheese pack, 1kg flour, 500ml cream), easily slide or click quick-adjustment chips (`-10g`, `-25g`, `-50g`, `-100g`, `Half`, `Empty`) to log partial usage after cooking.
- Opened vs. unopened item tracking with open date.
- **📸 Live Barcode Scanner & Search**:
- Camera-based barcode scanner (`html5-qrcode`) directly in your browser (mobile & desktop).
- Open Food Facts API integration for instant autofill: product title, brand, package net weight (grams/ml/units), category, and image.
- No nutrition/macro clutter — purely focused on what is in your fridge and how much is left!
- **🚀 Self-Contained Container & CI/CD**:
- Lightweight Alpine container (`node:22-alpine`) with built-in SQLite engine.
- Automated build & push pipeline via Gitea Actions to `gitea.eibl.tech/me0nline/fridger:latest`.
---
## 🐳 Quick Start with Docker
### Using Docker Run
```bash
docker run -d \
--name fridger \
-p 3000:3000 \
-v fridger-data:/data \
gitea.eibl.tech/me0nline/fridger:latest
```
### Using Docker Compose
```yaml
services:
fridger:
image: gitea.eibl.tech/me0nline/fridger:latest
container_name: fridger
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- fridger-data:/data
volumes:
fridger-data:
name: fridger-data
```
Access the web interface at **`http://localhost:3000`**.
---
## 🛠️ Local Development
```bash
# 1. Install dependencies
npm install
# 2. Run backend test suite
npm test
# 3. Start development server
npm start
```
---
## 📡 REST API Summary
| Method | Endpoint | Description |
|---|---|---|
| `GET` | `/api/items` | List items (supports `search`, `category`, `location`, `status`) |
| `GET` | `/api/items/:id` | Get single item details |
| `POST` | `/api/items` | Add item |
| `PUT` | `/api/items/:id` | Update item details |
| `PATCH` | `/api/items/:id/quantity` | Adjust grams/count (`{ delta: -50 }` or `{ newQuantity: 150 }`) |
| `DELETE` | `/api/items/:id` | Remove item |
| `GET` | `/api/barcode/:code` | Barcode lookup (local cache + Open Food Facts) |
| `GET` | `/api/stats` | Summary stats (total, fresh, expiring soon, opened, low) |
| `GET` | `/api/meta` | Predefined categories, shelf locations, and units |
| `GET` | `/health` | Healthcheck status |
---
## 📜 License
MIT