Visit https://ng2-github.firebaseapp.com/ to try it online.
Deployed automatically from the master
branch. The dev
branch
is also deployed and available here.
- Clone the repository
- run
yarn install
(ornpm install
) - run
yarn run start
- visit http://localhost:4100
- Angular v4.4 with angular-cli
- @ngrx/platform for Redux-style app state management
- Testing: karma + jasmine, protractor for e2e
- CircleCI for running tests and automatic deployments to Firebase Hosting.
RxJS and @ngrx/store is used for centralised app state management (Redux-like style). See src/app/shared/store directory for details.
This app uses the pattern of smart/dumb components (also called containers
and components) and it is reflected in the directory structure.
In the containers
directories you'll find smart components,
concerned with how things works, with some logic inside and external
dependencies. Respectively, in the components
directories you'll find
dumb components, without any external dependencies, concerned more
about how things looks, communicating with external world
using @Input/@Output properties.
Each major part of application (e.g. search, repository details)
is a separate so-called feature module and it's loaded lazily.
Lazy loading starts from the home page featuring SearchModule
(why? you could end up first on some subpage using deep-linking, thus
the SearchModule would be not needed). Plus, the app is configured
to compile with AoT.
Each commit runs tests on CircleCI, automatically. If everything is green, the app is then deployed to Firebase Hosting and available on ng2-github.firebaseapp.com.
Author: Marcin ryzy Ryzycki ([email protected])
I build this app to polish my Angular skills and play/experiment with other things/libraries around it. I aim for the best practises, following Angular styleguide, scalable architecture and being it production-ready (AoT, lazy loading, nice error handling etc). Any suggestion for improvements - give me a shout!