Code Monkey home page Code Monkey logo

shadow-cljs-fullstack's Introduction

shadow-clj-fullstack

Example of full-stack Clojure/Script project which uses shadow-cljs for clojure-script compilation.

It allows using any arbitrary NPM dependencies, like "@blueprintjs/core" which is close to impossible with lein-cljsbuild.

Stack

  • clojure <3
  • timbre for logging
  • mount for state management
  • pedestal for web server and geheimtur for Oauth2 protection
  • hiccup for HTML generation on server side
  • wrench for managing configuration via environment variabes
  • garden for generating CSS with garden-gnome to watch changes
  • shadow-cljs for compiling clojure-script and hot code reload
  • reagent for rendering hiccup-like forms as React components
  • re-frame for frontend state-management
  • bidi & pushy for single-page-app navigation

Development

Copy dev/config-example.edn to dev/config.edn and fill empty variables.

Install both NPM and Leiningen:

brew install leiningen node yarn

Now you are ready to start the project locally

yarn install
lein repl
> (reset)

This would

  • start a local web-server on 8080 port
  • start shadow-cljs server with hot-reload of your javascript
  • start garden-gnome, which will compile your styles and watch for changes (shadow-cljs will pick up those changes on frontend)

CSS styles with Garden

Styles are compiled from src/css/styles.clj with Garden.

License

Copyright © 2018 Anton Chebotaev

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

shadow-cljs-fullstack's People

Contributors

airalex avatar damesek avatar otann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.