JulioMCruz/ZodiacCards(opens in a new tab)
Language: TypeScript
Zodic card
- stars
- 2
- watchers
- 0
- forks
- 2
- open issues
- 0
- Last updated
- 12/19/2025
Language: TypeScript
Zodic card
A Farcaster Mini App that generates personalized Zodiac fortunes and mints them as NFTs on Celo Mainnet.
Network: Celo Mainnet (Chain ID: 42220)
Deployed: December 3, 2025
V3 NFT Contract:
0x3ff2E08339588c594E6155Fd088f9668b2E7c7750x3b433190AD6dB27461f6a118AcfcDFfa0E1D491bV3 Payment Contract:
0x2e73081c0455a43f99a02d38a6c6a90b4d3b51f3Deployed: October-November 2025
V2 NFT Contract:
0x415Df58904f56A159748476610B8830db2548158_nextTokenId)V2 Payment Contract:
0x52e4212bd4085296168A7f880DfB6B646d52Fe61Deployed: October 2025
V1 NFT Contract:
| Version | Type | Address | Status | Mint Fee | Notes |
|---|---|---|---|---|---|
| V3 | NFT Proxy | 0x3ff2E08339588c594E6155Fd088f9668b2E7c775 |
✅ Active | 2.0 CELO | Clean state, dual functions |
| V3 | NFT Implementation | 0x3b433190AD6dB27461f6a118AcfcDFfa0E1D491b |
✅ Active | - | UUPS upgradeable |
| V3 | Payment | 0x2e73081c0455a43f99a02d38a6c6a90b4d3b51f3 |
✅ Active | 1.0 CELO | Gas-free storage, promotional |
| V2 | NFT Proxy | 0x415Df58904f56A159748476610B8830db2548158 |
🔒 Read-Only | 10.0 CELO | Corrupted state |
| V2 | Payment | 0x52e4212bd4085296168A7f880DfB6B646d52Fe61 |
🔒 Read-Only | 2.0 CELO | Legacy payments |
| V1 | NFT | [TBD] | 🔒 Historical | [TBD] | Original contract |
Backward Compatibility: The frontend automatically displays NFTs from all versions (V1, V2, and V3) in the collection page, ensuring complete historical visibility and access to all your minted fortunes.
Zodiac Card is a Farcaster Frame-enabled Mini App deployed on Celo blockchain, designed to revolutionize fortune-telling in the web3 space. Built natively for the Farcaster ecosystem, it leverages Frames for seamless social interactions and Celo's mobile-first blockchain infrastructure for accessible, low-cost transactions using native CELO tokens. The app enables Farcaster users to engage with fortune-telling experiences directly within their social feeds, fostering a unique blend of social engagement and web3 functionality.
As a decentralized application, Zodiac Card combines the power of astrology, NFTs, and AI to create personalized fortune-telling experiences. Users can mint unique NFTs that represent their personalized fortune cards, with each card dynamically generated based on three key elements:
The integration with Farcaster's social protocol allows users to share their fortune cards, participate in astrological discussions, and build a community around shared cosmic experiences. Through Celo blockchain's mobile-first infrastructure and native CELO payments (18 decimals), users enjoy fast minting processes and minimal transaction costs while maintaining the security and decentralization benefits of a carbon-negative blockchain.
Zodiac Card introduces Seasonal Themes - exclusive visual styles that transform your fortune cards into rare, limited-time collectibles. These themed NFTs are only available during specific periods, creating unique collector value and seasonal exclusivity.
| Benefit | Description |
|---|---|
| 📈 Collector Value | Limited availability creates scarcity - themed NFTs become rare collectibles after the season ends |
| 🎁 Perfect Timing | Mint holiday-themed fortunes as unique digital gifts for friends and family |
| 🏆 Exclusive Ownership | Own a piece of digital art that can never be minted again outside its season |
| 📊 Historical Record | Theme data is permanently stored in IPFS metadata - proof of when you minted |
| 🎨 Stunning Visuals | AI-generated images enhanced with seasonal elements: snow, fireworks, festive lights |
| Theme | Emoji | Availability | Visual Elements |
|---|---|---|---|
| Classic Zodiac | ⭐ | Year-round | Traditional cosmic anime style with nebulae and constellations |
| Winter Holidays | 🎄 | December 1-31 | Snowflakes, aurora lights, golden bokeh, frost patterns, festive red & green |
| New Year | 🎆 | December 15 - January 20 | Fireworks, confetti, midnight blue & gold tones, celebration sparkles |
Current Season: Check the app to see which themes are available today!
Once the season ends, these themed NFTs can never be minted again. The theme information is permanently recorded in the NFT's IPFS metadata, proving the exact time and season when your fortune was created.
┌─────────────────────────────────────────────────────────────────┐
│ COLLECTIBLE RARITY │
├─────────────────────────────────────────────────────────────────┤
│ ⭐ Classic Zodiac │ Common │ Always available │
│ 🎄 Winter Holidays │ Rare │ 31 days/year (December) │
│ 🎆 New Year │ Ultra Rare │ 37 days/year (Dec 15-Jan 20) │
└─────────────────────────────────────────────────────────────────┘
All themes cost the same 1.0 CELO for fortune generation + 2.0 CELO for minting (total: 3.0 CELO). The value comes from the limited-time availability and unique visual elements - not inflated pricing.
Status: ✅ Security Audit Passed
All API keys and private keys are properly protected:
.env files (gitignored)📄 See SECURITY_AUDIT.md for full audit report.
graph TB
subgraph Frontend["Frontend - Next.js 15 + React 19"]
UI[User Interface]
FC[Farcaster SDK]
WC[Wallet Connection<br/>Wagmi v2 + Viem v2]
SELF[Self Protocol SDK<br/>ZK Proofs]
THEME[Seasonal Theme Selector<br/>🎄 Winter | 🎆 New Year | ⭐ Classic]
end
subgraph Backend["Backend - Next.js API Routes"]
API[API Routes]
Fortune[Fortune Generator<br/>Replicate Flux Pro]
PROMPT[Seasonal Prompt Builder<br/>Theme Modifiers]
IPFS_API[IPFS Upload<br/>Pinata]
S3[AWS S3 Storage]
end
subgraph Blockchain["Celo Mainnet - Smart Contracts"]
PaymentV3[Payment Contract V3<br/>0x2e73...51f3<br/>1.0 CELO Promotional]
NFTV3[NFT Contract V3<br/>0x3ff2...c775<br/>2.0 CELO Mint]
NFTV2[NFT Contract V2<br/>0x415D...8158<br/>Legacy Read-Only]
end
subgraph External["External Services"]
IPFS[IPFS Network<br/>Metadata + Theme Storage]
Divvi[Divvi Protocol<br/>Referral Tracking]
Blockscout[Blockscout API<br/>NFT Indexing]
end
UI --> FC
UI --> WC
UI --> SELF
UI --> THEME
FC --> API
WC --> PaymentV3
WC --> NFTV3
SELF --> API
THEME --> PROMPT
API --> PROMPT
PROMPT --> Fortune
API --> IPFS_API
API --> S3
Fortune --> S3
IPFS_API --> IPFS
PaymentV3 --> IPFS
NFTV3 --> IPFS
NFTV3 --> Divvi
UI --> Blockscout
Blockscout --> NFTV3
Blockscout --> NFTV2
sequenceDiagram
actor User
participant FC as Farcaster App
participant UI as Zodiac Card UI
participant SELF as Self Protocol
participant API as Backend API
participant Flux as Replicate Flux Pro
participant S3 as AWS S3
participant PayV3 as Payment Contract V3
participant IPFS as IPFS/Pinata
participant NFTV3 as NFT Contract V3
participant Divvi as Divvi Protocol
participant BS as Blockscout
Note over User,BS: Step 1: Authentication & Data Collection
User->>FC: Open Zodiac Card Mini App
FC->>UI: Launch App
UI->>User: Display Fortune Form
alt Self Protocol Flow (Optional)
User->>SELF: Scan QR Code with Self App
SELF->>API: Send ZK Proof (DOB)
API-->>UI: Auto-fill Birth Date
else Manual Entry
User->>UI: Manually Enter Birth Details
end
Note over User,BS: Step 2: Theme Selection (Seasonal)
UI->>User: Display Available Themes
Note over UI: ⭐ Classic (Always)<br/>🎄 Winter Holidays (December)<br/>🎆 New Year (Dec 15 - Jan 20)
User->>UI: Select Theme (e.g., 🎄 Winter Holidays)
UI->>UI: Store selectedTheme in state
Note over User,BS: Step 3: Fortune Generation (1.0 CELO - Promotional!)
User->>UI: Click "Generate Fortune"
UI->>PayV3: createImagePayment() + 1.0 CELO
PayV3-->>UI: Return paymentId
UI->>API: /api/generate-fortune (paymentId, birthData, theme)
API->>API: buildSeasonalPrompt(basePrompt, theme)
Note over API: Inject theme modifiers:<br/>snowflakes, aurora lights,<br/>golden bokeh, frost patterns
API->>Flux: Generate Themed AI Image
Flux-->>S3: Store Image
S3-->>API: Image URL
API->>API: Create Fortune Metadata JSON with Theme Info
API->>IPFS: Upload Generation Metadata
IPFS-->>API: IPFS Hash (metadata URI)
API->>PayV3: storeGenerationMetadata(paymentId, metadataURI)
PayV3-->>API: Metadata Stored ✅
API-->>UI: Fortune Generated ✅
Note over User,BS: Step 4: NFT Minting (2.0 CELO)
User->>UI: Click "Mint NFT"
UI->>API: /api/upload-to-ipfs (fortune data + theme)
API->>IPFS: Upload NFT Metadata with Theme
Note over IPFS: Theme info permanently stored:<br/>{ theme: "winter-holidays",<br/> themeInfo: {...} }
IPFS-->>API: NFT Metadata URI
UI->>NFTV3: mintFromImagePayment(to, metadataURI, paymentId) + 2.0 CELO
Note over NFTV3: Auto-increment tokenId
NFTV3->>IPFS: Link Metadata URI
NFTV3->>Divvi: Track Referral (dataSuffix)
NFTV3-->>UI: Emit NFTMinted(tokenId, uri, paymentId)
UI->>PayV3: markAsMinted(paymentId, tokenId)
PayV3-->>UI: Marked as Minted ✅
UI-->>User: Display Minted NFT Card (Themed! 🎄)
Note over User,BS: Step 5: View Collection
User->>UI: Navigate to Collection
UI->>BS: Fetch NFT Transfers (V3 Contract)
BS-->>UI: V3 NFT List
UI->>BS: Fetch NFT Transfers (V2 Contract)
BS-->>UI: V2 NFT List (Legacy)
loop For Each NFT
UI->>IPFS: Fetch Metadata by tokenURI
IPFS-->>UI: NFT Metadata JSON (includes theme)
end
UI-->>User: Display Complete Collection (V2 + V3 + Theme Info)
zodiac-card/
├── ZodiacCardApp/ # Next.js 15 application
│ ├── app/ # App directory
│ │ ├── api/ # API routes (fortune, image, IPFS, S3)
│ │ ├── components/ # React components
│ │ ├── fortune/ # Fortune generation pages
│ │ └── result/ # NFT result display
│ ├── lib/ # Utility functions
│ ├── providers/ # Wagmi providers
│ └── public/ # Static assets
└── ZodiacCardContracts/ # Smart contract monorepo
└── packages/
└── hardhat/ # Hardhat development environment
├── contracts/ # Smart contract source files (ZodiacNFT.sol)
├── deploy/ # Deployment scripts
├── test/ # Contract test files
└── hardhat.config.ts # Celo network configuration
The smart contracts for Zodiac Card are organized in a monorepo structure under ZodiacCardContracts/. This setup allows for better organization and separation of concerns between the frontend application and blockchain components.
The smart contracts are developed using Hardhat and deployed on Celo network:
The contracts are set up with a robust development environment including:
cd ZodiacCardContracts/packages/hardhatyarn install
cp .env.example .env
yarn compile
yarn test# Deploy to Celo Sepolia testnet yarn deploy --network celoSepolia # Deploy to Celo mainnet yarn deploy --network celo # Verify contract on Celoscan yarn hardhat verify --network celo <CONTRACT_ADDRESS>
git clone https://github.com/yourusername/zodiac-card.git
cd zodiac-cardpnpm install
cd ZodiacCardApp cp .env.example .env.local # Required environment variables: # NEXT_PUBLIC_CHAIN_ID=42220 (Celo Mainnet) # # V3 Contracts (Current - Active): # NEXT_PUBLIC_NFT_CONTRACT_ADDRESS=0x3ff2E08339588c594E6155Fd088f9668b2E7c775 # NEXT_PUBLIC_PROXY_CONTRACT_ADDRESS=0x3ff2E08339588c594E6155Fd088f9668b2E7c775 # NEXT_PUBLIC_IMPLEMENTATION_CONTRACT_ADDRESS=0x3b433190AD6dB27461f6a118AcfcDFfa0E1D491b # NEXT_PUBLIC_IMAGE_PAYMENT_CONTRACT_ADDRESS=0x2e73081c0455a43f99a02d38a6c6a90b4d3b51f3 # # V2 Contracts (Legacy - Read-Only): # NEXT_PUBLIC_NFT_CONTRACT_ADDRESS_V2=0x415Df58904f56A159748476610B8830db2548158 # NEXT_PUBLIC_IMAGE_PAYMENT_CONTRACT_ADDRESS_V2=0x52e4212bd4085296168A7f880DfB6B646d52Fe61 # # Pricing: # NEXT_PUBLIC_CELO_MINT_PRICE=2.0 # NEXT_PUBLIC_IMAGE_FEE=1.0 (Promotional pricing!) # # Network & APIs: # NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=<your-project-id> # NEXT_PUBLIC_RPC_URL_CELO=https://forno.celo.org # OPENAI_API_KEY=<your-openai-key> # PINATA_API_KEY=<your-pinata-key> # AWS_ACCESS_KEY_ID=<your-aws-key> # # Self Protocol (Optional - for privacy-preserving birth date verification): # NEXT_PUBLIC_SELF_APP_NAME=Zodiac Card # NEXT_PUBLIC_SELF_SCOPE=zodiac-card-app # NEXT_PUBLIC_SITE_URL=<your-site-url>
cd ZodiacCardApp
pnpm dev0x3ff2E08339588c594E6155Fd088f9668b2E7c7750x2e73081c0455a43f99a02d38a6c6a90b4d3b51f30x415Df58904f56A159748476610B8830db2548158Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.