All Projects → johannesjo → Generator Angular Auto Admin Loopback

johannesjo / Generator Angular Auto Admin Loopback

Licence: mit
Generator for automatic CRUD angular backend for loopback apps and apis

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Generator Angular Auto Admin Loopback

Pollinate
Template your base files and generate new projects from Git(Hub).
Stars: ✭ 213 (+565.63%)
Mutual labels:  generator, yeoman
Generator Plugin Wp
Yeoman WordPress Plugin Generator
Stars: ✭ 270 (+743.75%)
Mutual labels:  generator, yeoman
Generate
A new command line tool and developer framework for scaffolding out GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.
Stars: ✭ 238 (+643.75%)
Mutual labels:  generator, yeoman
Generator Standard Readme
Scaffold out a Standard Readme
Stars: ✭ 150 (+368.75%)
Mutual labels:  generator, yeoman
Generator Modular Angular
A truly modular yeoman generator for AngularJS all device apps.
Stars: ✭ 23 (-28.12%)
Mutual labels:  generator, yeoman
Django Antd Tyadmin
类似 xadmin 的基于Model 快速生成前后台管理增删改查,筛选,搜索的后台管理自动化工具。Antd 界面好看现代化!前后端分离!无损二次开发!由Django Restful Framework 和 Ant Design Pro V4 驱动
Stars: ✭ 171 (+434.38%)
Mutual labels:  generator, admin
nest-js-boilerplate
Nest.js boilerplate
Stars: ✭ 79 (+146.88%)
Mutual labels:  generator, yeoman
Generator Ngx Rocket
🚀 Extensible Angular 11+ enterprise-grade project generator
Stars: ✭ 1,329 (+4053.13%)
Mutual labels:  generator, yeoman
King Admin
king-admin是一个超酷的前后端分离的基础权限管理后台,前端:angularJs+bootstrap+gulp,后端:spring-boot+mybatis-plus(分java版和kotlin版)
Stars: ✭ 397 (+1140.63%)
Mutual labels:  admin, angularjs
Yo
CLI tool for running Yeoman generators
Stars: ✭ 3,421 (+10590.63%)
Mutual labels:  generator, yeoman
Generator Express Es6
Yeoman generator for Express.js
Stars: ✭ 28 (-12.5%)
Mutual labels:  generator, yeoman
Project Name
Get the name of a project from package.json, git config, or basename of the current working directory.
Stars: ✭ 8 (-75%)
Mutual labels:  generator, yeoman
Generator Jekyll Starter Kit
🚀 Jekyll Progressive Web App Generator.
Stars: ✭ 139 (+334.38%)
Mutual labels:  generator, yeoman
Generator Web Extension
Advanced WebExtension generator that creates everything you need to get started with cross-browser web-extension development.
Stars: ✭ 212 (+562.5%)
Mutual labels:  generator, yeoman
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (+200%)
Mutual labels:  generator, yeoman
generator-antd-pro
An easy way to build your ant-design-pro application.
Stars: ✭ 34 (+6.25%)
Mutual labels:  admin, yeoman
Generator Rn Toolbox
The React Native Generator to bootstrap your apps
Stars: ✭ 1,155 (+3509.38%)
Mutual labels:  generator, yeoman
Microgen
♻️ micro-generator for individual files, easy like sunday morning 🌅
Stars: ✭ 85 (+165.63%)
Mutual labels:  generator, yeoman
Easyadminbundle
EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
Stars: ✭ 3,391 (+10496.88%)
Mutual labels:  generator, admin
Jocs.github.io
💯Jocs 的个人博客,所有的文章都在 issues 里面
Stars: ✭ 840 (+2525%)
Mutual labels:  generator, angularjs

generator aaal (angular auto admin loopback)

generator-aaal is a Yeoman generator, which provides you with a angular based crud-interface with is automatically created based on your model definitions. You can drop it in in your existing loopback app, even drop it in your existing angular frontend app.

The interface generator-aaal provides relies heavily on angular schema forms. So if you want to customize your forms, you might want to have a look at their docs.

Edit Screen Login Screen Overview Screen

getting started

Check out the pre built example!

