Code structure
ShipClojure code is separated by type:
src
├── bb
├── clj
├── cljc
├── cljs
└── java
Backend (clj)
The src/clj directory is strictly backend code it relates to:
- the web api server & handlers logic
- datomic
- integrant component initialization
Common (cljc)
The src/cljc directory has common code for frontend and backend. Most frontend code lives here, particularly the pure UI parts.
Most pure business logic and schema definitions also loves here for ease of import in both environments
Frontend (cljs)
In the src/cljs directory, we store the pure frontend parts. This includes:
- The frontend router
- The SPA initialization
- The wrappers on pure browser functionality like local_storage
Java
This only contains a SystemInfo java class to showcase how to add java functionality to the codebase in case you need to squeeze every last drop of performance.
See core.clj for example import and usage of the java file.