 
 (enable-console-print!)
 
-(defn main
-  "Initialize the storage subsystem."
+(defn- main
   []
   (let [lens (l/select-keys [:pages-by-id
                              :shapes-by-id

                    (rx/tap #(println "[save]")))]
    (rx/on-value stream #(dl/persist-state %))))

(defonce +setup+
  (do
    (println "bootstrap")

    (st/init)
    (rt/init)
    (ui/init)

    (rs/emit! (dl/load-data))
    (main)))

(ns uxbox.core
  (:require-macros [uxbox.util.syntax :refer [define-once]])
  (:require [beicon.core :as rx]
            [cats.labs.lens :as l]
            [uxbox.state :as st]
