Alpaca is an open-source JavaScript forms engine that turns JSON Schema definitions into interactive HTML5 forms, rendered with Bootstrap, jQuery UI, jQuery Mobile, or plain HTML5.
What is Alpaca?
Alpaca is a client-side forms engine distributed under Apache 2.0 and maintained by Gitana Software (Cloud CMS). It accepts a JSON Schema (and Handlebars templates) as input and outputs a rendered, interactive HTML form with validation and layout. Alpaca runs entirely in the browser, requires jQuery 1.9.1 or higher, and produces UMD-ready JavaScript files that work in both AMD and CommonJS environments. The project was started in 2010 and is hosted on GitHub under the gitana/alpaca repository.
Key Features
- Multi-framework rendering — The same form definition renders with Twitter Bootstrap, jQuery UI, jQuery Mobile, or plain HTML5, with four prebuilt distributions under build/alpaca: web, bootstrap, jqueryui, and jquerymobile.
- JSON Schema driven — Form fields, validation rules, and layout are declared in JSON Schema, processed by Handlebars templating to generate controls.
- Extensible architecture — Developers can plug in custom field implementations, DOM layouts, callbacks, CSS classes, and I18N bundles without rewriting the core engine.
- HTTP connector layer — Alpaca integrates naturally with REST or HTTP backends, making it suited for hosting forms for proprietary, enterprise, or SaaS services.
- CDN distribution — Release assets are available for free via jsDelivr, e.g. https://cdn.jsdelivr.net/npm/[email protected]/dist/alpaca/bootstrap/alpaca.min.js.
- AMD/CommonJS support — Each built JS file is UMD ready, so it loads in RequireJS or Node-style module systems.
- Community and support — The project offers GitHub issues, pull requests, documentation with per-page Disqus forums, plus paid consulting and service-level support via Cloud CMS.
Who is it for?
- Web developers building JSON-driven forms — Devs who want to define forms once in JSON Schema and output Bootstrap, jQuery Mobile, or jQuery UI versions without writing duplicate markup.
- Backend and SaaS teams — Teams hosting forms for their APIs can use the connector layer to persist submissions directly to HTTP services.
- Consultants and agencies — Firms that need a stable JavaScript form engine they can extend with custom field types and layouts for client projects.
- Mobile web developers — Teams targeting mobile devices can render the same form through jQuery Mobile or Bootstrap's responsive grid.
What can you do with Alpaca?
- Registration forms — Create a signup form once and render it with Bootstrap, jQuery Mobile, jQuery UI, or AMD/RequireJS (see the four demo links on the homepage).
- Wizards and multi-step layouts — Use the built-in wizard support to break long forms into sequential steps driven by JSON Schema.
- Internationalized forms — Ship custom I18N bundles so field labels and validation messages switch languages.
- Backend-driven forms — Connect form fields to your REST backend via the connector layer for data persistence and reporting.
How does Alpaca work?
- Write a JSON Schema describing the fields, types, and validation rules.
- Load the Alpaca JavaScript and CSS for the target UI engine (web, bootstrap, jqueryui, jquerymobile) from the CDN or your build.
- Alpaca processes the schema with Handlebars templates and renders an editable form; field values are collected and can be serialized back to JSON for delivery to an HTTP endpoint.
Pros and cons
- Pros: Open-source under Apache 2.0; renders the same schema across four UI frameworks; includes wizard, I18N, and connector support; available on jsDelivr with no hosting cost.
- Cons: The latest release requires jQuery 1.9.1 or higher, so applications must already include jQuery as a dependency.
Pricing
Alpaca is free and open-source under the Apache 2.0 license. The project offers optional paid support and consulting through Cloud CMS/Gitana Software, but the software itself can be forked and used commercially without a license fee.
Alternatives
- JSON Forms — a library focused on rendering forms from JSON Schema with React, Angular, and Vue adapters.
- React JSON Schema Form — a React component that turns a JSON Schema and UI Schema into a form, popular in React projects.
FAQ
Is Alpaca free to use?
Yes, Alpaca is open source under the Apache 2.0 license, so you can use it, fork it, and even charge for your own products built on it without paying fees.
Does Alpaca work without Bootstrap?
Yes, Alpaca includes a plain web distribution (build/alpaca/web) that renders forms using standard HTML5, so it runs without Bootstrap, jQuery UI, or jQuery Mobile.
What version of jQuery does Alpaca need?
The latest release of Alpaca is compatible with jQuery 1.9.1 and up, according to the project README.
How can I get support for Alpaca?
The community offers free support through per-page Disqus forums on the documentation site, GitHub issues, and pull requests; paid support with service level agreements is available through Cloud CMS.