Dart, Flutter, Google Cloud, and ranked voting

  Dart, Firebase, Flutter App

A (work-in-progress) demonstration of: (1) a full-stack Flutter application utilizing Firebase and Google Cloud, and (2) ranked voting with the Condorcet Method.

Components

Data flow

Event flow

Event flow

YouTube discussion about the project

Rubber Duck Engineering #58

From July 29, 2021

Getting started and local development

  1. Copy server/server_config.example.yaml to server/server_config.yaml and populate the entries. See the details in server/lib/src/service_config.dart for the expected values.TODO explain the values needed to run locally vs to deploy.
  2. Make sure you have package:shelf_dev v2 or later installed.
  3. Run shelf_dev from the root of the repository to start the app. It will be hosted at localhost:8080.

Deployment

todo Sketching things out here, but this is incomplete at the moment.

  1. Deploy services
    1. Enable cloud tasks and create a task queue.
    2. Enable cloud run.
      1. Make sure the name of the service corresponds to the value in hosting/rewrites in firebase.json.
    3. Set variables using server/tool/update_cloud_run_environment.dart.
    4. Deploy cloud run service
  2. Web app
    1. Build the web app. flutter build web.
    2. Deploy web app. firebase deploy.

Download this app source code on GitHub

https://github.com/kevmoo/knarly_vote