Skip to content

matthewtgilbride/codenames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codenames

Hi. This is a personal project that exists for two reasons:

  1. To learn Rust
  2. To make my own version of codenames that I can play with friends and family (inspiration: horsepaste)

Here's the result: codenames.mattgilbride.com

prerequisites

See the Makefile to run the various local development tasks. help is the default goal and will print descriptions of the various commands:

make (or make help)

Usage:
  make 

Backend (Rust REST Service)
  build-service    compile the rust REST service project
  format-service   run code formatting on the rust project
  test-service     run unit tests on the rust project
  check-service    check the rust project (format, build, and unit test)
  start-service    start the rust project locally using cargo run
  integration-test-service  run the newman integration test suite on the service
  integration-test  as of now, there are only integration tests for the service

Frontend (Typescript/NextJS Web App)
  build-app        build the web UI
  format-app       lint the web UI
  check-app        build and lint the web UI
  start-app        start the web UI locally

Check, Build, and Start both
  check            check both the service and app projects
  build            build both the service and app projects
  start            start fully functioning stack locally via docker

Infrastructure (AWS CDK)
  deploy-infra     deploy AWS infrastructure
  destroy-infra    tear down AWS infrastructure
  build-service-image  build docker image for the service - CAREFUL - this needs to be done from an x86 powered machine (not Apple M1 silicon)
  build-app-image  build docker image for the web ui
  build-images     build both images
  ecr-login        login into AWS ECR for docker
  push-service-image  push service image
  push-app-image   push app image
  push-images      push both images
  start-aws        start fully functioning stack on EC2

Help
  help             Display this help

subprojects

Each subproject contains its own makefile. For simplicity and readability, many of those commands are exposed to the top level Makefile, but not all. You can execute make or make help in any of the below subdirectories to view descriptions of various commands.

service

The service directory contains the REST service supporting gameplay, written in Rust.

You will notice three subprojects within the service directory. They are as follows

domain

This is a rust library containing the core business logic representing a game of codenames.

actix

A better name for this would be actix-web. This subproject is an actix-web server implementation of the domain.

wasm

At one point in time, the goal is to run this project as a wasmCloud actor. This subproject is a wasmCloud implementation of the domain.
As of the latest update to this README, the wasm subproject has been set aside for now...but I hope to come back to it someday.

app

The app directory contains the web based user interface, written in React with NextJS.

infra

The infra directory contains the AWS deployment for the project, written in Typescript with the AWS CDK.