manually building a new app

  1. Create loopback app for your api if not done so and create some models

     ```
     npm install -g strongloop bower yo
     slc loopback  # choose version 2.x and 'api-server'
     slc loopback:model yourFirstModel
     ```
    
  2. Install generators

     ```
     npm install -g generator-moda generator-aaal
     ```
    
  3. Create basic front-end via generator-moda

     ```
     cd client
     # create .yo-rc.json for the frontend if not present
     echo "{}" > .yo-rc.json
     yo moda my-admin
     ```
    

Choose ui-router.js and angular-resource from modules. Everything else is optional.

  1. Cancel gulp and drop in the aaal components

     ```
     # install bower deps
     bower install -S ngtoast angular-schema-form angular-smart-table ui.bootstrap ngstorage angular-schema-form-datepicker angular-schema-form-tinymce bootstrap-css-only
     # drop in aaal
     yo aaal
     ```
    
  2. Make sure jquery (required for the datepicker) is loaded first by adding the following to your bower.json

     ```
       "overrides": {
         "angular": {
           "dependencies": {
             "jquery": "*"
           }
         }
       }
     ```
    
  3. Inject frontend files and build css

     ```
     gulp injectAll && gulp buildStyles
     ```
    
  4. Update your _app.js (client/app/scripts/_app.js) with the aaap-depdency, e.g.:

     ```
     (function() {
         'use strict';
     
         angular
             .module('myAdmin', [
                 'ngAnimate',
                 'ngAria',
                 'ngResource',
                 'ui.router',
                 // insert here or somewhere else
                 'aaal'
       ]);
     })();  
     ```
    
  5. Update the path from which static files are serverd in your server/middleware.json

     ```
      "files": {
         "loopback#static": {
           "params": "$!../client/app"
         }
       }
     ```
    
  6. Run the server

     ```
     # cd to server dir
     cd ..
     node  .
     ```
    
  7. Navigate to http://localhost:3000/index.html#/login log yourself in with one of your loopback users and enjoy.

  8. (optional) add proxy to access api from gulp serve for development.

    ```
    # cd to frontend
    cd client
    # install proxy middleware
    npm install -D proxy-middleware
    
    #######################################
    # add the following to the tasks/dev.js
    var proxy = require('proxy-middleware');
    var url = require('url');
    // ...
    gulp.task('browserSync', function() {
        var proxyOptions = url.parse('http://localhost:3000/api');
        proxyOptions.route = '/api';
    
        browserSync({
            server: {
                baseDir: config.base,
                livereload: true,
                middleware: [proxy(proxyOptions)]
            }
        });
    });
    #######################################
    
    # run gulp or gulp serve for dev
    gulp serve
    ```
    

rebuilding your aaal backend interface after model changes

Simply run:
yo aaal

adding it to your existing angular frontend

  1. Install generator

     ```
     npm install -g generator-aaal
     ```
    
  2. Cd to your frontend directory and run the generator

     ```
     yo aaal
     ```
    
  3. Cancel gulp and drop in the aaal components

     ```
     # install bower deps
     bower install -S ngtoast angular-schema-form angular-smart-table ui.bootstrap ngstorage angular-schema-form-datepicker angular-schema-form-tinymce bootstrap-css-only
     ```
    
  4. Inject all the files in your aaal directory and all the bower_components to your index.html.

  5. Update your angular module with the aaap-depdency, e.g.:

     ```
     (function() {
         'use strict';
     
         angular
             .module('myAdmin', [
                 'ngAnimate',
                 'ngAria',
                 'ngResource',
                 'ui.router',
                 // insert here or somewhere else
                 'aaal'
       ]);
     })();  
     ```
    
  6. Have fun!

customizing your forms via form schema definition

It's best to check out the the examples of angular schema forms for this. This can be easily added to the controller definition of the [your-model]-edit-ctrl.js.

customizing your forms via model definitions

Out of the box generator-aaal supports to declare additional formats for your model properties, you can provide via the format sub-property. Some example:

// common/models/another-model.json
{
  "name": "AnotherModel",
  "base": "PersistedModel",
  "properties": {
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string",
      "format": "html" // ==> will be edited in a tinymce editor instance
    },
    "someDate": {
      "type": "date" // ==> will be automatically converted to a date input
    }
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].