Sandbar is a set of small libraries for web applications which is designed to be used with Compojure and/or Ring. It is a work in progress. The following features will be implemented in order.
- Stateful session management
- Authorization and authentication
- Form layout, validation and error reporting
- Basic (form based) authentication
- Tables which may be filtered, sorted and paged
- User management
The name “sandbar” is a surfing reference. A sandbar creates waves which may be surfed. Sandbar creates web sites which may be surfed. Sandbars are always in a state of change. So is this project.
The project contains the library code as well as a reference application which uses it. There are also small demo applications which show how to use each feature.
The current version of Sandbar contains two completed features:
- Stateful sessions
- Authorization and authentication
Documentation for completed features is located in the Sandbar Wiki.
By completed, I mean that they have taken the final form that they will have in version 1.0.0. There is still much work to be done to test them and to make them more robust.
If you would like to use Sandbar in your project then you may use the currently available 0.2.3 release that is on Clojars.
To include all Sandbar libraries in your Leiningen project, add the following to your :dependencies
[sandbar/sandbar "0.2.3"]
If you would like to use only the individual libraries then you may use:
[sandbar/sandbar-core "0.3.0"]
[sandbar/sandbar-session "0.2.3"]
[sandbar/sandbar-auth "0.2.3"]
[sandbar/sandbar-dev "0.0.1-SNAPSHOT"]
Please not that the code in sandbar-dev is very pre-alpha. It will change often and may not work.
The reference application demonstrates how to use the sandbar libraries.
To run the reference application, follow these steps:
- Install Leiningen
- Configure MySQL
$ mysql -u root -p
$ CREATE DATABASE idea_db;
$ GRANT ALL PRIVILEGES ON idea_db.* TO idea_user@localhost IDENTIFIED BY '123456789';
$ exit
- Execute the following commands:
$ git clone git://github.com/brentonashworth/sandbar.git
$ cd sandbar
$ git branch --track stable origin/stable
$ git checkout stable
$ cd examples
$ lein deps
$ lein repl
$ (load-file "src/testdrive.clj")
You may now open a browser and go to http://localhost:8080/.
There are two user accounts:
username: admin-user
password: admin
username: normal-user
password: password
Log in with one of these accounts and take it for a spin. The next step would be to take a look at the code and tinker with it in your development environment of choice. Start with example.ideadb.app
.
Copyright © 2010 Brenton Ashworth
Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.