Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mdecker-mobilecomputing/ionic_notizen
- Owner: MDecker-MobileComputing
- License: bsd-3-clause
- Created: 2021-06-12T10:35:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-08T07:48:13.000Z (over 1 year ago)
- Last Synced: 2024-11-09T22:41:13.576Z (3 months ago)
- Topics: firestore, ionic
- Language: TypeScript
- Homepage:
- Size: 1020 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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.