Architecture

Project structure

Generated project structure. Replace entity-[1..n] with the entities defined by you.


├── build
│   ├── ...
├── config (Environment config files)
│   ├── ...
├── functions (Firebase Functions)
│   ├── index.js (Index of Firebase Functions)
│   ├── lib
│   │   ├── admin
│   │   │   ├── role
│   │   │   │   ├── role-deletion.js (Role deletion triggers)
│   │   │   │   ├── role-log.js (Generates role logs)
│   │   │   │   └── roles.js (Handle all users triggers: log and deletion)
│   │   │   └── user
│   │   │       ├── user-admin.js (Admin permission methods)
│   │   │       ├── user-authentication.js (User authentication methods)
│   │   │       ├── user-deletion.js (User deletion methods)
│   │   │       ├── user-individual-permission.js (User individual permissions methods)
│   │   │       ├── user-log.js (User logs persistence)
│   │   │       ├── user-pending.js (Indexes users waiting for permissions)
│   │   │       ├── user-permission.js (Indexes and lists user's permissions)
│   │   │       ├── user-role-permission.js (User roles permissions)
│   │   │       ├── user-storage.js (Generates storage token for users)
│   │   │       └── users.js (Handle all users triggers: log, deletion, admin, pending of permissions and indexes)
│   │   ├── entities
│   │   │   └── entity-1
│   │   │       └── entity-1.js (Handle all entity triggers: log, deletion and indexes)
│   │   │   └── entity-2
│   │   │       └── entity-2.js
│   │   │   └── entity-n
│   │   │       └── entity-n.js
│   │   └── shared
│   │       ├── entities.js (Enumerator of entities)
│   │       ├── entity-deleter.js (Common entity deletion methods)
│   │       ├── entity-files.js (Common entity cloud storage file deletion methods)
│   │       ├── entity-index-foreigns.js (Common entity foreign indexes methods)
│   │       ├── entity-index-options.js (Common entity option indexes methods)
│   │       ├── entity-index.js (Common entity indexes methods)
│   │       ├── entity-log.js (Common entity logs methods)
│   │       ├── entity.js (Entity model)
│   │       ├── file-deleter.js (Methods to delete files from Cloud Functions)
│   │       └── permission-types.js (Enumerator of permission types)
│   ├── package.json (Firebase Functions dependencies)
│   └── service-account.json (Firebase Admin SDK credentials)
├── firebase.json    (Firebase config file)
├── firestore.indexes.json (Firebase Firestore indexes file)
├── firestore.rules (Firebase Firestore database rules)
├── index.html
├── jsconfig.json
├── package.json (Project dependencies and scripts)
├── readme.md (Scaffold readme)
├── src
│   ├── activity (Activity log)
│   │   ├── activity-list.vue
│   │   ├── activity-model.js
│   │   ├── activity-module.js
│   │   ├── activity-routes.js
│   │   ├── activity-service.js
│   │   ├── activity-store.js
│   │   └── activity.vue
│   ├── admin
│   │   ├── admin-module.js (Admin store, components and directives declarations)
│   │   ├── admin-routes.js    (/admin/... routes)
│   │   ├── role
│   │   │   ├── role-detail.vue    (Role detail tab)
│   │   │   ├── role-form.vue    (Role form page)
│   │   │   ├── role-history
│   │   │   │   ├── role-history-full    (History of all role records)
│   │   │   │   │   ├── role-history-full-service.js
│   │   │   │   │   ├── role-history-full-store.js
│   │   │   │   │   └── role-history-full.vue
│   │   │   │   ├── role-history-model.js (Role history model)
│   │   │   │   └── role-history-single    (History of a single role record)
│   │   │   │       ├── role-history-single-service.js
│   │   │   │       ├── role-history-single-store.js
│   │   │   │       └── role-history-single.vue
│   │   │   ├── role-list.vue    (Role list page)
│   │   │   ├── role-model.js    (Role model)
│   │   │   ├── role-module.js (Role store, components and directives declarations)
│   │   │   ├── role-permission    (Role permission tab)
│   │   │   │   ├── role-permission-service.js
│   │   │   │   ├── role-permission-store.js
│   │   │   │   └── role-permission.vue
│   │   │   ├── role-routes.js (/admin/role/... routes)
│   │   │   ├── role-service.js (Role service)
│   │   │   ├── role-show.vue    (Role show page)
│   │   │   └── role-store.js (Role store)
│   │   └── user
│   │       ├── user-detail.vue    (User detail page)
│   │       ├── user-history
│   │       │   ├── user-history-full    (History of all users history)
│   │       │   │   ├── user-history-full-service.js
│   │       │   │   ├── user-history-full-store.js
│   │       │   │   └── user-history-full.vue
│   │       │   ├── user-history-model.js (User history model)
│   │       │   └── user-history-single    (History of a single user history)
│   │       │       ├── user-history-single-service.js
│   │       │       ├── user-history-single-store.js
│   │       │       └── user-history-single.vue
│   │       ├── user-list.vue    (User list page)
│   │       ├── user-model.js    (User model)
│   │       ├── user-module.js (User store, components and directives declarations)
│   │       ├── user-pending (User waiting for permissions component)
│   │       │   ├── user-pending-service.js
│   │       │   ├── user-pending-store.js
│   │       │   └── user-pending.vue
│   │       ├── user-permission    (User permission tab)
│   │       │   ├── user-permission-blocked-model.js
│   │       │   ├── user-permission-service.js
│   │       │   ├── user-permission-store.js
│   │       │   └── user-permission.vue
│   │       ├── user-role    (User role tab)
│   │       │   ├── user-role-form.vue
│   │       │   ├── user-role-service.js
│   │       │   └── user-role-store.js
│   │       ├── user-routes.js (/admin/user/... routes)
│   │       ├── user-service.js (User service)
│   │       ├── user-show.vue    (User show page)
│   │       └── user-store.js (User store)
│   ├── app-module.js (Main app store, components and directives declarations)
│   ├── app.vue (Main app component)
│   ├── assets
│   ├── auth (Authentication)
│   │   ├── auth-module.js (Auth store, components and directives declarations)
│   │   ├── auth-routes.js (/auth/... routes)
│   │   ├── auth-service.js (Auth service)
│   │   ├── auth-store.js (Auth store)
│   │   ├── auth-user-service.js (Loads logged user information)
│   │   ├── email-unverified
│   │   │   └── email-unverified.vue (Email unverified page)
│   │   ├── empty-permissions
│   │   │   └── empty-permissions.vue (Empty permissions page)
│   │   ├── guards
│   │   │   ├── admin-guard-mixin.js (Protect admin routes)
│   │   │   ├── auth-guard-mixin.js (Protect authenticated routes)
│   │   │   ├── email-already-verified-guard-mixin.js (Protect the 'Email unverified' page to allow only unverified emails)
│   │   │   ├── not-empty-permissions-guard-mixin.js (Protect the 'Empty permissions' page to allow only users with no permissions granted)
│   │   │   ├── permission-guard-mixin.js (Protect entity routes for read, create, update, delete and read logs permissions)
│   │   │   └── unauth-guard-mixin.js    (Protect routes that allows only users not authenticated)
│   │   ├── login
│   │   │   └── login.vue (Login page)
│   │   ├── password-reset
│   │   │   └── password-reset.vue (Password reset page)
│   │   ├── permission
│   │   │   ├── permission-matcher.js    (Checks if user permissions matches)
│   │   │   ├── permission-operation.js (Enumerator of permission operations)
│   │   │   └── permission-service.js (Load user permissions)
│   │   └── registration
│   │       └── registration.vue (Registration page)
│   ├── dashboard
│   │   ├── dashboard-module.js (Dashboard store, components and directives declarations)
│   │   └── dashboard.vue (Dashboard page)
│   ├── entities
│   │   ├── entity-1
│   │   │   ├── entity-1-enumerators (Entity enumerators)
│   │   │   │   └── entity-1-enumerator.js
│   │   │   ├── entity-1-form.vue (Entity form page)
│   │   │   ├── entity-1-history
│   │   │   │   ├── entity-1-history-full    (History of all entity records)
│   │   │   │   │   ├── entity-1-history-full-service.js
│   │   │   │   │   ├── entity-1-history-full-store.js
│   │   │   │   │   └── entity-1-history-full.vue
│   │   │   │   ├── entity-1-history-model.js (Entity history model)
│   │   │   │   └── entity-1-history-single (History of one entity record)
│   │   │   │       ├── entity-1-history-single-service.js
│   │   │   │       ├── entity-1-history-single-store.js
│   │   │   │       └── entity-1-history-single.vue
│   │   │   ├── entity-1-list.vue (Entity list)
│   │   │   ├── entity-1-model.js (Entity model)
│   │   │   ├── entity-1-module.js (Entity store, components and directives declarations)
│   │   │   ├── entity-1-pager.js    (Pager configuration (searchable and exportable fields))
│   │   │   ├── entity-1-routes.js (/entities/entity-1/... routes)
│   │   │   ├── entity-1-service.js (Entity service)
│   │   │   ├── entity-1-show.vue (Entity show page)
│   │   │   └── entity-1-store.js (Entity store)
│   │   ├── entities-module.js (Entities store, components and directives declarations)
│   │   ├── entities-routes.js (Configure routes for /entities/...)
│   │   ├── entities.js    (Enumerator of entities)
│   │   ├── entity-link.vue (Entity link component)
│   ├── main.js
│   ├── shared
│   │   ├── audition
│   │   │   └── audition.js (Common audition methods)
│   │   ├── destroy
│   │   │   └── destroy-service.js (Validates, before delete, if the records are not in use)
│   │   ├── file
│   │   │   ├── file-link-list.vue (Component that generates a list of file download links)
│   │   │   ├── file-model.js (File upload model)
│   │   │   ├── file-service.js    (Common file upload methods)
│   │   │   ├── file-upload.vue    (File upload component)
│   │   │   ├── file-validator.js (File validation methods)
│   │   │   ├── image-carousel.vue (Image carousel for visualization)
│   │   │   └── image-upload.vue (Image upload component)
│   │   ├── filters
│   │   │   ├── format-date-filter.js (Formats dates)
│   │   │   └── format-datetime-filter.js (Formats date and time)
│   │   ├── firebase
│   │   │   ├── firebase-init.js (Initializes Firebase)
│   │   │   ├── firebase-mapper.js (Converts Firebase Firestore data to javascript format)
│   │   │   └── option-model.js (Option model (Id and Label))
│   │   ├── form
│   │   │   └── validators.js (Form custom validators)
│   │   ├── layout
│   │   │   ├── header.vue (App header)
│   │   │   ├── main-layout.vue (App main layout)
│   │   │   └── menu.vue (App menu)
│   │   ├── mixins
│   │   │   └── autofocus-mixin.js
│   │   ├── pager
│   │   │   ├── csv-exporter.js (CSV exporter common methods)
│   │   │   └── pager.js (Pagination, sorting and filtering for lists)
│   │   ├── shared-module.js (Shared store, components and directives declarations)
│   │   ├── shared-store.js (Shared store)
│   │   └── utils
│   │       └── string-utils.js (String utility methods)
│   └── styles
│       ├── color.scss (Theme color configuration)
│       ├── font-awesome.less (Font awesome icons configuration)
│       ├── login.scss
│       ├── main.scss
│       └── utils.scss
├── static
├── storage.rules    (Firebase Storage rules)
├── test
│   ├── ...