This is the backend for www.paper-tactics.com. The frontend is also open source.
The application has borrowed the concepts of a port and an adapter from the hexagonal architecture and the concepts of a use case and an entity from the clean architecture. The dependency graph looks like this:
The production runs on AWS as a few lambdas,
a few DynamoDB tables and a WebSocket AWS API Gateway.
A CloudFormation template and the lambdas are within the aws/ directory.
A lambda instantiates adapters, parses requests, and invokes a use case.
app.py is an application for local testing.
It requires bidict, websockets and nest-asyncio from PyPI.
The frontend can connect to your locally run server
by selecting Localhost from the server drop-down.
Entity tests require pytest and hypothesis.
AWS adapter tests also require docker, moto and boto3.
Most of the tests check a lot of random inputs (property based, hypothesis),
so it's best to run them selectively.