Skip to content

The backend for www.paper-tactics.com — a web application to play a pen-and-paper game with other people around the world.

License

Notifications You must be signed in to change notification settings

Kharacternyk/paper-tactics

Repository files navigation

Paper Tactics

This is the backend for www.paper-tactics.com. The frontend is also open source.

Architecture

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:

architecture graph

Deployment

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.

Development

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.

Testing

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.

About

The backend for www.paper-tactics.com — a web application to play a pen-and-paper game with other people around the world.

Resources

License

Stars

Watchers

Forks