# NextSpark App Templates

This directory contains EJS templates used to generate the `/app` directory structure in projects using NextSpark.

## Template Variables

Templates have access to the following variables from `nextspark.config.ts`:

- `config.theme` - Active theme name
- `config.plugins` - Array of enabled plugins
- `config.features` - Feature flags (billing, teams, superadmin, etc.)
- `config.app.name` - Application name
- `config.app.description` - Application description

## Template Files

Files ending in `.ejs` are processed as EJS templates. Other files are copied directly.

## Auto-Generated Header

All generated files include this header:

```
/**
 * AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
 * Generated by @nextspark/core
 * Regenerate with: npx nextspark generate
 */
```

## Regeneration

To regenerate the `/app` directory from these templates:

```bash
npx nextspark generate
```

> **Note:** To customize app pages, use theme template overrides in `contents/themes/{theme}/templates/` instead of modifying generated files directly.
