Giter VIP home page Giter VIP logo

infobootleg's Introduction

infobootleg

License: MIT

Mobile app for playing around with data from InfoLeg, Argentina's legislative information service.

Built with Dart/Flutter and Firebase, for Android.

         

Overview

Android app for retrieving laws from Argentina's official legislative service and displaying their data in a user-friendly format, with article-by-article navigation, user authentication and support for favoriting articles and commenting.

Features:

  • Full text/metadata retrieval from InfoLeg/Firestore
  • Sign in via Google, Facebook, e-mail and incognito
  • Search using Google Custom Search API
  • Auth stream-based redirection flow
  • NoSQL CRUD ops for laws and favorites
  • HTML scraping and text parsing with RegEx
  • State management with Provider and callbacks

Installation

  1. Clone repo
  2. Get dependencies: flutter pub get
  3. Run: flutter run

Operation

Sign-in flow

Sign in using a Google or Facebook account, e-mail/password or anonymously. In all cases, a user doc is created at Firestore to record the articles favorited by the user.

    

    

Based on Firestore's auth stream, the app redirects a signed-in user to the home screen and a signed-out user to the sign-in page. Signed-in status is preserved.

Law search

At the main search screen, the user may search for a law by name or by number (vertical navigation), view their favorited articles (horizontal navigation) or sign out.

    

Law summary

Searching for a law leads to the law summary screen, with Firestore's metadata for the queried law: official title, publication date, originating entity, summary text, etc.

Modification relations The laws and regulations that the query modifies and the laws and regulations that are modified by the query are accessed by tapping on the bottom icons.

    

Law text

At the law summary screen, pressing the big green button brings up the law text screen, with InfoLeg's full text of the law parsed into articles, including a table of contents for ease of navigation.

Favoriting articles Long-pressing an article triggers a prompt for saving it as a user's favorite. Long-pressing a favorited article prompts for removal of the favorite.

    

Favorites list

Back at the main search screen, the favorites button leads to the favorites list, which displays every article favorited by the user, including any comments added, also with a table of contents.

Commenting on favorites Tapping on the pen icon of a favorite leads to the comment screen, for commenting on the favorite. Save the comment using the keyboard; delete it using the cross icon. Since the favorites list is stream-based, any changes are reflected immediately.

    

RegEx exceptions

Given InfoLeg's inconsistent formatting, it is expected that RegEx parsing may fail with a number of laws, in which case the native mobile browser is launched.

    

TODOs

  • Add tests!
  • More exception handling.
  • More RegEx patterns.
  • Maybe favoriting entire laws.

Author

© 2020 Iván Ovejero

License

Distributed under the MIT License. See LICENSE.md

infobootleg's People

Contributors

ivov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.