-
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.
- Loading branch information
0 parents
commit 808c5ad
Showing
262 changed files
with
19,179 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,16 @@ | ||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
|
||
# For the full list of supported browsers by the Angular framework, please see: | ||
# https://angular.io/guide/browser-support | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
Chrome >=79 | ||
ChromeAndroid >=79 | ||
Firefox >=70 | ||
Edge >=79 | ||
Safari >=14 | ||
iOS >=14 |
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,16 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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,46 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-class-suffix": [ | ||
"error", | ||
{ | ||
"suffixes": ["Page", "Component"] | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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,73 @@ | ||
# Specifies intentionally untracked files to ignore when using Git | ||
# http://git-scm.com/docs/gitignore | ||
|
||
*~ | ||
*.sw[mnpcod] | ||
.tmp | ||
*.tmp | ||
*.tmp.* | ||
UserInterfaceState.xcuserstate | ||
$RECYCLE.BIN/ | ||
|
||
*.log | ||
log.txt | ||
|
||
|
||
/.sourcemaps | ||
/.versions | ||
/coverage | ||
|
||
# Ionic | ||
/.ionic | ||
/www | ||
/platforms | ||
/plugins | ||
|
||
# Compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/bazel-out | ||
|
||
# Node | ||
/node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# IDEs and editors | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
|
||
# Miscellaneous | ||
/.angular | ||
/.angular/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
testem.log | ||
/typings | ||
|
||
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Firebase | ||
.firebase | ||
*-debug.log | ||
.runtimeconfig.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,9 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"semi": true, | ||
"quoteProps": "preserve", | ||
"bracketSpacing": false | ||
} |
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) 2023 Oleksandr Dudynets | ||
|
||
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,89 @@ | ||
<a href="https://dudynets.pp.ua"> | ||
<img src="https://user-images.githubusercontent.com/39008921/191470114-c074b17f-1c88-4af3-b089-1b14418cabf5.png" alt="drawing" width="128"/> | ||
</a> | ||
|
||
# Angular News App | ||
|
||
<p><strong>News App written with Angular, Ionic and Firebase.</strong></p> | ||
|
||
> Developed by [Oleksandr Dudynets](https://dudynets.pp.ua) | ||
## Run Steps | ||
|
||
1. Clone the repository. | ||
```sh | ||
git clone https://github.com/dudynets/Angular-News-App | ||
``` | ||
2. Install NPM packages (requires Yarn Package Manager installed). | ||
```sh | ||
yarn install | ||
``` | ||
3. Create a new Firebase project in the [Firebase console](https://console.firebase.google.com/). | ||
4. Add a new web app to the project in the Firebase console. | ||
1. Copy the Firebase config from the Firebase console into the `firebase.config.ts` file. | ||
5. Install Angular CLI and Firebase CLI. | ||
```sh | ||
npm install -g @angular/cli firebase-tools | ||
``` | ||
6. Make sure you have Java JDK version 11 or higher installed and added to system PATH. | ||
7. Login to Firebase. | ||
```sh | ||
firebase login | ||
``` | ||
8. Choose a Firebase project to use. | ||
```sh | ||
firebase use [YOUR_PROJECT_ID] | ||
``` | ||
9. Run the app in development mode (will run the Firebase emulator suite as well). | ||
```sh | ||
yarn start:emulators | ||
yarn start:web | ||
``` | ||
10. Open the app in a browser at http://localhost:4200, login with Google and create a new user. | ||
11. Open the Emulator Suite UI in the browser at http://localhost:4000, go to Firestore and add a `role` field with value `writer` to the user you just created. | ||
|
||
## Deployment Steps | ||
|
||
1. Complete the steps 1-5, 7-8 from the [Run Steps](#run-steps) section. | ||
2. Enable the Firebase Google authentication provider in the Firebase console. | ||
3. Enable the Firestore database in the Firebase console. | ||
4. Enable the Storage service in the Firebase console. | ||
5. Run the deployment script. | ||
```sh | ||
yarn firebase:deploy | ||
``` | ||
6. You should see the app URL in the console output. | ||
7. Open the app in a browser at the URL from the previous step, login with Google and create a new user. | ||
8. Open the Firebase console, go to Firestore and add a `role` field with value `writer` to the user you just created. | ||
|
||
## iOS Setup Steps | ||
|
||
For running the app on iOS make sure that: | ||
1. You have Xcode installed. | ||
2. You have command-line tools installed. | ||
3. You have created an iOS app in Firebase Console and copied the `GoogleService-Info.plist` file to the `ios/App/App` folder. | ||
4. You have set the `iosClientId` from the `GoogleService-Info.plist` file in the `firebase.config.ts` file. | ||
5. You have set the `REVERSED_CLIENT_ID` in the `ios/App/App/Info.plist` file. | ||
|
||
Check [this tutorial](https://www.youtube.com/watch?v=GwtpoWZ_78E) for more information on how to set up Firebase Authentication for iOS. | ||
|
||
## Android Setup Steps | ||
|
||
For running the app on Android make sure that: | ||
1. You have Android Studio installed. | ||
2. You have created an Android app in Firebase Console and copied the `google-services.json` file to the `android/app` folder. | ||
3. You have set the `androidClientId` from the `google-services.json` file in the `firebase.config.ts` file. | ||
4. You have set SHA certificate fingerprints in the Firebase Console. | ||
|
||
Check [this tutorial](https://www.youtube.com/watch?v=GwtpoWZ_78E) for more information on how to set up Firebase Authentication for Android. | ||
|
||
## Notes | ||
|
||
- Make sure you have the latest stable version of Node.js installed (tested with Node.js v18.16.0). | ||
- If Firebase emulators cannot start due to the port conflict, reboot your system and try again. | ||
- Do not forget to change all the existing Firebase config values in the `firebase.config.ts`, `ios/App/App/Info.plist` files to the values from your Firebase project. | ||
|
||
## License | ||
|
||
Distributed under the [MIT](https://choosealicense.com/licenses/mit/) License. | ||
See [LICENSE](https://github.com/dudynets/Angular-News-App) for more information. |
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,101 @@ | ||
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore | ||
|
||
# Built application files | ||
*.apk | ||
*.aar | ||
*.ap_ | ||
*.aab | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
# Uncomment the following line in case you need and you don't have the release build type files in your app | ||
# release/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/assetWizardSettings.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
# Android Studio 3 in .gitignore file. | ||
.idea/caches | ||
.idea/modules.xml | ||
# Comment next line if keeping position of elements in Navigation Editor is relevant for you | ||
.idea/navEditor.xml | ||
|
||
# Keystore files | ||
# Uncomment the following lines if you do not want to check your keystore files in. | ||
*.jks | ||
*.keystore | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
.cxx/ | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json | ||
|
||
# fastlane | ||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output | ||
fastlane/readme.md | ||
|
||
# Version control | ||
vcs.xml | ||
|
||
# lint | ||
lint/intermediates/ | ||
lint/generated/ | ||
lint/outputs/ | ||
lint/tmp/ | ||
# lint/reports/ | ||
|
||
# Android Profiling | ||
*.hprof | ||
|
||
# Cordova plugins for Capacitor | ||
capacitor-cordova-android-plugins | ||
|
||
# Copied web assets | ||
app/src/main/assets/public | ||
|
||
# Generated Config files | ||
app/src/main/assets/capacitor.config.json | ||
app/src/main/assets/capacitor.plugins.json | ||
app/src/main/res/xml/config.xml |
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,2 @@ | ||
/build/* | ||
!/build/.npmkeep |
Oops, something went wrong.