A system helping in finding a consensus for choosing a place to have lunch in.
Runs in Kalix and scales horizontally.
Each entity instance (area, voter and occasion) can run on a separate hardware so in theory the solution's scalability is unlimited.
Secured by JWT.
- Lunch occasion participants don't have a tool to find consensus while finding a lunch place
- Lunch occasion participants can't remember all lunch place options
- Different personalities may make the verbal at-time-voting unequal
- Docker & Docker Compose
- Java 11 or later
- sbt
- grpcui (nice to have)
See more: https://docs.kalix.io/java/index.html#_prerequisites
Open three terminals and run each command in project root in own tabs in given order.
docker-compose up
sbt run
grpcui -plaintext localhost:9000
JWT as a Bearer token is required:
- User
Authorization
header in request metadata with JWT token as a value withBearer
-prefix.
Required claims:
username
(admin
has admin rights by default)organization
(each organization is a tenant)
Example:
- As Admin (Username
admin
)- Introduce Area -> Like
jyväskylä
- Introduce Voter(s) -> Like
simo
,seppo
- Introduce Area -> Like
- As Voter (
simo
)- Introduce Place(s) -> Like
fitwok
,basecamp
,shalimar
,nom
- Publish Occasion -> Datetimed lunch occasion
- Vote a Place For the Occasion
- Introduce Place(s) -> Like
- As Voter 2 (
seppo
)- Get Occasions
- Get Place IDs
- Vote a Place For the Occasion
- See voting results
- Get Occasions
- AreasWithVotersJoinView
LEFT JOIN
does not seem to work properly -> Can't see area before it has it's first voter
EventStorming and DDD influenced this process.
Process was iterative despite it has been described as a flow.