https://github.com/kazerlelutin/bento
Bento generator
https://github.com/kazerlelutin/bento
bun cook generator pixel-art
Last synced: 1 day ago
JSON representation
Bento generator
- Host: GitHub
- URL: https://github.com/kazerlelutin/bento
- Owner: kazerlelutin
- Created: 2025-04-26T20:14:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-27T14:57:53.000Z (about 2 months ago)
- Last Synced: 2026-04-27T16:28:55.424Z (about 2 months ago)
- Topics: bun, cook, generator, pixel-art
- Language: HTML
- Homepage: https://ben-to.fr/
- Size: 1.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# ๐ฑ BENTO - Interactive Recipe Generator
**Join the community:**
[#bento on Matrix (matrix.ben-to.fr)](https://matrix.to/#/#bento:matrix.ben-to.fr)
**Support the project:**
[Ko-fi](https://ko-fi.com/kazerlelutin)
_Public Matrix room โ open the link above in Element, FluffyChat, or any client (`#bento:matrix.ben-to.fr`)._
[](https://bun.sh/)
[](https://www.typescriptlang.org/)
[](https://cucumber.io/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/kazerlelutin/bento)
[](https://github.com/kazerlelutin/bento)
[](https://github.com/kazerlelutin/bento)
> An interactive recipe generator with pixel art, allowing you to create recipe variants from modular bases.
## ๐ Concept
**Bento** is a web application that turns recipe creation into an interactive and fun experience. Users can create recipe variants by combining modular bases with specific ingredients and steps, all with a retro pixel art design.
## ๐งญ How it works
### โจ **No account required**
The app works instantly, no signup or account needed.
### ๐ฏ **Guided journey**
1. **Choose your recipe base**: cake, onigiri, empanada, etc.
2. **Select a variant**: lemon cake, kimchi onigiri, veggie empanada, etc.
3. **Review ingredients**: automatic combination of base + variant ingredients
4. **Follow steps**: ordered sequence of preparation steps
5. **Export recipe**: generate markdown or JSON format
### ๐จ **Visual experience**
- Each ingredient is represented by a pixel art icon
- Retro and playful design
- Modular recipe system with bases and variants
- Step-by-step recipe generation
## ๐ค Goal: Create, not store
The goal is **not to save recipes** but to let users:
- ๐ **Generate recipes** in markdown or JSON format
- ๐ฎ **Have fun** exploring recipe variants and combinations
- ๐ฑ **Discover** modular cooking concepts
- ๐ **Learn** about recipe structure and ingredient relationships
## ๐ง Technology & Values
### ๐ ๏ธ **Tech stack**
- **Frontend**: Vanilla JS/TS, HTML, CSS
- **Hosting**: Infomaniak
- **Database**: IndexedDB
- **Runtime**: Bun
### ๐จ **Design**
- **Style**: All pixel art, retro
- **UX**: Intuitive and playful interface
- **Responsive**: Mobile and desktop friendly
### ๐ฑ **Values**
- **Eco-friendly**: Optimized, local-first
- **Privacy-respecting**: No intrusive ads
- **Minimalist**: Simple and efficient stack
- **Educational**: Discover modular cooking concepts
## ๐ Why No Framework?
This app demonstrates you can build a modern experience **without a heavy framework**:
- โก **Maximum performance** - No framework overhead
- ๐ฆ **Minimal bundle** - Only the code you need
- ๐ฏ **Full control** - No hidden "magic"
- ๐ **Fast startup** - Bun + vanilla JS
- ๐ง **Learning** - Understand the fundamentals
## ๐ Architecture
```
bento/
โโโ app.ts # Main entry point
โโโ index.html # Main HTML page with templates
โโโ features/ # Feature-based architecture
โ โโโ recipe/ # Recipe system (bases, variants, ingredients)
โ โโโ router/ # Navigation management
โ โโโ translate/ # Multi-language support
โ โโโ export/ # Recipe export functionality
โ โโโ composer/ # Recipe composition interface
โโโ docs/ # Generated documentation
โ โโโ feature-documentation.md
โโโ scripts/ # Utility scripts
โ โโโ generate-feature-docs.ts
โโโ public/ # Static assets
โโโ style.css
```
## ๐ง Main Features
### 1. **Modular Recipe System**
Create recipes from bases and variants:
```typescript
// Base recipe
const cakeBase = {
ingredients: [
'sugar_powder',
'butter_soft',
'eggs',
'flour_t55',
'baking_powder',
],
steps: [
{ id: 'melt_butter', order: 10 },
{ id: 'mix_butter_sugar', order: 20 },
{ id: 'add_flour_baking_powder', order: 40 },
],
}
// Variant recipe
const lemonCakeVariant = {
ingredients: ['lemon', 'lemon_juice'],
steps: [{ id: 'add_lemon_zest_juice', order: 30 }],
}
```
### 2. **Ordered Step System**
Steps are automatically ordered and merged:
```typescript
// Final recipe combines base + variant steps
const finalSteps = [
{ id: 'melt_butter', order: 10 },
{ id: 'mix_butter_sugar', order: 20 },
{ id: 'add_lemon_zest_juice', order: 30 }, // From variant
{ id: 'add_flour_baking_powder', order: 40 },
].sort((a, b) => a.order - b.order)
```
### 3. **Recipe Export**
Generate recipes in multiple formats:
```typescript
// Export to Markdown
const markdown = recipe.toMd()
// Export to JSON
const json = recipe.toJson()
```
### 4. **Feature-based Architecture**
Code organized by business features:
- **Recipe**: Base and variant management
- **Router**: Navigation management
- **Export**: Recipe export functionality
- **Composer**: Recipe composition interface
## ๐งช BDD Tests
The project uses Cucumber for BDD tests, allowing you to describe behavior in natural language:
```gherkin
Feature: Recipe Generation
As a user
I want to create recipe variants
So that I can explore different cooking options
Scenario: Creating a lemon cake
When I select "cake" as base
And I choose "lemon" variant
Then I should see the combined recipe
And the steps should be properly ordered
```
### Documentation Generation
Feature documentation is generated automatically:
```bash
bun run docs:features
```
๐ **[See the feature documentation](./docs/feature-documentation.md)**
## ๐ ๏ธ Installation & Usage
### Prerequisites
- [Bun](https://bun.sh/) installed
### Installation
```bash
# Clone the project
git clone
cd bento
# Install dependencies
bun install
```
### Development
```bash
# Start the dev server
bun run dev
# Run integration tests
bun run test:integration
# Generate documentation
bun run docs:features
```
### Build
```bash
# Production build
bun run build
```
## ๐ Available Scripts
| Script | Description |
| -------------------------- | -------------------------------- |
| `bun run dev` | Development server |
| `bun run test:integration` | Cucumber integration tests |
| `bun run docs:features` | Generate feature documentation |
| `bun run build` | Production build |
| `bun run coverage` | Generate coverage report |
| `bun run badge:coverage` | Update the coverage badge |
| `bun run validate:recipes` | Validate recipe system integrity |
## ๐ท๏ธ Badges & Quality
### Coverage Badges
The coverage badge is generated automatically from test results:
```bash
# Generate the badge from current coverage
bun run badge:coverage
# Generate the badge with a specific coverage
bun run badge:coverage 85
```
### Badge Colors
- ๐ข **Bright Green**: 90%+ (Excellent)
- ๐ข **Green**: 80-89% (Good)
- ๐ก **Yellow Green**: 70-79% (Acceptable)
- ๐ก **Yellow**: 60-69% (Needs improvement)
- ๐ **Orange**: 50-59% (Low)
- ๐ด **Red**: <50% (Critical)
## ๐ฏ Approach Advantages
### โ
**Performance**
- No framework overhead
- Minimal bundle
- Ultra-fast startup with Bun
### โ
**Simplicity**
- Vanilla JavaScript/TypeScript code
- No abstract concepts to learn
- Full control over architecture
### โ
**Maintainability**
- Clear and predictable architecture
- BDD tests for quality
- Auto-generated documentation
- Recipe system validation to prevent regressions
### โ
**Scalability**
- Easy to add new ingredients
- Modular structure
- No framework limitations
## ๐ฑ Supported Recipes
### ๐ฐ **Cake Base**
- **Base ingredients**: Sugar, butter, eggs, flour, baking powder
- **Variants**: Lemon cake, chocolate cake, vanilla cake
- **Steps**: Melt butter โ Mix ingredients โ Add flavorings โ Bake
### ๐ **Onigiri Base**
- **Base ingredients**: Rice, water, salt
- **Variants**: Kimchi onigiri, cheese onigiri
- **Steps**: Wash rice โ Cook rice โ Season โ Shape
### ๐ฅ **Empanada Base**
- **Base ingredients**: Flour, water, salt, oil
- **Variants**: Savory veggie empanada, black bean empanada
- **Steps**: Mix dough โ Knead โ Rest โ Fill and cook
### ๐ง **Ingredient Categories**
- **Liquids**: Water, lemon juice, oils
- **Powders**: Salt, sugar, spices, baking powder
- **Fats**: Butter, margarine
- **Grains**: Rice, flour varieties
- **Vegetables**: Onions, peppers, corn
- **Proteins**: Eggs, beans, tempeh
## ๐ฌ Community
**[Join #bento on Matrix](https://matrix.to/#/#bento:matrix.ben-to.fr)** โ same invitation link as in the page header (project home server).
## ๐ค Contributing
Please read the [Contributing Guide](./CONTRIBUTING.md) for detailed instructions, naming conventions, feature structure, and workflow before opening a pull request.
1. Fork the project
2. Create a feature branch (`git checkout -b feature/NewIngredient`)
3. Commit your changes (`git commit -m 'Add new ingredient'`)
4. Push to the branch (`git push origin feature/NewIngredient`)
5. Open a Pull Request
## ๐ License
This project is MIT licensed. See the `LICENSE` file for details.
## ๐จโ๐ป Author
**Kazerlelutin**
- ๐จ [Gif creator](https://giphy.com/kazerlelutin)
- โจ๏ธ JavaScript developer
- ๐ [Portfolio](https://kazerlelutin.space/)
---
[](https://ko-fi.com/V7V46KBQ9)