e-voting system with fault tolerant architecture.
This repository is migrated from my private repository with some files removed.
-
Create
.envfile:$ make .env
-
Set values in .env File.
-
Build server image:
$ make prod.server.image
-
Run the server:
$ make prod.server.up
-
The gRPC server will listen on port
SERVER_PORTof your host. -
You can stop the server by:
$ make prod.server.down
-
Run the admin shell to register/unregister users:
$ make prod.admin.run
-
Create
.envfile:$ make .env
-
Set values in .env File.
-
Build client image:
$ make prod.client.image
-
Run the client:
$ make prod.client.run
- SERVER_PORT: The host port which the server will listen on.
- DB_DATABASE: Name of database to be used.
- DB_USERNAME: Username of database.
- DB_PASSWORD: Password of database.
- CLIENT_SERVER_IP: The IP address where gRPC server is being hosted at.
- CLIENT_SERVER_PORT: The port which gRPC server is listening on.
shell:>register-voter -h
NAME
register-voter - Register a new voter.
SYNOPSIS
register-voter [-n String] [-g String] [-k String] --help
OPTIONS
-n String
name
[Mandatory]
-g String
group
[Mandatory]
-k String
ed25519 public key
[Mandatory]
--help or -h
help for register-voter
[Optional]shell:>unregister-voter -h
NAME
unregister-voter - Unregister a voter with specific name.
SYNOPSIS
unregister-voter [-n String] --help
OPTIONS
-n String
name
[Mandatory]
--help or -h
help for unregister-voter
[Optional]shell:>gen-key-pair -h
NAME
gen-key-pair - Generate a key pair for authentication.
SYNOPSIS
gen-key-pair --help
OPTIONS
--help or -h
help for gen-key-pair
[Optional]shell:>sign-in -h
NAME
sign-in - Sign in a voter to use commands that requires authentication.
SYNOPSIS
sign-in [-n String] [-k String] --help
OPTIONS
-n String
voter name
[Mandatory]
-k String
base64 encoded ed25519 secret key
[Mandatory]
--help or -h
help for sign-in
[Optional]Require calling sign-in first.
shell:>create-election -h
NAME
create-election - Create an election.
SYNOPSIS
create-election [-n String] [-g String[]] [-c String[]] [-e Long] --help
OPTIONS
-n String
name of the election
[Mandatory]
-g String[]
group names separated by commas
[Mandatory]
-c String[]
choices separated by commas
[Mandatory]
-e Long
end time in Unix time format
[Mandatory]
--help or -h
help for create-election
[Optional]Require calling sign-in first.
shell:>cast-vote -h
NAME
cast-vote - Create a vote.
SYNOPSIS
cast-vote [-e String] [-c String] --help
OPTIONS
-e String
name of the election
[Mandatory]
-c String
choice for the election
[Mandatory]
--help or -h
help for cast-vote
[Optional]shell:>get-election-result -h
NAME
get-election-result - Get result of a finished election.
SYNOPSIS
get-election-result [-n String] --help
OPTIONS
-n String
name of the election
[Mandatory]
--help or -h
help for get-election-result
[Optional]
-
Create
.envfile:$ make .env
-
Set values in .env File.
-
Start services:
$ make up
-
Enter shells:
Server/Admin:
$ make server.sh
Client:
$ make client.sh
See Makefile for available scripts.
