A clone of the vercel chat template with the following features:
- No authentication
- No chat history stored
- Uses Claude on AWS Bedrock
- Node.js 20.x
- AWS Credentials with access to the bedrock models
-
Clone the repository
-
Copy the
.env.example
file to.env.local
and update the environment variables -
Install the dependencies:
# using npm npm install # using bun bun install
-
Start the development server:
# using npm npm run dev # using bun bun dev
-
Fork this repository
-
Create a new project in the AWS Amplify Console and connect it to your forked repo.
-
Add the following environment variables to the app in the Amplify Console:
APP_AWS_REGION
: The region hosting the bedrock models (e.g.us-east-1
)APP_AWS_ACCESS_KEY_ID
: The AWS access key ID that has access to the bedrock modelsAPP_AWS_SECRET_ACCESS_KEY
: The AWS secret access key
Note
We must prefix the environment variables with APP_
as Amplify reserves this prefix for it's own internal use. This chat app supports environment variables with and without the APP_
prefix.
- Add the following to the build settings in the Amplify Console:
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
# add this line
- env | grep -e APP_AWS_REGION -e APP_AWS_ACCESS_KEY_ID -e APP_AWS_SECRET_ACCESS_KEY | sed 's/APP_//1' >> .env.production
# ...