{"id":8196108,"url":"https://github.com/seangeng/based-adventure","last_synced_at":"2025-04-19T15:33:58.722Z","repository":{"id":222975864,"uuid":"749161977","full_name":"seangeng/based-adventure","owner":"seangeng","description":"Farcaster Frames Text-based Adventure on the Base L2","archived":false,"fork":false,"pushed_at":"2024-02-17T11:20:00.000Z","size":24203,"stargazers_count":38,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-02-17T12:26:36.081Z","etag":null,"topics":["farcaster","farcaster-frames","farcaster-protocol","openai"],"latest_commit_sha":null,"homepage":"https://basequest.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seangeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-27T18:59:46.000Z","updated_at":"2024-02-17T12:26:37.703Z","dependencies_parsed_at":"2024-02-17T12:37:14.155Z","dependency_job_id":null,"html_url":"https://github.com/seangeng/based-adventure","commit_stats":null,"previous_names":["seangeng/based-adventure"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seangeng%2Fbased-adventure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seangeng%2Fbased-adventure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seangeng%2Fbased-adventure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seangeng%2Fbased-adventure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seangeng","download_url":"https://codeload.github.com/seangeng/based-adventure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249727603,"owners_count":21316703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["farcaster","farcaster-frames","farcaster-protocol","openai"],"created_at":"2024-04-18T21:07:20.526Z","updated_at":"2025-04-19T15:33:58.696Z","avatar_url":"https://github.com/seangeng.png","language":"TypeScript","funding_links":[],"categories":["Useful Tools \u0026 Libraries"],"sub_categories":["Open source Frames"],"readme":"# Base Quest\n\nThis is an experimental Farcaster frame app for an AI text-based adventure powered by the Base L2.\nBase Quest is still a work in progress and subject to change.\n\n![Base Quest Splash Screen](https://raw.githubusercontent.com/seangeng/based-adventure/e2128d21bf099af021946a338635b8022c8f7563/public/base-quest-bg.jpg)\n\n# Want to play?\n\nFollow me on Farcaster for the latest game link: https://warpcast.com/seangeng\n\n## Features\n\n- AI Driven Gameplay ✅\n- Leaderboard ✅\n- Option to continue vs start a new game ✅\n- Issue Character NFTs on Base \u0026 save state to them ✅\n- Notifications\n- Character attributes\n- Game backgrounds \u0026 environments (✅ testing)\n- $EXP Tokens\n- Character profile links \u0026 PvP (✅ testing)\n- Multi-player quests\n\n## How it Works\n\n![Technical Diagram](https://raw.githubusercontent.com/seangeng/based-adventure/46cadc4b3a223c27a28597c106d30e79f743fac4/public/base-quest-diagram.png)\n\nThis high level diagram explains the frame states \u0026 how menu actions are managed generically.\nButtons can be passed to the menu in the GET parameter, and map to the business logic - essentially acting as a router.\n\nSeveral awesome SDKs \u0026 frameworks are leveraged to accelerate developement:\n\nCoinbase OnChain Kit: For frame helpers \u0026 future onchain actions.\n\n- https://github.com/coinbase/onchainkit\n\nNeynar: Making it easy to interact with Farcaster\n\n- https://neynar.com/\n\nOpenAI: For chat completions \u0026 image generation.\n\n- https://openai.com\n\nInngest: For executing background jobs (there is latency when generating images + certain onchain actions)\n\n- https://www.inngest.com/\n\nVercel: For hosting, and easy programmatic OpenGraph image generation:\n\n- Check out `/src/app/api/image/prompt/route.tsx` as an example\n- https://vercel.com/docs/functions/edge-functions/og-image-generation/og-image-examples\n\n### Basic AI Workflow\n\nBase Quest uses the OpenAI GPT 3.5 Turbo model to narrate \u0026 continue the storyline.\nThat means each user's journey is completely unique!\n\nCheck out the `/src/app/api/prompt/route.tsx` file to see how the AI prompt loop works:\n\n1. AI generates the prompt \u0026 button options\n   - system: You are the narrator in a choose your own adventure text-based game.\n   - The user is a {class} starting their first adventure.\n   - Write a character narration prompt (up to 100 characters), and present the user with either 2 or 4 action options to continue the story.\n   - Action options should be either emoji(s) or short button text (up to 14 characters)\n   - Return a JSON response like so: { }\n2. Present options as next frame og:buttons\n3. Feed the previous prompt \u0026 user selected action to the next prompt screen\n\n### Onchain Interactions\n\nTo avoid timeouts and for better resiliency - Inngest is leveraged to run serverless jobs async \u0026 in the background.\nThis pattern has better monitoring, auto-retrys, and decouples business logic from the frame rendering.\n\nCheck out `/src/app/inngest/functions.tsx` to see how this works.\n\nWe use the InstaMint.sol contract - developed by my team at Coinbase \u0026 optimized for gas \u0026 ease of use!\nThe NFT factory contract is available at:\nSepolia Testnet: `0x4d64cAc5Bd09c7CaC9748D1E5a63A30Ee40B6A40`\nBase Mainnet: `0x85db63af3f0cfac7813abb4dfca6d713e937a5dd`\n\n### Want to build onchain?\n\nThe future is onchain. Does this interest you? Do you think you can do better?\nCoinbase hires the top 1% of developers - reach out to me for a possible referral: https://www.linkedin.com/in/seangeng/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseangeng%2Fbased-adventure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseangeng%2Fbased-adventure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseangeng%2Fbased-adventure/lists"}