Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
JavaScript HTML PHP CSS Ruby Cucumber Other
Failed to load latest commit information.
config Updates to documentation, fixes to form builder and improvements to o…
deployment Added deployment code (for web site)
features Addition of setTimeout to fix for CKEditor madness with reinstantiation
gulp Updates to builder comments for all files + build improvements
lib Merge 1.5.0-DEV to master
server Code updates for release, deployment scripts, etc
site Table sorting and table filtering
src Table sorting and table filtering
tests Merge and upgrade to latest v3.0.3 handlebars
thirdparty/base Updated base
.bowerrc Using respond js
.gitignore Updated .gitignore
.jshintrc Added jshint
.testem.json Merge branch '1.5.0.cucumber' into 1.5.0-DEV
Gruntfile.js Cleanup references to jquery-price-format, script updates
README.md Updates to readme
alpaca.jquery.json Fix to bower.json, version bump, prep for more work
bower.json Added "manualEntry" option for DateField and updated example #2 to ad…
deploy-cleanup.sh added cleanup script
deploy.sh Updates to web site
favicon.ico Slimmer, prettier and better Alpaca.
gulpfile.js Updates to OptionTree field, support for horizontal layout, improved …
jsdoc.conf.json Code updates for release, deployment scripts, etc
license.txt version bump to 1.1.3
package.json Merge and upgrade to latest v3.0.3 handlebars
tests.mustache Fixed prototype walking

README.md

Alpaca - Easy Forms for jQuery and Bootstrap

Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide developers with an extensible framework for implementing controls, wizards, layouts, I18N support and an custom data persistence.

The goal of Alpaca is to provide the open source community with a fantastic forms engine that rivals or beats what most proprietary vendors offer. Using Alpaca, you can host really nice forms for your back end services, whether they are proprietary, enterprise or SaaS offerings.

The philosophy behind Alpaca is that you should design your forms once and have them work on lots of different devices and UI engines without having to do the same work twice.

Here is a sample registration form written once and rendered using four different approaches:

Alpaca is an open-source project licensed under Apache 2.0. It is actively developed and maintained by Cloud CMS. Enterprise support is available for your production deployments.

Project Home Page

For information, demos and documentation regarding Alpaca, please visit the the Alpaca Forms home page.

Compatibility

Alpaca is compatible with jQuery 1.9.1 and up.

Issues and Discussions

If you have a question about Alpaca, please visit the Alpaca Forums. This is a place where we encourage the community and developer community to get together to support one another in their Alpaca-related projects.

If you find an issue with Alpaca, please add a new issue ticket.

How to Build Alpaca

The first thing you should do is grab the source. We won't cover how to do that here but instead we recommend that you learn about Git and GitHub. You can pull the source down to your local machine to build things locally.

The command line for doing this is basically:

git clone https://github.com/gitana/alpaca.git

Prerequisites

To build Alpaca, you will need to have Node.js, Gulp and Bower installed. If you're new to Node.js or Gulp, you could check out this writeup - http://travismaynard.com/writing/getting-started-with-gulp.

Once you have Node.js installed, you essentially need to do this:

npm install gulp -g
npm install bower -g

Building Alpaca

Building Alpaca is pretty easy. Just run:

npm install

This will do the following for you:

  • pull down all of the Node module dependencies
  • run Bower to pull down client-side (browser) dependencies

To then build, you can do this:

npm start

If you want to use Gulp directly, you can alternatively run this:

gulp clean default

Either npm start or gulp clean default will build everything. The build distribution assets will be in build/alpaca.

Building the Web Site and Running a local Web Server

Alpaca includes a web site along with documentation, samples and much more. To build the web site, you will first need to install Jekyll (not covered here).

Simply do this:

gulp site

And you can run a local web server like this:

gulp server

Alpaca Distributions

The build produces four sets of assets and they are placed in:

  • build/alpaca/web (for basic web forms and layout)
  • build/alpaca/bootstrap (for bootstrap enabled forms and layout)
  • build/alpaca/jqueryui (for jQuery UI enabled forms and layout)
  • build/alpaca/jquerymobile (for jQuery Mobile enabled forms and layout)

Each directory contains a JS file and a CSS file for its respective build.

Each JS file is UMD ready and will work within both an AMD and CommonJS container.

Troubleshooting

If you run into any Bower related issues during the build, you might want to clear out your Bower cache using this command:

bower cache clean

And then try again.

Manual build commands

While npm install will pretty much do everything for you, there are also some manual commands you can run if you need to perform individual steps:

  • To install Bower assets, do bower install
  • To clear Bower cache, do bower cache clean
  • To run the Gulp build, do gulp
  • To build the Alpaca web site, do gulp default server
  • To run a local Alpaca web server, gulp default server

CDN

All of the Alpaca distribution assets are available via CDN at http://cdn.alpacajs.org.

Connecting to Cloud CMS

Alpaca works with any backend HTTP service. There is a connector layer and you can plug in your own persistence for forms, schema, options and layout.

Alpaca works out-of-the-box with Cloud CMS. Cloud CMS is a cost-effective backend content management system for mobile and web applications. If you're looking for a quick way to capture and report on forms, please consider checking it out.

Questions, Getting Involved and Contributing

There are several ways to interact with the Alpaca community.

  • Browse the documentation and try out the interactive examples. On each page, you'll find a Disqus forum that you can use to ask questions specific to that page. As others browse the documentation, they'll find your question and will have the context at hand to answer it.
  • Visit the Alpaca.js forums and ask your question to the broader Cloud CMS community. Be sure to include code samples, URLs or http://jsfiddle.net/ links so that others can reproduce your scenario quickly. It's always best to empower others to help you.
  • Add a GitHub Issue if you've found an actual bug or have a feature request that you'd like to get prioritized into the roadmap.
  • Submit a Pull Request if you've fixed a bug and want to contribute code back to the Alpaca project. This is the most powerful and effective way to influence the product. Pull requests give you a way to write your own additions or adjustments to the code base and make it very easy for us to merge your changes into the product.
  • Contact Cloud CMS if you have an urgent issue, a high priority deliverable or need technical support for Alpaca in production. Cloud CMS sponsors the Alpaca project and can put engineers on your project to get things done quickly.

Can I fork Alpaca and use it my own projects?

Yes, absolutely. That's the whole idea. Fork it, use it in your projects, make money from it, live a better life, spend more time with your kids. We hope that Alpaca proves useful to you.

If you come up with something good (like a bug fix or a new feature), consider submitting a Pull Request back to the project so that others may benefit. And so that they too might, in turn, get more sleep, enjoy your work, be happier and get more out of this adventure called life.

Contributors

...and many others via the Alpaca Web Site, the Alpaca Forums and Alpaca Issues!

Something went wrong with that request. Please try again.