Skip to content

Vinzent03/Firebase-backend-for-vertretung-whg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase settings and cloud functions for my Flutter app vertretung_whg

Getting started

  1. Follow this guide
  2. Edit filter.js as in vertretung_whg and notification.js
  3. run firebase deploy

Notifications

To send Notifications, call the function sendNotification frequently. In my case each item is separated with ||

Admins

An admin can add, edit and delete news. To make a user admin, the uid must be added to the admins list in details/admins. In addition the user must be logged in with email.

Firestore structure

scheme:

.
└── collection
   └── document
       └── field <dataType>
           └── field in map <dataType>
.
├── details
│   ├── admins
│   │   └── admins <List<String(userUID)>>
│   ├── links
│   │   ├── changelogLink <String>
│   │   ├── apkDownload <String>
│   │   └── downloadLink <String>
│   ├── webapp
│   │   ├── lastChange <String>
│   │   ├── substituteToday <List<String>>
│   │   └── substituteTomorrow <List<String>>
│   ├── cloudFunctions
│   │   └── alreadySendNotificationOnFirstChange <bool>
│   └── versions
│       ├── forceUpdate <bool>
│       ├── message <List<String>>
│       └── newVersion <String>
│
├── news
│   └── news
│       └── news <List<Map>>
│           ├── text <String>
│           ├── lastEdited <String>
│           └── title <String>
│
│
└── userdata
    └── <userUID>
        ├── lastNotification <String>
        ├── friends <List<String>>
        ├── freeLessons <List<String>>
        ├── name <String>
        ├── notification <bool>
        ├── notificationOnFirstChange <bool>
        ├── personalSubstitute <bool>
        ├── schoolClass <String>
        ├── subjects <List<String>>
        ├── subjectsCustom <List<String>>
        ├── subjectsNot <List<String>>
        ├── subjectsNotCustom <List<String>>
        └── token <String>

About

required firebase cloud functions for vertretung_whg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published