-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement service layer with AngularFire and Firestore
- Loading branch information
PixelFr0ggie
committed
Dec 25, 2022
0 parents
commit 11ea489
Showing
81 changed files
with
58,789 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "fir-course-419fe" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
/.firebase | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.angular/cache | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# e2e | ||
/e2e/*.js | ||
/e2e/*.map | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
firebase-debug.log | ||
firestore-debug.log | ||
ui-debug.log | ||
/try-emulator/node_modules | ||
/functions/service-accounts/*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Angular University | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
|
||
## Firebase & AngularFire In Depth | ||
|
||
This repository currently contains the code for the [Firebase & AngularFire In Depth](https://angular-university.io/course/angularfire-course). | ||
|
||
This course is updated to Angular 13: | ||
|
||
 | ||
|
||
You can find the starting point of the course in the [1-start branch](https://github.com/angular-university/firebase-course/tree/1-start). | ||
|
||
This master branch contains the *final version of the course code*, that you can use as a reference if you choose to code along. | ||
|
||
|
||
|
||
# Installation pre-requisites | ||
|
||
IMPORTANT: Please use Node 16 LST (Long Term Support version). | ||
|
||
# Installing the Angular CLI | ||
|
||
With the following command the angular-cli will be installed globally in your machine: | ||
|
||
npm install -g @angular/cli | ||
|
||
# How To install this repository | ||
|
||
We can install the master branch using the following commands: | ||
|
||
git clone https://github.com/angular-university/firebase-course.git | ||
|
||
cd firebase-course | ||
npm ci | ||
|
||
Note: **We recommend using npm ci, instead of npm install**. This will ensure that you use the exact dependency versions set on package-lock.json, unlike npm install which might potentially change those versions. | ||
|
||
# To run the Development UI Server | ||
|
||
To run the frontend part of our code, we will use the Angular CLI: | ||
|
||
npm start | ||
|
||
The application is visible at port 4200: [http://localhost:4200](http://localhost:4200) | ||
|
||
# Other Courses | ||
|
||
# Angular Forms In Depth | ||
|
||
If you are looking for the [Angular Forms In Depth](https://angular-university.io/course/angular-forms-course) course, the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular Router In Depth | ||
|
||
If you are looking for the [Angular Router In Depth](https://angular-university.io/course/angular-router-course) course, the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# NgRx (with NgRx Data) - The Complete Guide | ||
|
||
If you are looking for the [Ngrx (with NgRx Data) - The Complete Guide](https://angular-university.io/course/ngrx-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
|
||
# Angular Core Deep Dive Course | ||
|
||
If you are looking for the [Angular Core Deep Dive Course](https://angular-university.io/course/angular-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# RxJs In Practice | ||
|
||
If you are looking for the [RxJs In Practice](https://angular-university.io/course/rxjs-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# NestJs In Practice (with MongoDB) | ||
|
||
If you are looking for the [NestJs In Practice Course](https://angular-university.io/course/nestjs-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular Testing Course | ||
|
||
If you are looking for the [Angular Testing Course](https://angular-university.io/course/angular-testing-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Serverless Angular with Firebase Course | ||
|
||
If you are looking for the [Serverless Angular with Firebase Course](https://angular-university.io/course/firebase-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular Universal Course | ||
|
||
If you are looking for the [Angular Universal Course](https://angular-university.io/course/angular-universal-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular PWA Course | ||
|
||
If you are looking for the [Angular PWA Course](https://angular-university.io/course/angular-pwa-course), the repo with the full code can be found here: | ||
|
||
 | ||
|
||
# Angular Security Masterclass | ||
|
||
If you are looking for the [Angular Security Masterclass](https://angular-university.io/course/angular-security-course), the repo with the full code can be found here: | ||
|
||
[Angular Security Masterclass](https://github.com/angular-university/angular-security-course). | ||
|
||
 | ||
|
||
# Angular Advanced Library Laboratory Course | ||
|
||
If you are looking for the Angular Advanced Course, the repo with the full code can be found here: | ||
|
||
[Angular Advanced Library Laboratory Course: Build Your Own Library](https://angular-university.io/course/angular-advanced-course). | ||
|
||
 | ||
|
||
|
||
## RxJs and Reactive Patterns Angular Architecture Course | ||
|
||
If you are looking for the RxJs and Reactive Patterns Angular Architecture Course code, the repo with the full code can be found here: | ||
|
||
[RxJs and Reactive Patterns Angular Architecture Course](https://angular-university.io/course/reactive-angular-architecture-course) | ||
|
||
 | ||
|
||
|
||
## Complete Typescript Course - Build A REST API | ||
|
||
If you are looking for the Complete Typescript 2 Course - Build a REST API, the repo with the full code can be found here: | ||
|
||
[https://angular-university.io/course/typescript-2-tutorial](https://github.com/angular-university/complete-typescript-course) | ||
|
||
[Github repo for this course](https://github.com/angular-university/complete-typescript-course) | ||
|
||
 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"cli": { | ||
"analytics": false | ||
}, | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"firebase-course": { | ||
"projectType": "application", | ||
"schematics": {}, | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "app", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
], | ||
"styles": [ | ||
"./node_modules/@angular/material/prebuilt-themes/purple-green.css", | ||
"src/styles.scss" | ||
], | ||
"scripts": [], | ||
"vendorChunk": true, | ||
"extractLicenses": false, | ||
"buildOptimizer": false, | ||
"sourceMap": true, | ||
"optimization": false, | ||
"namedChunks": true | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"namedChunks": false, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "2mb", | ||
"maximumError": "5mb" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "6kb", | ||
"maximumError": "10kb" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "firebase-course:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "firebase-course:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "firebase-course:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js", | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
], | ||
"styles": [ | ||
"./node_modules/@angular/material/prebuilt-themes/purple-green.css", | ||
"src/styles.scss" | ||
], | ||
"scripts": [] | ||
} | ||
}, | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "e2e/protractor.conf.js", | ||
"devServerTarget": "firebase-course:serve" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"devServerTarget": "firebase-course:serve:production" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "firebase-course" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { browser, logging } from 'protractor'; | ||
import { AppPage } from './app.po'; | ||
|
||
describe('workspace-project App', () => { | ||
let page: AppPage; | ||
|
||
beforeEach(() => { | ||
page = new AppPage(); | ||
}); | ||
|
||
it('should display welcome message', async () => { | ||
await page.navigateTo(); | ||
expect(await page.getTitleText()).toEqual('try-emulator app is running!'); | ||
}); | ||
|
||
afterEach(async () => { | ||
// Assert that there are no errors emitted from the browser | ||
const logs = await browser.manage().logs().get(logging.Type.BROWSER); | ||
expect(logs).not.toContain(jasmine.objectContaining({ | ||
level: logging.Level.SEVERE, | ||
} as logging.Entry)); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { browser, by, element } from 'protractor'; | ||
|
||
export class AppPage { | ||
async navigateTo(): Promise<unknown> { | ||
return browser.get(browser.baseUrl); | ||
} | ||
|
||
async getTitleText(): Promise<string> { | ||
return element(by.css('app-root .content span')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/e2e", | ||
"module": "commonjs", | ||
"target": "es2018", | ||
"types": [ | ||
"jasmine", | ||
"node" | ||
] | ||
} | ||
} |
Oops, something went wrong.