   (-> (t/encode data)
       (codecs/bytes->str)))
 
+(def ^:private password (hashers/encrypt "123123"))
+
 (defn- create-user
   [conn i]
   (println "create user" i)

                       :id (mk-uuid "user" i)
                       :fullname (str "User " i)
                       :metadata {}
                       :password (hashers/encrypt "123123")
                       :email (str "user" i ".test@uxbox.io")}))

(defn- create-project
  [conn i ui]
  (Thread/sleep 20)
  (println "create project" i "for user" ui)
  (sproj/create-project conn
                        {:id (mk-uuid "project" i)

                     :height 768
                     :layout "tablet"}))

(def num-users 1000)
(def num-projects 5)
(def num-pages 5)

(defn init
  []
  (mount/start)
  (with-open [conn (up/get-conn)]
    (sc/atomic conn
      (doseq [i (range num-users)]
        (create-user conn i))

      (doseq [ui (range num-users)]
        (doseq [i (range num-projects)]
          (create-project conn (str ui i) ui)))

      (doseq [pi (range num-projects)]
        (doseq [ui (range num-users)]
          (doseq [i (range num-pages)]
            (create-page conn (str pi ui i) (str ui pi) ui))))))
  (mount/stop))
