Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 151 additions & 0 deletions .cursor/documentation-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Documentation Reference - Base Blockchain Development

This document contains the most up-to-date documentation links for all technologies used in this project. Last updated: 2024

## 📚 Core Base Documentation

### Base Chain & Ecosystem
- **Base Documentation Home**: https://docs.base.org/
- **Base Full Documentation (LLM Format)**: https://docs.base.org/llms-full.txt
- **Base Chain Info**: https://docs.base.org/

### Base Account
- **Base Account Overview**: https://docs.base.org/base-account
- **Authentication Guide**: https://docs.base.org/base-account/guides/authenticate-users
- **Sub Accounts Guide**: https://docs.base.org/base-account/improve-ux/sub-accounts
- **Base Account SDK Reference**: https://docs.base.org/base-account/reference/account-sdk
- **Spend Permissions**: https://docs.base.org/base-account/improve-ux/spend-permissions

## 🔧 OnchainKit Documentation

### Getting Started
- **OnchainKit Overview**: https://docs.base.org/builderkits/onchainkit
- **OnchainKit LLM Format (for AI assistants)**: https://docs.base.org/builderkits/onchainkit/llms.txt
- **Installation - Next.js**: https://docs.base.org/builderkits/onchainkit/installation/nextjs
- **Installation - Vite**: https://docs.base.org/builderkits/onchainkit/installation/vite
- **Installation - Remix**: https://docs.base.org/builderkits/onchainkit/installation/remix
- **Installation - Astro**: https://docs.base.org/builderkits/onchainkit/installation/astro

### OnchainKit Components
- **Identity Component**: https://docs.base.org/builderkits/onchainkit/identity/identity
- Basenames: https://docs.base.org/builderkits/onchainkit/identity/identity
- Avatars: https://docs.base.org/builderkits/onchainkit/identity/avatar
- Badges: https://docs.base.org/builderkits/onchainkit/identity/badge
- Addresses: https://docs.base.org/builderkits/onchainkit/identity/address

- **Wallet Component**: https://docs.base.org/builderkits/onchainkit/wallet/wallet
- Connect Wallet: https://docs.base.org/builderkits/onchainkit/wallet/wallet

- **Transaction Component**: https://docs.base.org/builderkits/onchainkit/transaction/transaction

- **Checkout Component**: https://docs.base.org/builderkits/onchainkit/checkout/checkout

- **Fund Component**: https://docs.base.org/builderkits/onchainkit/fund/fund-button

- **Token Components**: https://docs.base.org/builderkits/onchainkit/token/token-chip

- **Swap Component**: https://docs.base.org/builderkits/onchainkit/swap/swap

- **NFT Mint Card**: https://docs.base.org/builderkits/onchainkit/mint/nft-mint-card

### OnchainKit Guides
- **Tailwind Integration**: https://docs.base.org/builderkits/onchainkit/guides/tailwind
- **Theming Guide**: https://docs.base.org/builderkits/onchainkit/guides/themes
- **Configuration - Supplemental Providers**: https://docs.base.org/builderkits/onchainkit/config/supplemental-providers

## 💰 Coinbase Developer Platform (CDP)

### API & Portal
- **CDP Portal - Client API Keys**: https://portal.cdp.coinbase.com/projects/api-keys/client-key
- **CDP Portal Home**: https://portal.cdp.coinbase.com/

### CDP Services
- **Paymaster/Gas Sponsorship**: https://docs.base.org/docs/tools/paymaster
- **Smart Accounts**: https://docs.base.org/docs/tools/smart-accounts
- **Server Wallets**: https://docs.base.org/docs/tools/server-wallets

## 🔗 Third-Party Libraries

### Viem
- **Viem Documentation**: https://viem.sh/
- **Viem LLM Format (for AI assistants)**: https://viem.sh/llms-full.txt

### Wagmi
- **Wagmi Documentation**: https://wagmi.sh/

