A simple ranked voting app. Aims to facilitate understanding (and adoption) of ranked choice voting algorithms in elections by making them convenient and easy to use in our daily lives.
Go + postgresql web application deployed with Heroku. Models are generated code created with sqlboiler.
Purposely avoids any concept of user or authentication; may later add sessions if necessary.
Local dev configuration is located within .env
(consider using direnv -- the .envrc exists to immediately load .env). Most local dev commands will expect these in the environment -- especially, DATABASE_URL
.
The DEBUG
env var enables local dev niceties (e.g. hot reload of templates).
To run locally, tools expect:
- docker
- docker-compose
The makefile defines most relevant commands
make test
runs testsmake dbup
starts a database container on port 5432, creating a database and user within it.make migrate
applies all migrations to the database containermake gen
regenerates the database models.
- Write a new migration in migrations.
- Generate updated models with
make gen
. - Program away.