News App written with Angular, Ionic and Firebase.
Developed by Oleksandr Dudynets
- Clone the repository.
git clone https://github.com/dudynets/Angular-News-App- Install NPM packages (requires Yarn Package Manager installed).
yarn install- Create a new Firebase project in the Firebase console.
- Add a new web app to the project in the Firebase console.
- Copy the Firebase config from the Firebase console into the
firebase.config.tsfile.
- Copy the Firebase config from the Firebase console into the
- Install Angular CLI and Firebase CLI.
npm install -g @angular/cli firebase-tools- Make sure you have Java JDK version 11 or higher installed and added to system PATH.
- Login to Firebase.
firebase login- Choose a Firebase project to use.
firebase use [YOUR_PROJECT_ID]- Run the app in development mode (will run the Firebase emulator suite as well).
yarn start:emulators
yarn start:web- Open the app in a browser at http://localhost:4200, login with Google and create a new user.
- Open the Emulator Suite UI in the browser at http://localhost:4000, go to Firestore and add a
rolefield with valuewriterto the user you just created.
- Complete the steps 1-5, 7-8 from the Run Steps section.
- Enable the Firebase Google authentication provider in the Firebase console.
- Enable the Firestore database in the Firebase console.
- Enable the Storage service in the Firebase console.
- Run the deployment script.
yarn firebase:deploy- You should see the app URL in the console output.
- Open the app in a browser at the URL from the previous step, login with Google and create a new user.
- Open the Firebase console, go to Firestore and add a
rolefield with valuewriterto the user you just created.
For running the app on iOS make sure that:
- You have Xcode installed.
- You have command-line tools installed.
- You have created an iOS app in Firebase Console and copied the
GoogleService-Info.plistfile to theios/App/Appfolder. - You have set the
iosClientIdfrom theGoogleService-Info.plistfile in thefirebase.config.tsfile. - You have set the
REVERSED_CLIENT_IDin theios/App/App/Info.plistfile.
Check this tutorial for more information on how to set up Firebase Authentication for iOS.
For running the app on Android make sure that:
- You have Android Studio installed.
- You have created an Android app in Firebase Console and copied the
google-services.jsonfile to theandroid/appfolder. - You have set the
androidClientIdfrom thegoogle-services.jsonfile in thefirebase.config.tsfile. - You have set SHA certificate fingerprints in the Firebase Console.
Check this tutorial for more information on how to set up Firebase Authentication for Android.
- 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.plistfiles to the values from your Firebase project.
Distributed under the MIT License. See LICENSE for more information.