Giter Site home page Giter Site logo

bb-assignemnt's Introduction

Run locally

npm install
npm run dev
(open browser localhost:4200)

Test in the Cloud (Netlify)

https://kind-spence-30b4da.netlify.app/

Unit Testing

As an example, there is only one test account-state.reducer.spec.ts which is testing for account-state.reducer.ts; To run unit testing, simply run npm test

Architecture

  • NgRx to manage state (Please refer diagram in https://ngrx.io/guide/store)
  • On top of NgRx, I create the concept of "Loadable" which is mainly to represent the state of an API call. 3 fields loading, success and error represents all the states of an API call. There are a bunch of handy functions in lodable.ts created around "Loadable" to minimize boilerplate.
  • In core folder lives all the code about NgRx as it's the model layer of the app.
  • Common component module is for commonly-used components like button, input, panel etc.
  • ApiService in api.service.ts is the hub of calling backend API, the responses are mocked though.

Miscellaneous

  • Multi-language support is not implemented here because of lack of time, but I have used ngx-translate a lot in my previous project.

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.