# {{.ProjectName}}

A Kuetix {{.AppType}} application.

## Getting Started

### Quick Start with Runner Script

The application includes a `runner.sh` script for easy development:

```bash
# Run a workflow
./runner.sh run workflows/common/example.wsl

# Test all workflows
./runner.sh test

# Validate workflows
./runner.sh validate

# Build the application
./runner.sh build

# Clean generated files
./runner.sh clean
```

### Manual Build

```bash
make build-cli    # Build CLI application
make build-api    # Build API server
make build-consumer  # Build AMQP consumer
make build-service   # Build background service
```

### Run

#### CLI
```bash
./runtime/bin/{{.ProjectName}}-cli --workflow workflows/common/example.wsl
```

#### API
```bash
./runtime/bin/{{.ProjectName}}-api --port 8080
```

#### Consumer
```bash
./runtime/bin/{{.ProjectName}}-consumer --amqp amqp://guest:guest@localhost:5672/ --queue {{.ProjectName}}-queue --workflow workflows/common/example.wsl
```

#### Service
```bash
./runtime/bin/{{.ProjectName}}-service --workflow workflows/common/example.wsl --interval 60s
```

### Test

```bash
./runner.sh test
# or manually:
kue test
```

## Project Structure

- **cmd/** - Application entrypoints (cli, api, consumer, service)
- **workflows/** - Workflow definitions
- **modules/** - Custom modules
- **runtime/** - Configuration and logs
- **tests/** - Test files

## Development

1. Add workflows to `workflows/` directory
2. Test: `./runner.sh test`
3. Validate: `./runner.sh validate`
4. Run: `./runner.sh run <workflow>`

## Notes

- Module cache (di.go, meta.go, modules.json) is automatically generated by kue run
- No need to manually run kueinit before running workflows
- The runner script handles all common development tasks

## License

MIT
