Update documentation for item categories feature
- Add categories.json to file structure in both docs - Document itemCategories loading in frontend architecture - Add Item Categories section to README with category table - Update data model to include category field - Update filtering documentation with categoryFilter - Add customization instructions for adding categories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
26
README.md
26
README.md
@@ -7,7 +7,8 @@ A simple web app for tracking kitchen pantry items across your household.
|
||||
## Features
|
||||
|
||||
- **Search** - Instantly filter ingredients by name
|
||||
- **Filter tabs** - View All, In Stock, Out of Stock, or Spices only
|
||||
- **Filter tabs** - View All, In Stock, Out of Stock, Recent, or by category
|
||||
- **Category tabs** - Filter by item category (Flours, Spices, Pasta, Baking, etc.)
|
||||
- **Container filtering** - Click any container type in the legend to filter by it
|
||||
- **Container tracking** - Multiple container types organized by category with color-coded indicators
|
||||
- **Stock status** - Mark items as in-stock or out-of-stock
|
||||
@@ -22,6 +23,7 @@ A simple web app for tracking kitchen pantry items across your household.
|
||||
index.html - Frontend (HTML/CSS/JS, no build step)
|
||||
api.php - Backend API (reads/writes JSON files)
|
||||
containers.json - Container type definitions with categories
|
||||
categories.json - Item category definitions
|
||||
og-image.png - OpenGraph image for social sharing
|
||||
deploy - Deployment script (rsync to server)
|
||||
data/ - Created automatically, excluded from git
|
||||
@@ -42,6 +44,23 @@ Container types are defined in `containers.json` and organized by category:
|
||||
|
||||
To add container types, edit `containers.json`.
|
||||
|
||||
## Item Categories
|
||||
|
||||
Item categories are defined in `categories.json`:
|
||||
|
||||
| Key | Display Name |
|
||||
|-----|--------------|
|
||||
| flours | Flours & Starches |
|
||||
| spices | Spices & Seasonings |
|
||||
| pasta | Pasta & Grains |
|
||||
| baking | Baking |
|
||||
| produce | Beans & Dried Produce |
|
||||
| other | Other |
|
||||
|
||||
Each item is assigned a category, which appears as a colored tag and can be filtered via category tabs.
|
||||
|
||||
To add categories, edit `categories.json`.
|
||||
|
||||
## Deployment on YunoHost (My Webapp)
|
||||
|
||||
### 1. Install My Webapp
|
||||
@@ -62,6 +81,7 @@ Upload to the `www` folder:
|
||||
- `index.html`
|
||||
- `api.php`
|
||||
- `containers.json`
|
||||
- `categories.json`
|
||||
- `og-image.png`
|
||||
|
||||
### 3. Set Permissions
|
||||
@@ -106,6 +126,10 @@ Edit the script to set your `HOST` and `DIR` variables.
|
||||
|
||||
Edit `containers.json` to add new categories or container types. The frontend loads this file automatically.
|
||||
|
||||
### Adding Item Categories
|
||||
|
||||
Edit `categories.json` to add new item categories. Each category needs a key, `name`, and `color` (hex). The frontend generates filter tabs automatically.
|
||||
|
||||
### Changing Colors
|
||||
|
||||
Edit CSS variables at the top of `index.html`:
|
||||
|
||||
Reference in New Issue
Block a user