Question

I need to create an admin/employee dashboard for a new angular-firebase app I'm building to cover basic CRUD admin tasks.

Code Organization Options:

  1. Roll it out as a completely separate app, only interfacing with my DB but otherwise separate.

  2. Have it in the same my app but at the root folder, so it becomes part of new deployments, but I would re-write admin specific views, directives, etc.

▸ admin/ (admin dashboard code here) ▾ app/ ▸ bower_components/ ▸ images/ ▾ scripts/ ▸ app/ ▾ controllers/ ▸ directives/ ▸ services/ app.js

  1. Write my admin views, directive, etc. out alongside their client side components prefixed with admin_

  2. Something else?

What's the Angular way?

Was it helpful?

Solution

Didn't hear back from SO for two days so I had to Google it (imagine that).

This article covers code organization tips including this one about admin sections:

Almost everyone puts the administrative files under admin, when it’s needed. If you have an admin section, do the same. Don’t have duplicate code, images, JavaScript, etc. for the admin. Obviously, for the parts of the admin section that are different, you’ll need to have additional code etc. But it should be part of the same codebase, and factored such that you can use the helper functions from any part of the website.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top