> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enferno.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AI-Assisted Development

> Build faster with AI coding assistants

## Overview

Enferno is built for AI-assisted development. It ships with `AGENTS.md` — a comprehensive guide that AI assistants (Claude Code, Cursor, GitHub Copilot) use to understand the codebase instantly.

## How It Works

When you open the project in an AI-powered IDE or use Claude Code, the AI reads `AGENTS.md` and immediately understands:

* Project structure and conventions
* Database patterns (SQLAlchemy 2.x)
* Frontend patterns (Vue 3 + Vuetify 3 without build tools)
* Authentication system (Flask-Security)
* CLI commands available
* How to create new features

## Using Claude Code

```bash theme={null}
# Claude Code understands Enferno out of the box
claude

# Example prompts:
> "Add a new Post model with title and content"
> "Create an API endpoint to list all users"
> "Add a new page to the dashboard"
```

## Using Cursor

Open the project in Cursor. The AI will automatically read `AGENTS.md` and provide context-aware suggestions.

Example prompts:

* "Create a data table for products following our patterns"
* "Add OAuth login with Microsoft"
* "Generate a RESTful endpoint for orders"

## What AGENTS.md Contains

The file includes:

### Development Commands

```bash theme={null}
./setup.sh                    # Setup environment
uv run flask create-db        # Initialize database
uv run flask install          # Create admin user
uv run flask run              # Start server
```

### Architecture Overview

* Flask factory pattern in `enferno/app.py`
* Blueprint organization (public, portal, user)
* Extension initialization in `extensions.py`

### Code Patterns

```python theme={null}
# Query pattern (SQLAlchemy 2.x)
query = db.select(User)
pagination = db.paginate(query, page=page, per_page=per_page)

# Response pattern
return {
    "items": [item.to_dict() for item in pagination.items],
    "total": pagination.total
}
```

### Frontend Patterns

* Vue 3 with custom `${}` delimiters (avoids Jinja conflicts)
* Vuetify 3 components
* Per-page Vue instances

## Customizing for Your Project

Add project-specific patterns to `AGENTS.md`:

```markdown theme={null}
## Custom Patterns

### Order Processing
Orders follow this flow:
1. Create order via POST /api/orders
2. Process payment via Stripe
3. Update status to 'paid'
```

The AI will incorporate your additions when generating code.

## Benefits

1. **Instant Context** — AI understands your codebase immediately
2. **Consistent Code** — Generated code follows your patterns
3. **Faster Development** — Less time explaining, more time building
4. **Team Knowledge** — Document patterns once, AI applies everywhere
