A half-baked, over-engineered, well-thought-out small web application, made at the 7/10/16 Clojure Hackathon @ Siili, by Fabrizio and Jouni, with the help of lots of coffeine.
Its main purpose is to allow the management of a (physical) book library, with a nice view and the ability to search through the titles. We started from the images in this S3 bucket and some relational data about the books.
No technology was harmed during the hackathon. However, we got to play with lots of nice shiny stuff: re-frame 0.8 for a Reactive and buzzword-compliant SPA, re-com for ready-made fresh Reagent components, Postgresql full text search, jq to hack with json on the command line, AWS Elastic Beanstalk + Docker for fast Cloud deployments, AWS CloudFormation and Infrastructure as code, System for a fast REPL-driven-development...
0. Get lein
, psql
, and you may want docker
too.
- Run a database istance with
./scripts/create-dev-db
(warning: uses docker) - Migrate the data into it with
./scripts/migrate
- In a terminal start figwheel:
lein figwheel
- In another terminal start a repl with
lein repl
and then type(start)
into it (or connect with your editor!) - Navigate to
localhost:3000
, start hacking!
- Run a PostgreSQL database somewhere
- Put the coordinates of the database in
credentials.sh
- Migrate the data into it with
./scripts/migrate
- Build the production clojurescript and start the service with
./scripts/deploy-prod
- Create the RDS database with
./scripts/run-cloudformation
- Wait until it's created. Then get its coordinates with
./scripts/read-cloudformation
- Put this data and some ElasticBeanstalk-enabled IAM credentials in
credentials.sh
- Insert data into RDS instance by running
./scripts/migrate
- Run the service on ElasticBeanstalk with
./scripts/deploy-aws