Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mdecker-mobilecomputing/ionic_notizen

Ionic app for note taking to demonstrate how some services provided by firebase can be used
https://github.com/mdecker-mobilecomputing/ionic_notizen

firestore ionic

Last synced: 20 days ago
JSON representation

Ionic app for note taking to demonstrate how some services provided by firebase can be used

Awesome Lists containing this project

README

        

# Storing notes in Firestore #


Simple Ionic using [Firestore](https://firebase.google.com/docs/firestore/) (NoSQL database offered by [Google Firebase](https://firebase.google.com/)) to store personal notes.
For integration of Firebase functionaliy [Angular Fire](https://github.com/angular/angularfire) is used.
All the Firebase-specific code is contained in [class `FirebaseService`](src/app/firebase.service.ts).


----

## Screenshots ##


![Screenshot 1](screenshot_1.png) ![Screenshot 2](screenshot_2.png)


----

## Firebase Configuration ##


For the time being the "old" version 8.6.1 of the [Firebase library](https://www.npmjs.com/package/firebase) is used because of [this issue](https://github.com/angular/angularfire/issues/2838#issuecomment-858208215).


Create a Firebase project.

Enable "Email address and password" as "sign-in method" under "Authentication".

For *Firestore* the following rule has to be configured (see also [this answer on SO](https://stackoverflow.com/a/55115937)):
```
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /notizensammlung/{nutzer_uid} {

function istAngemeldet() {
return request.auth.uid != null;
}
allow read : if istAngemeldet() && request.auth.uid == resource.data.nutzer_uid;
allow create: if istAngemeldet() && request.auth.uid == request.resource.data.nutzer_uid;
allow delete: if istAngemeldet() && request.auth.uid == resource.data.nutzer_uid;
}
}
}
```


Create an index on collection `notizensammlung` for the following fields:
* `nutzer_uid` ascending
* `zeitstempel` ascending


----

## License ##


See the [LICENSE file](LICENSE.md) for license rights and limitations (BSD 3-Clause License) for the files in this repository.