A Clojure web application for listing programming books, ratings, reviews and recommendations.
The application is written in Clojure and uses the following libraries: Ring, Compojure, Hiccup, CongoMongo, Lib-noir, Mongo-session, Hickory, Data.json and Clj-time.
It is designed for learning Clojure.
When web application is started, initial user list is imported and data extraction is started. Data are exported from Goodreads. Some data are extracted using Microdata to RDF Distiller and some directly from web pages. All books related to programming are being crawled.
Number of books and reviews imported is shown on the Home page.
User can register and log in. After logging in, user is redirected to the Home page.
To be able to check registered user list or to delete an existing user, log in as admin. Admin credentials are:
- username: admin
- password admin
All imported books are listed on Books page. User can search for a book using book title, author or ISBN.
Book data, ratings and reviews are shown at Book page. Only if user is logged in, he can rate a book and add a comment. Also, all similar books according to user ratings are listed. Similarities are calculated using the Pearson correlation score.
-
Download and install Leiningen.
-
Download and install MongoDB.
-
Start MongoDB.
-
To run the tests, cd to the web-app project directory and run
lein test
. -
To start the application, cd to the web-app project directory and run
lein run
. (If you use leiningen 1, runlein deps
first.)
Note:
- If you are starting the application for the first time, note that importing of books and reviews will start in a few minutes.
- If you have already imported desired number of books, before starting the application for the second time, in main function, in core.clj file, put (process-data) line under comments, otherwise all previously imported books will be deleted and import will start from the beginning.
-
Practical Clojure, Luke VanderHart and Stuart Sierra, Clojure Programming, Chas Emerick, Brian Carper and Chrisophe Grand and 4clojure - for learning Clojure
-
Developing and Deploying a Simple Clojure Web Application and A brief overview of the Clojure web stack for learning Ring, Compojure and Hiccup
-
Programming Collective Intelligence, Toby Seagaran - book recommendations are created based on algorithms in chapter 2. - Making Recommendations - recommendations.clj
-
CongoMongo library for using MongoDB with Clojure - mongo.clj
-
Hickory library for parsing HTML used to extract data from web page - extract_data.clj.
Distributed under the Eclipse Public License, the same as Clojure.