# Leaf & Ember Roaster

Leaf & Ember Roaster is a lightweight control and logging tool for small-batch tea roasting. It helps operators run repeatable roast profiles, track temperature changes, record tasting notes, and maintain batch history for green, oolong, black, and herbal tea production.

## Features

- Create and save roast profiles by tea type, cultivar, origin, and batch size
- Track target temperature, airflow, drum speed, and roast duration
- Log batch metadata including harvest date, moisture level, and supplier
- Record cupping notes and post-roast adjustments
- Export batch records as CSV or JSON
- Support manual and profile-guided roasting workflows
- Simple configuration for equipment limits and default roast settings

## Install

Clone the repository:

```bash
git clone https://github.com/example/leaf-ember-roaster.git
cd leaf-ember-roaster
```

Install dependencies:

```bash
npm install
```

Copy the example environment file:

```bash
cp .env.example .env
```

Start the application:

```bash
npm run dev
```

## Usage

Create a new roast profile:

```bash
npm run roaster -- profile:create
```

Start a batch from an existing profile:

```bash
npm run roaster -- batch:start --profile "high-mountain-oolong"
```

Export completed batch logs:

```bash
npm run roaster -- export --format csv --output ./exports
```

Run tests:

```bash
npm test
```

## Configuration

Configuration is managed through `.env` and `config/roaster.json`.

Example `.env` values:

```env
ROASTER_NAME=Workshop Roaster 01
DATA_DIR=./data
EXPORT_DIR=./exports
LOG_LEVEL=info
```

Example `config/roaster.json`:

```json
{
  "maxTemperatureC": 240,
  "defaultBatchSizeG": 750,
  "temperatureIntervalSeconds": 10,
  "airflowPresets": ["low", "medium", "high"],
  "drumSpeedPresets": [30, 45, 60]
}
```

Common settings:

- `ROASTER_NAME`: Display name used in batch logs
- `DATA_DIR`: Local directory for profiles and batch records
- `EXPORT_DIR`: Destination for exported reports
- `maxTemperatureC`: Safety limit for roast profiles
- `defaultBatchSizeG`: Default green leaf weight per batch
- `temperatureIntervalSeconds`: Frequency of temperature log entries

## License

MIT