GithubHelp home page GithubHelp logo

julianhm9612 / angular-enterprise-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oasisdigital/angular-enterprise-example

0.0 1.0 0.0 1.89 MB

Scalable / Large Angular application structure example

License: MIT License

TypeScript 78.69% HTML 17.59% CSS 0.47% Shell 0.16% JavaScript 3.10%

angular-enterprise-example's Introduction

Angular Enterprise Example

Build Status

This is a work in progress. It is likely to have many changes over time, particularly as all of the tools improve.

Compodoc documentation is available at:

https://oasisdigital.github.io/angular-enterprise-example/

Goals

  1. Show an example of a sprawling set of related Angular applications, divided into various libraries.
  2. Manage complexity, size, and scale.
  3. Provide a way to "bloat up" with numerous randomly generated additional modules/features/components, up to the size of the largest Angular applications.
  4. Initially use Angular CLI and Nx.
  5. Later, Bazel.

Contents so far

  • 3 applications, using overlapping sets of...
  • 10 libraries
  • dependencies between the libraries
  • A Node server, which serves REST/JSON, SSE, and GraphQL

Technologies used

  • Angular 5
  • Angular CLI
  • Nx
  • NgRx/Store, Store addons
  • RxJS
  • Lodash, Moment
  • REST
  • SSE (Server Sent Events)
  • GraphQL

Example application(s)

This set of example applications/features use Nx to wire up inter-project dependencies during development. Following the Nx convention, they are divided into "apps" and "libs".

There is a many-to-many relationship between applications and modules, and modules can use other modules.

In addition, there is a "servers" directory intended to contain one or more server-side example code bases that support the Angular example. These are not managed using Nx, which is Angular specific. However, in a sprawling set of related servers and libraries, Lerna could be used too much the same effect.

The example applications are not very complex - certainly not complex enough to warrant the amount of complexity used to build it. Real application of this modest complexity could easily be written as a single project (each).

Still, the example applications reuse blocks of functionality, so they show the value of this multi-package approach.

There are three application to run:

  • Admin - bundles 5 feature modules
  • Agent - bundles 2 feature module
  • Portal - bundles 1 feature module

To understand how they are cross wired, look at the tsconfig.json file for each.

Two of the modules use ngrx/store for state management, With appropriate lazy loading of feature modules.

Running

In one window:

yarn
yarn start
# add --app=agent or --app=portal if desired

In another window:

cd servers/node
yarn
yarn start

Contact us

Main author: Kyle Cordes

Much help from the team at: Oasis Digital

... who teach Angular Boot Camp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.