🚀 English → Backend

Compile natural language API descriptions into complete Swift/Vapor backend services with Fluent ORM database integration and async/await routing.

Generated Project Structure
File / DirectoryPurpose
Sources/App/Models/Fluent model classes with @ID, @Field wrappers
Sources/App/Migrations/AsyncMigration structs for schema creation
Sources/App/Controllers/RouteCollection structs with handler methods
Sources/App/configure.swiftDatabase, migrations, and route registration
Sources/App/routes.swiftTop-level route definitions
Package.swiftSwift Package Manager manifest
Fluent ORM Integration

Every generated model is a Fluent Model and Content. The engine generates the corresponding AsyncMigration struct automatically, including prepare(on:) to create the schema and revert(on:) to roll it back. Supported databases include PostgreSQL, MySQL, and SQLite.

Authentication

The engine recognizes phrases like "requires authentication" or "protected" and applies Vapor's UserToken.authenticator() middleware to those routes. Public routes are grouped separately and require no token.

Examples
English Input
"Create a Todo API with title and completed fields. Generate GET and POST endpoints at /todos."
Data Columns
FieldTypeValue / DefaultModifier
idUUID@ID(key: .id)Fluent primary key
titleStringrequired@Field(key: "title")
completedBooldefault: false@Field(key: "completed")
GET /todosroutelist allasync throws
POST /todosroutecreateasync throws
Generated OutputSwift/Vapor
// Sources/App/Models/Todo.swift
import Vapor
import Fluent

final class Todo: Model, Content {
    static let schema = "todos"

    @ID(key: .id)
    var id: UUID?

    @Field(key: "title")
    var title: String

    @Field(key: "completed")
    var completed: Bool

    init() {}
    init(id: UUID? = nil, title: String, completed: Bool = false) {
        self.id = id; self.title = title; self.completed = completed
    }
}

// Sources/App/Controllers/TodoController.swift
import Vapor

struct TodoController: RouteCollection {
    func boot(routes: RoutesBuilder) throws {
        let todos = routes.grouped("todos")
        todos.get(use: list)
        todos.post(use: create)
    }

    func list(req: Request) async throws -> [Todo] {
        try await Todo.query(on: req.db).all()
    }

    func create(req: Request) async throws -> Todo {
        let todo = try req.content.decode(Todo.self)
        try await todo.save(on: req.db)
        return todo
    }
}