Try it out
Hosted at https://knarlyvote.com
tl;dr
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
Event flow
Getting started and local development
-
Copy
server/server_config.example.yaml
toserver/server_config.yaml
and populate the entries. See the details inserver/lib/src/service_config.dart
for the expected values.TODO explain the values needed to run locally vs to deploy.
-
Make sure you have package:shelf_dev v2 or later installed.
-
Run
shelf_dev
from the root of the repository to start the app. It will be hosted atlocalhost:8080
.
Deployment
todo Sketching things out here, but this is incomplete at the moment.
-
Deploy services
- Enable cloud tasks and create a task queue.
- Enable cloud run.
- Make sure the name of the service corresponds to the value in
hosting/rewrites
infirebase.json
.
- Make sure the name of the service corresponds to the value in
- Set variables using
server/tool/update_cloud_run_environment.dart
. - Deploy cloud run service
-
Web app
- Build the web app.
flutter build web
. - Deploy web app.
firebase deploy
.
- Build the web app.