Skip to content

aboy021/propellerhead-technical

Repository files navigation

propellerhead-technical

Simple Web application built for the Propellerhead Technical Test.

Introduction

Since this is something I'm building on my own time I've opted to use:

  • Clojure
    • My favourite programming language
  • Cursive
    • An IntelliJ plugin for Clojure development (Made in NZ)
  • Luminus
    • A Clojure web framework I've been meaning to try
  • H2 Database Engine
    • A Java embedded database that I haven't used before
  • Java 11
    • The current version
  • The Marvel Developer API
    • Because comic book characters are more fun than synthetic data

Screenshots

Main Screen

List view

Detail Screen

Detail view

Running the app

You will need Leiningen 2.0 or above installed.

I developed this using Java 11.

Copy dev-config.example.edn to dev-config.edn. This file contains config overrides - secrets that generally should not go in source control.

If you want to download the Marvel character data you'll need your own API key from the Marvel Developer Portal. You should add this to your dev-config.edn

To start a web server for the application, run:

lein run

Then open a web browser to http://localhost:3000/

Some Code Highlights

  • src/clj/propellerhead_technical/db_import/
    • One off Marvel character import code. Run from a REPL.
  • resources/sql/queries.sql
    • HugSQL formatted sql queries .
  • src/clj/propellerhead_technical/routes
    • Page routes. Effectively controllers in an MVC sense.
  • resources/html/
    • Html templates. Rendered using Selmer.

Nice to Haves

Some things that would be nice to have that I didn't implement.

Security

As it is now, anyone can do anything to any record. There's no notion of users or logging in. The site isn't encrypted. There's very little validation of user input.

Database Not in Git

I've stored the dev database in git. It's small, so it's not that big of a deal, but it's not best practice.

Status Normalised

I've stored status as a string, but I would prefer the DB to be better normalised and to store a status_id and have a status table with status_id and description.

Full Text Indexing

Use Lucene to index all the character descriptions. Would have allowed for better search, though would have to be maintained. Clucy is the library I would have used.

AJAX

Making the pages a little bit more responsive by using ajax queries from client side javascript would have been good. A REST api with a swagger front end, combined with clojure spec definitions for the entities involved would have been nice.

SPA

A Single Page Application using React, Re-Frame, and ClojureScript would have been pretty great. I decided against it due to the complexity and time.

License

Copyright © 2019 Arthur Boyer

Data provided by Marvel. © 2014 Marvel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages