        (server/with-channel request channel
          (swap! figwheel-receivers assoc "lein-ui" channel)
          (server/on-close channel (fn [status] (swap! figwheel-receivers dissoc "lein-ui" channel)))))
-  (GET "/api/projects" []
-       {:body (pprint-str (get-projects))
-        :status 200})
-  (GET "/api/projects/:project-name" [project-name]
-       (let [project (get-project* project-name)
+  (GET "/api/project" []
+       (let [project (get-project*)
              run-state @(project ::run-state)]
          {:body (pprint-str
                  (merge (project-summary project)
                         ;; TODO just include these in the summary?
-                        {:map-url (str (url-for-project project-name)
-                                                "/map")
-                         :raw-map-url (str (url-for-project project-name)
-                                           "/raw-map")
-                         :repl (get-repl-data project-name)}))
+                        {:map-url (url-for "/map")
+                         :raw-map-url (url-for "/raw-map")
+                         :repl (get-repl-data)}))
           :status 200}))
-  (GET "/api/projects/:project-name/map" [project-name]
-       {:body (pprint-str (get-readable-project project-name))
+  (GET "/api/project/map" []
+       {:body (pprint-str (get-readable-project))
         :status 200})
-  (GET "/api/projects/:project-name/raw-map" [project-name]
-       {:body (pprint-str (get-readable-raw-project project-name))
+  (GET "/api/project/raw-map" []
+       {:body (pprint-str (get-readable-raw-project))
         :status 200})
-  (POST "/api/projects/:project-name/repl/start" [project-name]
-        (start-repl! project-name)
-        {:body (pprint-str (get-repl-data project-name))
-         :status 201})
-  (POST "/api/projects/:project-name/repl/eval" {{:keys [project-name
-                                                         code]} :params}
-        {:body (pprint-str (repl-eval! project-name code))
+  (POST "/api/project/repl/eval" {{:keys [code]} :params}
+        {:body (pprint-str (repl-eval! code))
          :status 200})
-  (POST "/api/projects" [root]
-        (let [name (load-project! root)]
-          {:status 201
-           :body (pprint-str (project-summary (get-project* name)))}))
-  (DELETE "/api/projects/:project-name" [project-name]
-          (unload-project! project-name)
-          {:status 204})
   (route/resources "/")
   (route/not-found "<p>Page not found.</p>"))
 

    ::run-state
    ::raw})

(defn get-readable-project [project-name]
  (apply dissoc (get-project* project-name)
         non-data-keys))

(defn get-readable-raw-project [project-name]
  (apply dissoc (::raw (get-project* project-name))
         non-data-keys))

(defn project-summary [project]
  {:url (url-for-project (:name project))
   :name (:name project)
   :version (:version project)
   :root (:root project)})

(defn get-projects []
  {:projects (for [[name project] @projects]
               (project-summary project))})

(defn add-project [project-root]
  (load-project! project-root))


(defn bootstrap-self []
  (load-project! ".")
  (swap! (-> "lein-ui" (get-project*) ::run-state)
         assoc :repl self-repl
               :figwheel (figwheel-process (get-project* "lein-ui"))))


;;; Server

  (go-loop []
    (<! (timeout 500))
    (doseq [[project subscribers] @figwheel-receivers]
      (let [output (-> (get-project*)
                       ::run-state
                       deref
                       :figwheel
