Awesome Open Source
Awesome Open Source

Angular Example App

Example app with Angular 9 + Angular CLI + Angular Universal + i18n + Firebase

👏👏🎉🎉🎉🎉👏👏

Base project made with much ❤️. Contains CRUD, patterns, generated library, and much more!

Demo example

Report bug

<a href="https://github.com/Ismaestro/angular9-example-app/issues/new">Request feature</a>

Table of contents

Status

travis Quality Gate Status Coverage dependency Status devDependency Status peerDependencies Status GitHub stars GitHub forks

What's included

  • [x] CRUD: create, update and remove heroes with Firebase
  • [x] Angular Universal (SSR)
  • [x] Use of StateTransferModule to share state between browser and server
  • [x] Security Headers using helmet.
  • [x] Internationalization with the official i18n. Separated builds for english and spanish.
  • [x] Lazy loading modules
  • [x] Service Workers enabled!
  • [x] More logical directory structure (from here)
  • [x] Basic example library
  • [x] Following the best practices!
  • [x] Search bar, to look for heroes
  • [x] Custom loading page
  • [x] Example of Angular Resolver for Hero Detail
  • [x] Lazy loading images with ng-lazyload-image
  • [x] Modal and toasts (snakbar)!
  • [x] Scroll restoration and anchor examples
  • [x] Responsive layout (flex layout module)
  • [x] SASS (most common used functions and mixins) and BEM styles
  • [x] Animations with ng-animate
  • [x] Angular Pipes
  • [x] Interceptors and Events (Progress bar active, if a request is pending)
  • [x] Scroll to first invalid input in forms. (ngx-scroll-to-first-invalid)
  • [x] Modernizr (browser features detection)
  • [x] Browser filter (Bowser) because of IE ^^
  • [x] Sentry! (logs every error in the app)
  • [x] Google Tag Manager
  • [x] ES6 Promises and Observables
  • [x] Unit tests with Jasmine and Karma including code coverage. Use of ng-bullet, karma-mocha-reporter and ng-mocks
  • [x] End-to-end tests with Protractor, (moving to Cypress)

Angular Universal and i18n

This project is using firebase and Angular Universal with the official internationalization. You can navigate through every language and reload (and share) every page in the application without losing context. This is very useful for SEO purposes and you almost have a ready for production app. If you want to translate the messages you can use this awesome tool, Tiny Translator or follow this tutorial.

I've created a medium post where you can find a tutorial to apply this concepts to your own project. Check it here, and let me know what do you think.

Firebase

This repo is using Firebase. We use Cloud Firestore and Cloud Storage to handle CRUD operations over the heroes and to store their images.

Travis CI

We use Travis CI to run this tasks in order:

  • Linter
  • Unit tests
  • End to end tests
  • Build for production of browser and server
  • Validate that server generated using curl
  • Sonar scanner

Quick start

WARNING

Verify that you are running node 12.4.0 by running node -v in a terminal/console window. Older versions produce errors, but newer versions are fine.

npm i
npm start
Tasks Description
npm start Start the app in development mode with the english language only
npm start:es Start the app in development mode with the spanish language only
dev:ssr Start the server like SSR
extract-i18n Extract all messages from templates and ts files and update the language files with new translations
npm run lint Run the linter (tslint)
npm run test Run all unit tests with karma and jasmine
npm run test:app:watch Run app unit tests and wait for changes
npm run test:library:watch Run library unit tests and wait for changes
npm run e2e Run end to end tests with protractor
npm run build:prod Build the app for production with english translations
npm run build:prod:es Build the app for production with spanish translations
npm run builds:prod Builds both configurations
npm run build:ssr:prod Builds the server with universal in SSR mode
npm run serve:ssr Start the node server for angular universal
npm run build:library Build the library
npm run bundle-report Build and run webpack-bundle-analyzer over stats json
npm run release:minor Create a new minor release using standard-version
npm run release:major Create a new major release using standard-version
npm run ci Execute linter, tests and production builds

Bugs and feature requests

Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Moreover, all HTML and CSS should conform to the Code Guide, maintained by Ismael Ramos.

Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at https://editorconfig.org/.

Creators

Ismael Ramos

Thanks

Thanks to all contributors and their support.

If you have an idea or you want to do something, tell me or just do it! I'm always happy to hear your feedback!

Copyright and license

Code and documentation copyright 2020 the authors. Code released under the MIT License.

Enjoy 🤘


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Angular (12,485) 
Firebase (9,203) 
Boilerplate (5,602) 
I18n (1,742) 
Ssr (1,639) 
Angular Cli (1,199) 
Example Project (619) 
Angular8 (582) 
Universal (501) 
Sample App (361) 
Angular9 (300) 
Related Projects
Advertising 📦 9
All Projects
Application Programming Interfaces 📦 120
Applications 📦 181
Artificial Intelligence 📦 72
Blockchain 📦 70
Build Tools 📦 111
Cloud Computing 📦 79
Code Quality 📦 28
Collaboration 📦 30
Command Line Interface 📦 48
Community 📦 81
Companies 📦 60
Compilers 📦 60
Computer Science 📦 74
Configuration Management 📦 39
Content Management 📦 167
Control Flow 📦 197
Data Formats 📦 77
Data Processing 📦 266
Data Storage 📦 132
Economics 📦 60
Frameworks 📦 198
Games 📦 122
Graphics 📦 103
Hardware 📦 148
Integrated Development Environments 📦 47
Learning Resources 📦 147
Legal 📦 28
Libraries 📦 119
Lists Of Projects 📦 21
Machine Learning 📦 336
Mapping 📦 61
Marketing 📦 15
Mathematics 📦 55
Media 📦 228
Messaging 📦 97
Networking 📦 304
Operating Systems 📦 84
Operations 📦 120
Package Managers 📦 52
Programming Languages 📦 229
Runtime Environments 📦 96
Science 📦 42
Security 📦 375
Social Media 📦 26
Software Architecture 📦 70
Software Development 📦 68
Software Performance 📦 57
Software Quality 📦 127
Text Editors 📦 45
Text Processing 📦 131
User Interface 📦 310
User Interface Components 📦 465
Version Control 📦 29
Virtualization 📦 68
Web Browsers 📦 38
Web Servers 📦 25
Web User Interface 📦 194