Snaplets are self contained pieces of composable web functionality that are designed to be reused across multiple web apps.
Snaplets can define their own routes, include filesystem resources such as templates and out of the box configuration, and even depend on other snaplets. You can develop your own snaplets and publish them as a standalone project on hackage completely independent of the Snap team. We highlight a few prominent snaplets here, but a more complete list can be found in the Snap category on hackage.
Snaplets that come with Snap
- Heist templating snaplet
- Sessions snaplet with a built-in cookie-based back end
Here is a somewhat arbitrarily selected list of snaplets that are not maintained by the Snap Framework team.
- Persist native Haskell data structures with acid-state.
- Upload, download, browse, and delete files on a web server in a private file transfer area.
- HDBC database support
- A light weight i18n snaplet
- Provides splices for AJAX-enabled forms and buttons
- Support for the MySQL database using the mysql-simple library
- Support for the PostgreSQL database using the postgresql-simple library
- Support for the Postmark email system.
- Automatic (re)compilation of purescript projects.
- A ReCAPTCHA verification snaplet with connection sharing.
- Support for the redis in-memory key-value store.
- CRUD for JSON data with Redis storage.
- Support for the Sedna XML database.
- Support for sqlite.
- Support for Stripe payments.
- Allows the creation of command line tasks akin to "rake tasks" from Ruby on Rails.
- Typed session snaplets and continuation-based programming