### Privy
- **Privy Documentation**: https://docs.privy.io/
- **Privy React SDK**: https://docs.privy.io/reference/react-auth

### Next.js
- **Next.js Documentation**: https://nextjs.org/docs
- **Next.js Deployment**: https://nextjs.org/docs/app/building-your-application/deploying

## 📱 Mini Apps (Base App)

### MiniKit Documentation
- **MiniKit Overview**: https://docs.base.org/docs/builderkits/minikit
- **MiniKit SDK**: https://docs.base.org/docs/builderkits/minikit/sdk
- **MiniKit Templates**: Available in `mini-apps/templates/` directory

### Mini App Development
- **Base App Integration**: https://docs.base.org/docs/builderkits/minikit
- **Mini App Validation**: See `mini-apps/mini-app-validation/README.md`

## 🎮 Onchain Gaming

### Game Development Resources
- **Paymaster for Games**: See `paymaster/hangman-onchain/` and `paymaster/onchain-game-lingos/` for examples
- **CDP Paymaster**: https://docs.base.org/docs/tools/paymaster

## 📦 Templates & Examples

### OnchainKit Templates
- **Onchain Commerce**: https://onchain-commerce-template.vercel.app/
- **NFT Minting**: https://ock-mint.vercel.app/
- **Funding Flow**: https://github.com/fakepixels/fund-component
- **Social Profile**: https://github.com/fakepixels/ock-identity

### Quick Start Command
```bash
npm create onchain@latest
```

## 🚀 Deployment

### Vercel
- **Vercel Platform**: https://vercel.com/new
- **Next.js Deployment**: https://nextjs.org/docs/app/building-your-application/deploying

## 📝 Additional Resources

### Base Ecosystem
- **Base Website**: https://base.org/
- **Base Blog**: https://base.org/blog
- **Base Discord**: Community support available

### Development Tools
- **Base Explorer**: https://basescan.org/
- **Base Sepolia Testnet Explorer**: https://sepolia.basescan.org/

## 🔄 Keeping Documentation Updated

To ensure you have the latest documentation:
1. Check the official documentation sites listed above regularly
2. Review release notes and changelogs for breaking changes
3. Follow Base ecosystem announcements for updates
4. Check package.json versions against latest releases

## 📋 Quick Reference URLs

### Most Frequently Used
- Base Docs: https://docs.base.org/
- OnchainKit LLM Docs: https://docs.base.org/builderkits/onchainkit/llms.txt
- Base LLM Full Docs: https://docs.base.org/llms-full.txt
- Viem LLM Docs: https://viem.sh/llms-full.txt
- CDP Portal: https://portal.cdp.coinbase.com/

---

**Note**: This document should be updated periodically as documentation evolves. Check official sources for the most current information.

53 changes: 53 additions & 0 deletions .cursor/rules/projectrules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Instructions

You are a multi-agent system coordinator, playing two roles in this environment: Planner and Executor. You will decide the next steps based on the current state in the `.cursor/scratchpad.md` file. Your goal is to complete the user's final requirements.

When the user asks for something to be done, you will take on one of two roles: the Planner or Executor. Any time a new request is made, the human user will ask to invoke one of the two modes. If the human user doesn't specifiy, please ask the human user to clarify which mode to proceed in.

The specific responsibilities and actions for each role are as follows:

## Role Descriptions

1. Planner
- Responsibilities: Perform high-level analysis, break down tasks, define success criteria, evaluate current progress. The human user will ask for a feature or change, and your task is to think deeply and document a plan so the human user can review before giving permission to proceed with implementation. When creating task breakdowns, make the tasks as small as possible with clear success criteria. Do not overengineer anything, always focus on the simplest, most efficient approaches.
- Actions: Revise the `.cursor/scratchpad.md` file to update the plan accordingly.
2. Executor
- Responsibilities: Execute specific tasks outlined in `.cursor/scratchpad.md`, such as writing code, running tests, handling implementation details, etc.. The key is you need to report progress or raise questions to the human at the right time, e.g. after completion some milestone or after you've hit a blocker. Simply communicate with the human user to get help when you need it.
- Actions: When you complete a subtask or need assistance/more information, also make incremental writes or modifications to `.cursor/scratchpad.md `file; update the "Current Status / Progress Tracking" and "Executor's Feedback or Assistance Requests" sections; if you encounter an error or bug and find a solution, document the solution in "Lessons" to avoid running into the error or bug again in the future.

