yamlforge is a single-binary tool that generates and serves complete web applications from YAML configuration files. Define your data models, validation rules, and UI preferences in YAML, and yamlforge instantly creates a working application with both backend API and frontend interface.
- Single YAML file: Create functional web applications without writing code just a single YAML file
- Single Binary: No dependencies or runtime requirements
- Instant Preview: Live development server with hot reload
- Auto-generated API: RESTful endpoints with pagination, filtering, and sorting
- Built-in UI: Responsive web interface with list, form, and detail views
- SQLite Support: Embedded database with automatic schema generation
- Validation: Server-side validation with customizable rules
- Field Types: Support for text, number, boolean, email, datetime, enum, and more
go get github.com/yamlforge/yamlforge
go build -o yamlforge cmd/yamlforge/main.go- Create a YAML configuration file:
app:
name: "My App"
version: "1.0.0"
database:
type: sqlite
path: "./data.db"
models:
Task:
fields:
id:
type: id
primary: true
title:
type: text
required: true
completed:
type: boolean
default: false- Start the development server:
./yamlforge serve myapp.yaml- Open your browser to
http://localhost:8080
# Start development server
yamlforge serve <config.yaml> [options]
# Validate configuration
yamlforge validate <config.yaml>
# Options
-port int Server port (default 8080)
-host string Server host (default "0.0.0.0")app:
name: "Application Name"
version: "1.0.0"
description: "Application description"database:
type: sqlite
path: "./data.db"server:
port: 8080
host: "0.0.0.0"
cors:
enabled: true
origins: ["*"]
auth:
type: jwt
secret: "your-secret-key"
expires: "24h"ui:
theme: "light" # light | dark | auto
title: "My App"
logo: "./logo.png"
layout: "sidebar" # sidebar | topbarmodels:
ModelName:
fields:
fieldName:
type: text
required: true
# ... other validations
ui:
list:
columns: ["field1", "field2"]
sortable: ["field1"]
searchable: ["field1"]
form:
fields: ["field1", "field2"]
permissions:
create: "authenticated"
read: "all"
update: "owner"
delete: "admin"text: String field with min/max lengthnumber: Integer with min/max valueboolean: True/false checkboxdatetime: Date and time pickerdate: Date onlytime: Time only
id: Auto-generated unique identifieremail: Email with validationpassword: Secure password fieldenum: Select from optionsrelation: Foreign key referencearray: List of itemsmarkdown: Rich text editor
required: Field must have a valueunique: Value must be uniquemin/max: Length or value limitspattern: Regex validationdefault: Default value
For each model, the following endpoints are automatically generated:
GET /api/{model}- List with paginationGET /api/{model}/{id}- Get single recordPOST /api/{model}- Create new recordPUT /api/{model}/{id}- Update recordDELETE /api/{model}/{id}- Delete recordPOST /api/{model}/bulk- Bulk operations
page: Page number (default: 1)page_size: Items per page (default: 20)sort: Sort fields (prefix with-for DESC)search: Search in searchable fieldsfilter.{field}: Filter by field value
Example: /api/tasks?page=2&sort=-created_at&filter.status=todo
See the examples/ directory for complete examples:
blog.yaml- Simple blog applicationtasks.yaml- Task management systemusers.yaml- User management with relationships
yamlforge/
βββ cmd/yamlforge/ # Main entry point
βββ internal/
β βββ parser/ # YAML parsing
β βββ database/ # Database layer
β βββ api/ # API handlers
β βββ server/ # HTTP server
β βββ ui/ # Frontend assets
β βββ validation/ # Validation logic
βββ examples/ # Example configurations
# Install dependencies
go mod download
# Build binary
go build -o yamlforge cmd/yamlforge/main.go
# Run tests
go test ./...MIT License - see LICENSE file for details


