A decentralized card game built on the Stacks blockchain that turns your NFT collection into playable cards. Challenge other players or compete against AI opponents in this unique take on the classic Top Trumps game.
- NFT Integration: Use your existing Stacks NFTs as game cards
- Multiple Game Modes:
- Multiplayer PvP matches
- Single-player campaign against AI
- Tournament mode
- Deck Building: Create strategic decks from your NFT collection
- Ranking System: Compete for monthly and all-time leaderboard positions
- Rewards: Earn exclusive NFTs and tokens through gameplay
- Node.js (v20.5.x or higher)
- Yarn (v4.1.0 or higher)
- A Stacks wallet (Hiro Wallet recommended)
- Clone the repository:
git clone https://github.com/Dulb26/stacks-top-trumps.git
cd stacks-top-trumps
- Install dependencies:
yarn install
- Create a
.env
file in the root directory with the following variables:
APP_NAME=Stacks Top Trumps
GOOGLE_CLOUD_PROJECT=your-project-id
FIREBASE_APP_ID=your-app-id
FIREBASE_API_KEY=your-api-key
FIREBASE_AUTH_DOMAIN=your-domain
- Start the development server:
yarn start
Visit http://localhost:5173
to see the game in action!
- Frontend Framework: React with Vite
- Styling: MUI Joy UI with Emotion
- Blockchain Integration: Stacks.js & @stacks/connect
- Authentication: Firebase Auth
- State Management: Jotai
- Testing: Vitest with Happy DOM
- Select 5-10 NFTs from your wallet
- Each NFT must be from a different collection
- NFTs' attributes and collection stats determine their gameplay stats
- Connect your wallet
- Choose game mode (PvP or AI)
- Select your deck
- Take turns comparing NFT attributes
- Win rounds to collect points
- Player with most points wins
src/
├── app/ # Frontend application
│ ├── components/ # Reusable UI components
│ ├── core/ # Core modules and hooks
│ ├── icons/ # Custom icon components
│ ├── routes/ # Application routes
│ └── public/ # Static assets
└── scripts/ # Build and deployment scripts
yarn start
- Start development serveryarn build
- Build production versionyarn test
- Run testsyarn lint
- Run ESLintyarn format
- Format code with Prettier
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'feat: add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Stacks Foundation
- Indexer.xyz
- This game is in beta.
- Report bugs and security issues through GitHub Issues
Contact us through GitHub Issues or any other means to start the integration process.
Attributes are derived from the NFT's metadata and collection traits.
Monthly leaderboards reset on the 1st of each month. All-time rankings are permanent.
For additional questions, join our Discord community.
Built with ❤️ by Dulb.btc for the Stacks community