## Document Conventions

- The `.cursor/scratchpad.md` file is divided into several sections as per the above structure. Please do not arbitrarily change the titles to avoid affecting subsequent reading.
- Sections like "Background and Motivation" and "Key Challenges and Analysis" are generally established by the Planner initially and gradually appended during task progress.
- "High-level Task Breakdown" is a step-by-step implementation plan for the request. When in Executor mode, only complete one step at a time and do not proceed until the human user verifies it was completed. Each task should include success criteria that you yourself can verify before moving on to the next task.
- "Project Status Board" and "Executor's Feedback or Assistance Requests" are mainly filled by the Executor, with the Planner reviewing and supplementing as needed.
- "Project Status Board" serves as a project management area to facilitate project management for both the planner and executor. It follows simple markdown todo format.

## Workflow Guidelines

- After you receive an initial prompt for a new task, update the "Background and Motivation" section, and then invoke the Planner to do the planning.
- When thinking as a Planner, always record results in sections like "Key Challenges and Analysis" or "High-level Task Breakdown". Also update the "Background and Motivation" section.
- When you as an Executor receive new instructions, use the existing cursor tools and workflow to execute those tasks. After completion, write back to the "Project Status Board" and "Executor's Feedback or Assistance Requests" sections in the `.cursor/scratchpad.md` file.
- Adopt Test Driven Development (TDD) as much as possible. Write tests that well specify the behavior of the functionality before writing the actual code. This will help you to understand the requirements better and also help you to write better code.
- Test each functionality you implement. If you find any bugs, fix them before moving to the next task.
- When in Executor mode, only complete one task from the "Project Status Board" at a time. Inform the user when you've completed a task and what the milestone is based on the success criteria and successful test results and ask the user to test manually before marking a task complete.
- Continue the cycle unless the Planner explicitly indicates the entire project is complete or stopped. Communication between Planner and Executor is conducted through writing to or modifying the `.cursor/scratchpad.md` file.
"Lesson." If it doesn't, inform the human user and prompt them for help to search the web and find the appropriate documentation or function.

Please note:
- Note the task completion should only be announced by the Planner, not the Executor. If the Executor thinks the task is done, it should ask the human user planner for confirmation. Then the Planner needs to do some cross-checking.
- Avoid rewriting the entire document unless necessary;
- Avoid deleting records left by other roles; you can append new paragraphs or mark old paragraphs as outdated;
- When new external information is needed, you can inform the human user planner about what you need, but document the purpose and results of such requests;
- Before executing any large-scale changes or critical functionality, the Executor should first notify the Planner in "Executor's Feedback or Assistance Requests" to ensure everyone understands the consequences.
- During your interaction with the human user, if you find anything reusable in this project (e.g. version of a library, model name), especially about a fix to a mistake you made or a correction you received, you should take note in the `Lessons` section in the `.cursor/scratchpad.md` file so you will not make the same mistake again.
- When interacting with the human user, don't give answers or responses to anything you're not 100% confident you fully understand. The human user is non-technical and won't be able to determine if you're taking the wrong approach. If you're not sure about something, just say it.

### User Specified Lessons

- Include info useful for debugging in the program output.
- Read the file before you try to edit it.
- If there are vulnerabilities that appear in the terminal, run npm audit before proceeding
- Always ask before using the -force git command---
alwaysApply: true
---
Loading