Live demo: https://wizdm.io
Wizdm is a boilerplate to kickstart serverless single page applications based on Angular and Firebase. Designed to help aspiring startuppers bootstrapping their side projects into functioning prototypes ready to launch.
The project revolves around a web-app running on Angular + Angular Material + FlexLayout with a minimal clean interface to fit both desktop and mobile. Icon set comes from both Material and FontAwesome. Including Hammerjs to handle gestures for material components. Using Moment for time and locale management.
The app relies on several firebase services:
- Firebase Hosting to host the production demo app at https://wizdm.io
- Firebase Auth for user authentication
- Cloud Firestore realtime database for user's profile and content
- Cloud Storage for user's images and files
- Cloud Functions to run key tasks server-side
Take a look on @wizdm/connect library abstracting the communication layer with all the firebase services.
The project uses a content resolver to dynamically load contents in different languages by pre-fetching localilzed content from 'assets/i18n'.
At first start, the resolver checks the authenticated user language preferences falling back detecting the browser language when unavailable (aka the user is not logged in). This provides the useful side effect of preventing the initial page from flickering between unlogged and logged-in statuses while an already logged-in user is loading the app from scratch.
The router is used to switch among languages, so, from the user perspective, it looks like having multiple apps in different languages (e.g. https://wizdm.io/en/home for English or https://wizdm.io/it/home for Italian).
The localized content is provided by means of the wmContent directive granting smooth transitions while switching languages without the need of reloading the full page nor the app.
Take a look on @wizdm/content package for further information.
ng serve for a dev server. Navigate to
https://localhost:4200/. The app will automatically reload if you change any of the source files. Be aware that --ssl option is enabled by default using local ssl/server.crt and ssl/servr.key files.
The workspace is arranged as a monorepo. This means both the source code of the web application(s) and the potentially shared libraries are stored in the same single repository.
/ ├──/animate - Animate On Scroll ├──/connect - Firebase package ├──/content - Content resolving (multi-language) ├──/elements - UI components ├──/emoji - Emoji support ├──/markdown - Markdown renedrer ├──/wizdm - The main app : ├── angular.json ⎫ ├── firebase.json ⎪ ├── package.json ⎬ Config files ├── tsconfig.json ⎪ ├── tsconfig.base.json ⎪ └── tslint.json ⎭
ng generate component component-name to generate a new component to be added to the wizdm default project or specify
--project=project-name otherwise. You can also use
ng generate directive|pipe|service|class|guard|interface|enum|module.
To generate a new library, run
ng generate lib library-name that will be automatically added to the workspace as a publishable package.
ng build to build the project. The build artifacts will be stored in the
dist/ directory. Use the
-prod flag for a production build.
ng test to execute the unit tests via Karma.
ng e2e to execute the end-to-end tests via Protractor.
firebase deploy to upload the last build.
Source code is now mantained on GitHub.