# How do you add admin interface to your project?

**URL:** https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274
**Category:** How to?
**Created:** [June 13, 2018, 5:22pm UTC](https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274 "2018-06-13T17:22:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![shomiyamoto](https://clojureverse.org/user_avatar/clojureverse.org/shomiyamoto/32/3034_2.png) [@shomiyamoto](https://clojureverse.org/u/shomiyamoto)
#### Post date: [June 13, 2018, 5:22pm UTC](https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274/1 "2018-06-13T17:22:01Z")

</div>

Hi everyone,

I’m currently working on a public-facing web app. Built a client side with re-frame and a server side with a standard set of libraries (i.e., ring, compojure, and component). Use session-based authentication with buddy-auth and role-based authorization with ring handlers checking `(-> request :identity :roles)`. (For the sake of completeness, the db is Datomic Cloud and the deployment method will be Elastic Beanstalk.)

Now I’m trying to add admin interface to this project and feeling a little lost for direction. Yet to see how it’s done in clojure and wondering how other people go about it. What are best practices? What kind of security hole should I watch out for when I want to use the same domain and project directory for convenience? Is there a useful library for CMS? (I’ve just found [https://github.com/fmw/vix](https://github.com/fmw/vix). Anything else?)

I’m thinking about having

1. a public gateway at [www.mydomain.com/admin/](http://www.mydomain.com/admin/)
2. authorization given to users whose roles contain a :role/admin
3. admin interface built with re-frame just like public facing UIs
4. code for admin interface in the same project directory,

and the best I can come up with is to place the code for admin interface in a src/admin directory (my other source paths are src/clj, src/cljc, and src/cljs) and use a cljsbuild profile like below

```auto
{:id "admin"
 :source-paths ["src/admin"]
 :compiler {:main "admin.client"
            :output-to "resources/admin/js/app.js"
            :output-dir "resources/admin/js/out"
            :asset-path "js/out"}}.

```

Is this it? Any other solutions? How do you do?

I’d appreciate any advice and suggestions.

---

<div class="post-metadata">

### Author: ![DjebbZ](https://clojureverse.org/user_avatar/clojureverse.org/djebbz/32/531_2.png) [@DjebbZ](https://clojureverse.org/u/DjebbZ)
#### Post date: [June 13, 2018, 5:50pm UTC](https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274/2 "2018-06-13T17:50:56Z")

</div>

If your server expose a Rest like API and your admin is mostly CRUD like, have a look at [react-admin](https://github.com/marmelab/react-admin). It generates a full admin in a browser based on configuration and a Rest server. It’s from former colleagues and well maintained. Since it’s react based I’m sure you could integrate it with Reagent.

Hope this helps.

---

<div class="post-metadata">

### Author: ![shomiyamoto](https://clojureverse.org/user_avatar/clojureverse.org/shomiyamoto/32/3034_2.png) [@shomiyamoto](https://clojureverse.org/u/shomiyamoto)
#### Post date: [June 13, 2018, 7:17pm UTC](https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274/3 "2018-06-13T19:17:11Z")

</div>

Thanks! I’ll definitely look into it.

I guess I should’ve mentioned what I want to do with the interface. Here is my tentative list:

1. manage content that will be stored in S3 buckets
2. manage users (assign access roles to registered users)
3. send email notifications via AWS SES
4. monitor user access and behaviors.

I lack experience and am not entirely sure but I guess I can set up REST APIs with CRUD like operations for most of these tasks.

I found it a little puzzling that there aren’t many clojure/script libraries in this area, but if that means that building admin interface is just like building public facing UIs, it’s actually not as intimidating as I initially thought.

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [December 13, 2018, 7:17am UTC](https://clojureverse.org/t/how-do-you-add-admin-interface-to-your-project/2274/4 "2018-12-13T07:17:12Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
