Skip to content
Gatra Bali news reader made using Flutter
Branch: master
Clone or download

README.md

Gatra Bali - Balinese News Reader

Balinese news reader app. Now available on Google Play:

https://play.google.com/store/apps/details?id=com.gatrabali.android

How it works

  1. Miniflux (an opensource Feed reader written in Go) will periodically check for new articles on a given feeds. Since its quite full featured we're able to add new feed sources, categorize the feed, manage users, etc. Miniflux works independently know nothing about the other parts, store its own data to its own database (PostgreSQL).

  2. I don't want the app to talk directly to Miniflux Api but I want Firebase as the app backend instead. So I need a way to transfer data from Miniflux to Firestore. Here I utilise the Google PubSub to trigger a Cloud Function, whenever an Article is added/updated, Feed is added/updated/deleted, Category is added/updated/deteled Miniflux will publish a message to a Topic and it will trigger the Cloud Function to running.

  3. When the PubSub triggered Function is running, based on the message it received it will make a HTTP request back to the Miniflux REST api to get the Article, Feed or Category object and store them to Firestore.

  4. Data that received from Miniflux is stored in Firestore on separate collections, eg. categories, feeds, entries.

  5. Because most of the data will be public (user doesn't need to register to use the app except for bookmarks) and to reduce the Firestore reads, some Http Function were used as API frontends to take advantage of caching and some other useful stuff that we can do to our data at this stage. And the last but not least, I put Firebase hosting at very front to take advantage of rewrites (to have a beautiful API url) and also CDN caching.

  6. For the bookmarks, app read and write directly to Firestore, users are only allowed to read and write to their own bookmarks collection by using Firestore rules.

You can’t perform that action at this time.