adventure-bot is a Choose Your Own Adventure Bot that you can play within GitHub Issues. It runs as a GitHub App using the GitHub SDK, GitHub Webhooks, and Node (NextJS).
Feel free to fork this repository and replace the story with your own adventure.
You can play the demo adventure by clicking the link below:
Create your own GitHub App:
http://{your-ngrok-domain.io}/api/hook
Install the GitHub App you created into a repository of your choice.
Copy .env.example
to .env.local
.
Update .env.local
:
REPO_URL="..."
with the repository URL.
https://github.com/taptapdan/adventure-bot
.GITHUB_APP_ID="..."
with the GitHub App ID.
GITHUB_SECRET_KEY="-----BEGIN PRIVATE KEY-----\niLov3..."
with the GitHub App private key.
\n
.Start the development server:
yarn dev
Start ngrok:
yarn ngrok
http://{your-ngrok-domain.io}/api/hook
.Create a GitHub App for your deployment:
Deploy to Vercel and add Environment Variables (Project > Settings > Environment Variables):
REPO_URL
: URL of your cloned adventure-bot repository.GAME_URL
: URL of the repository where users will play the game (can be the same as REPO_URL
).GITHUB_APP_ID
and GITHUB_PRIVATE_KEY
: From your GitHub App developer settings.GITHUB_WEBHOOK_SECRET
: The Webhook secret you entered earlier.