/web-app

Clojure web application

Primary LanguageClojure

web-app

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.

Setup instructions for running locally

  • 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, run lein 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.

References

License

Distributed under the Eclipse Public License, the same as Clojure.