English → API

Compile natural language API descriptions into idiomatic, high-performance Go backend services with routing, models, and database integration.

Generated File Structure
FilePurpose
main.goServer setup, router initialization, middleware
models/user.goGo struct with JSON tags for each model
handlers/user.goHTTP handler functions for each route
database/db.goDatabase connection and auto-migration
middleware/auth.goBearer token authentication middleware
go.modModule definition and dependency declarations
Supported Field Types
English TypeGo Type
"string", "text"string
"number", "integer"int
"float", "decimal"float64
"boolean"bool
"date", "time"time.Time
"id", "uuid"string
Database Support

The engine supports PostgreSQL, MySQL, and SQLite via GORM. When a database is specified, the generator creates a database/db.go file with connection logic and AutoMigrate calls, and updates all handler functions to use db.Find, db.Create, db.Save, and db.Delete.

Examples
English Input
"Create a User API with name and email fields. Generate full CRUD endpoints at /users."
Data Columns
FieldTypeValue / DefaultModifier
IDintauto-incrementjson:"id"
Namestringrequiredjson:"name"
Emailstringrequiredjson:"email"
GET /usersroutelist allno auth
POST /usersroutecreateno auth
GET /users/{id}routeget by idno auth
Generated OutputGo
// models/user.go
package models

type User struct {
    ID    int    `json:"id"`
    Name  string `json:"name"`
    Email string `json:"email"`
}

// handlers/user.go
package handlers

import (
    "encoding/json"
    "net/http"
    "strconv"
    "github.com/gorilla/mux"
)

var users []models.User
var nextID = 1

func GetUsers(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(users)
}

func CreateUser(w http.ResponseWriter, r *http.Request) {
    var u models.User
    json.NewDecoder(r.Body).Decode(&u)
    u.ID = nextID; nextID++
    users = append(users, u)
    w.WriteHeader(http.StatusCreated)
    json.NewEncoder(w).Encode(u)
}

func GetUser(w http.ResponseWriter, r *http.Request) {
    id, _ := strconv.Atoi(mux.Vars(r)["id"])
    for _, u := range users {
        if u.ID == id {
            json.NewEncoder(w).Encode(u)
            return
        }
    }
    http.NotFound(w, r)
}

// main.go
package main

import (
    "log"
    "net/http"
    "github.com/gorilla/mux"
)

func main() {
    r := mux.NewRouter()
    r.HandleFunc("/users", handlers.GetUsers).Methods("GET")
    r.HandleFunc("/users", handlers.CreateUser).Methods("POST")
    r.HandleFunc("/users/{id}", handlers.GetUser).Methods("GET")
    log.Fatal(http.ListenAndServe(":8080", r))
}