AI Dungeon Game
Overview
You will build an AI powered dungeon adventure game during this tutorial. This tutorial does not assume any existing knowledge of the @aws/nx-plugin
or related technologies. The techniques you’ll learn in this tutorial are fundamental to building any @aws/nx-plugin
based application, and fully understanding it will give you a deep understanding of the @aws/nx-plugin
and a basic understanding of how to use NX.
Users who complete this tutorial can expect to walk away with the knowledge to:
- use the
@aws/nx-plugin
to create new applications - use NX to manage/build their codebase
- build APIs using both tRPC and FastAPI
- use Tanstack router to create new pages
- use Tanstack query to call backend APIs
- make modifications to generated code to be fit for purpose
- create and deploy CDK infrastructure
What are you building?
In this tutorial, you’ll build an AI powered dungeon adventure game with @aws/nx-plugin
.
You can see what it will look like when you’re finished here:


Components of the application
The AI powered dungeon adventure game will be built using the following component architecture:

- tRPC API which uses ElectroDB/DynamoDB for managing the game state
- Python/FastAPI Lambda function with streaming responses for story generation (powered by Amazon Bedrock)
- React/Vite frontend website utilising:
- Amazon Cognito/Identity Pools for secure API calls
- Tanstack router which supports type-safe file based routing
- Generated SDKs for calling the Game and Story APIs (leveraging Tanstack query)
- CDK infrastructure to deploy the application
Prerequisites
The following global dependencies are needed before proceeding:
- Git
- Node >= 22 (We recommend using something like NVM to manage your node versions)
- verify by running
node --version
- verify by running
- PNPM >= 10 (you can also use Yarn >= 4, Bun >= 1, or NPM >= 10 if you prefer)
- verify by running
pnpm --version
,yarn --version
,bun --version
ornpm --version
- verify by running
- UV >= 0.5.29
- install Python 3.12 by running:
uv python install 3.12.0
- verify with
uv python list --only-installed
- install Python 3.12 by running:
- AWS Credentials configured to your target AWS account (where your application will be deployed)
- If you are using VSCode, we recommend installing the Nx Console VSCode Plugin.
- Ensure your AWS account has enabled access to the Anthropic Claude 3.5 Sonnet v2 model within Bedrock for your target region via the steps outlined in this guide.