First, you need to launch a local copy of the game client and server, connected to an AWS account. This way, when you use Kiro to modify the codebase, you can make sure that your changes actually work.
Clone the open source code repository and switch to the challenge branch:
git clone git@github.com:kirodotdev/spirit-of-kiro.git cd spirit-of-kiro/ git checkout challenge
After you clone, check out a few key files to understand the project:
architecture.md - An overview of the architectureappsec-overview.md - Details about how specific components of the game fit together.You'll need the following dependencies installed:
Run the dependency check script to verify everything is set up correctly:
./scripts/check-dependencies.sh
Loading image...
Deploy an Amazon Cognito user pool for authentication (available in AWS Free Tier):
./scripts/deploy-cognito.sh game-auth
Loading image...
Build and launch the game stack using either Docker or Podman:
podman compose build && podman compose up \ --watch \ --remove-orphans \ --timeout 0 \ --force-recreate
The first time you run this command it may take a couple minutes. Subsequent runs should complete in seconds.
Loading image...![[alt !!alt]](/images/video-game-guide/build-and-run.gif?h=9bb231bf)
After completion, you should see the game containers running in your container interface.
The following example shows the Podman UI:
Loading image...![[alt !!alt]](/images/video-game-guide/podman.png?h=b0ec24dd)
You can use Control + C or Command + C to stop the entire stack.
When your stack launches locally, it also launches DynamoDB local, a special container that imitates the DynamoDB AWS service, but running locally on your own machine. The game is expecting several tables to be created in this DynamoDB container.
While the game stack is still running, open a new terminal and use the following commands to automatically create the necessary tables:
podman exec server mkdir -p /app/server/iac && podman cp scripts/bootstrap-local-dynamodb.js server:/app/ && podman cp server/iac/dynamodb.yml server:/app/server/iac/ && podman exec server bun run /app/bootstrap-local-dynamodb.js
Loading image...![[alt !!alt]](/images/video-game-guide/create-tables.gif?h=b19aa5ff)
It’s time to verify that everything is working properly. Try the following command first to make sure that the game server is running locally:
curl localhost:8080
You should see the response OK
Next open your web browser and put the following address into the address bar:
localhost:5173
You should see the homepage of the game client. Create an account and start playing.
Here are some basic things to try in the game:
WASD to move around, E to interactDone playing with your copy of the game? Let's get to work on the first task:
Setting up for development on spirit of Kiro