               :jquery
               :clostache-templater
               :cylon
+              :cylon/signup             ; enable on with +signup switch
+              :cylon/log-emailer        ; enable on with +signup switch
+              :cylon/file-storage       ; TODO should be configurable
               :aggregate-template-model
               :protected-site-website
               }
    :files [{:template "protected-site/README.md" :target "README.md"}
            ]}
+
+  ;; TODO: It would be better for modules to have dependencies. Therefore, :cylon/signup would depend on :cylon/log-emailer. +sendgrid would augment with :sendgrid-emailer and diminish :cylon/log-emailer
 
   "intro"
   {:description "An introduction to Clojure (training course content)"

     :components #{:webmeta}
     :dependency-map {:template-model [:webmeta]}}

  #_{:module :cylon/login
     :components #{:cylon/login-form
                   :login-form-menu-items
                   :cylon/login-form-bootstrap-renderer
                   :boilerplate
                   :cylon/atom-backed-session-store
                   :cylon/default-user-domain
                   :cylon/pbkdf2-password-hash
                   :cylon/user-file
                   :template-model
                   :user-domain-seeder}

     :dependency-map {:webrouter [:cylon/login-form]
                      :cylon/login-form
                      {:session-store :cylon/session-store
                       :user-domain :cylon/user-domain
                       :renderer :cylon/login-form-bootstrap-renderer
                       }
                      :cylon/login-form-bootstrap-renderer
                      {:boilerplate :boilerplate}
                      :boilerplate
                      {:template-model :template-model}
                      :cylon/user-domain
                      {:password-hash-algo :cylon/password-hash-algo
                       :user-store :cylon/user-store}
                      :menu-index [:login-form-menu-items]}
     :doc {:main #markdown "cylon-login.md"}}

  {:module :cylon
   :components {:user-store
                {:component :cylon/file-backed-user-store
                 :args [:file "(io/file (System/getProperty \"user.home\") \".{{name}}-userstore.edn\")"]}
                :session-store
                {:component :cylon/cookie-session-store}

                :token-store
                {:component :cylon/atom-backed-token-store}

                :password-algo
                {:component :cylon/pbkdf2-password-algo}

                :password-verifier
                {:component :cylon/user-store-password-verifier}

                :login
                {:component :cylon/login}
                }
   :dependencies {:session-store {:token-store :token-store}
                  :password-verifier {:user-store :user-store
                                      :password-hash-algo :password-algo}
                  :login {:user-store :user-store
                          :session-store :session-store
                          :password-verifier :password-verifier}}
   :dev-snippets [{:template "dev/cylon/user.clj"}]}

  {:module :protected-site-website
   :components {:website

   :library-dependencies [[juxt.modular/http-kit-events "0.6.0"]]
   :constructor modular.http-kit.events/new-event-service}

  {:component :modular.email/log-emailer
   :library-dependencies [[juxt.modular/email "0.0.1"]]
   :constructor modular.email.log-emailer/new-log-emailer}

  ;; Menus
  #_{:component :modular.menu/menu-index
     :library-dependencies [[juxt.modular/menu "0.5.3"]]
