Skip to content
/ mala Public
forked from priyatam/mala

A Clojurescript template for building SPA with Garden, Ring, and Om

License

Notifications You must be signed in to change notification settings

twotines/mala

 
 

Repository files navigation

Mala

Join the chat at https://gitter.im/priyatam/mala

Goal

A reference app and Leiningen template for building SPA in Clojurescript with Garden, Ring, and Om.

Features

  • sane project structure
  • workflows for api, design, and user-interface
  • live reloadable-code and brepl with figwheel
  • static analyzers with kibit and eastwood
  • curated ring middleware
  • curated lein plugins
  • curated cljsjs libraries
  • om-i instrumentation
  • async server with http-kit
  • core.async integration, no ajax
  • visual debugger with prone
  • asset pipeline and tasks in leinigen
  • automatic sourcecode formatting with cljfmt
  • environment variables with environ
  • up to date dependencies!

Quickstart

lein new mala chant
cd chant

The generated src looks like this:

env
├── dev
│  └── repl.cljs
src
├── api
│   ├── db.clj
│   ├── router.clj
│   ├── server.clj
│   └── utils.clj
├── design
│   ├── components.clj
│   ├── layout.clj
│   ├── styles.clj
│   └── typography.clj
└── ui
    ├── client.cljs
    ├── components
    │  ├── hello.cljs
    │  └── typeahead.cljs
    ├── main.cljs
    ├── pages.cljs
    ├── router.cljs
    ├── state.cljs
    ├── types.cljs
    └── utils.cljs

Start figwheel, watch garden, and fire a ring api server for live coding:

lein dev

Open/refresh http://localhost:3449/ for a Cljs brepl on the prompt.

Ready to deploy? Generate an uberjar:

lein prod

Test with foreman:

foreman start

Preview staging http://localhost:5000/

Documentation

A guide with installation, workflows, and best practices is under doc.

Leiningen Template

A minimal lein-template, based on this reference app, is under lein. Significant changes in the project structure and dependencies will be updated both in the reference app and leiningen template.

Credits

A big thanks to @swannodette for pushing the limits of Clojurescript and Om, @weavejester for creating Ring, Joel Holbrooks for Garden, and Bhauman for Fighweel.

Best practices and code inspired and taken from:

Status

Clojars Project

An ideal reference app would be similar to the likes of React-Starterkit, Flask-Heroku, and Express.

0.1.x versions included a Less workflow with plain old cljbuld.

License

Copyright © 2015 Priyatam Mudivarti, and others.

Released under the Eclipse Public License, same as Clojure.

About

A Clojurescript template for building SPA with Garden, Ring, and Om

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 86.6%
  • HTML 13.0%
  • Shell 0.4%