---
name: scaffold_wails_app
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: impure
signature: "ScaffoldWailsApp(ctx context.Context, cfg ScaffoldWailsAppConfig) error"
description: "Genera proyecto Wails completo: main.go con embed, app.go con bindings base, wails.json, go.mod, y frontend vinculado a Frontend_Library."
tags: [wails, scaffold, desktop, project, generator]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [os, os/exec, path/filepath, text/template, fmt, strings, context]
params:
  - name: ctx
    desc: "context para cancelacion"
  - name: cfg
    desc: "estructura ScaffoldWailsAppConfig con Name, Dir, Title, Width, Height, Author"
output: "nil si el scaffold fue exitoso, error en caso contrario"
tested: false
tests: []
test_file_path: ""
file_path: "functions/infra/scaffold_wails_app.go"
---

## Ejemplo

```go
ScaffoldWailsApp(ctx, ScaffoldWailsAppConfig{
    Name:   "my-dashboard",
    Dir:    "/home/user/projects/my-dashboard",
    Title:  "My Dashboard",
    Width:  1280,
    Height: 800,
    Author: "Lucas",
})
```

## Notas

Pipeline que compone: generación de templates Go + creación de frontend via create-project.sh de Frontend_Library + go mod tidy. Incluye GenerateAppBinding para crear métodos de binding programáticamente.
