Skip to content

Repository files navigation

0xFUTURE

Onchain fortune telling — numerology, astrology & tarot readings derived from your wallet.

0xFUTURE — the main app: header with countdown, logo, language selector, chain switcher and three module cards (Numerology, Astrology, Tarot)

Live at www.0xfuture.xyz

Next.js Base Soneium License: MIT


What it is

A Farcaster mini app that reads your wallet's onchain history and turns it into three kinds of daily readings. Every reading is deterministic for a given (wallet, UTC date) seed — the oracle says the same thing all day and refreshes at midnight UTC.

Module Input Price
Numerology Wallet hex → life-path number Free
Astrology First onchain transaction date → zodiac $0.10 USDC
Tarot Seeded three-card Rider-Waite draw $0.50 USDC

All UI copy and AI readings are localized in 11 languages: English, Turkish, Spanish, Portuguese, French, German, Russian, Chinese, Hindi, Urdu, Yoruba.


How it works

Numerology

The address is hex-decoded, digits summed with digital-root reduction, and mapped to a life-path number (1–9 or master numbers 11 / 22 / 33). Purely arithmetic, no payment.

Astrology

The wallet's first onchain transaction on the selected chain is looked up via the block explorer. That transaction's date is the wallet's "birth date"; a Western zodiac sign is derived from it, and a real daily horoscope for that sign is fetched and rewritten in a crypto voice.

Tarot

A daily seed derived from (wallet, UTC date) deterministically picks three cards (past / present / future) from the full 78-card Rider-Waite deck, each with an independent reversed flag. Cards flip in sequence.

AI interpretations are generated by Groq (Llama models) with per-module prompts, always in the user's chosen language. The API routes never expose the wallet address in the response — only the reading.


Screenshots

Numerology reading

Numerology reading: wallet-derived life-path number 8 with an AI-written oracle interpretation

Astrology reading

Astrology reading: the wallet's first onchain transaction date maps to the Capricorn zodiac sign with an AI-written oracle interpretation

Tarot reading

Tarot reading: three revealed Rider-Waite cards (past, present, future) with an AI-written oracle interpretation


Multi-chain

Payments and the astrology first-transaction lookup are both chain-aware:

Chain Chain ID USDC Explorer API
Base 8453 Native — 0x8335…2913 api.basescan.org
Soneium 1868 Bridged USDC.e — 0xbA99…C369 soneium.blockscout.com

Token decimals are read at runtime via the ERC-20 decimals() call, so prices survive any future decimal change without a redeploy. Base is the default.

Arc Mainnet — coming soon. Circle's stablecoin-native L1 will be added when USDC is deployed there.

Wallet connection depends on the runtime:

  • Base App / Warpcast (Farcaster context) — auto-connects via @farcaster/miniapp-sdk; chain is locked to Base.
  • Regular browser — RainbowKit modal (injected + WalletConnect), with a custom chain switcher that shows Base, Soneium, and the disabled Arc row. Payments prompt wallet_switchEthereumChain before signing.

Tech stack

  • Framework — Next.js 16 (App Router, Turbopack), React 19
  • Blockchain — viem 2, wagmi 3, @wagmi/core actions
  • Wallets — RainbowKit 2 (browser) + @farcaster/miniapp-sdk (Base App)
  • AIgroq-sdk (Llama on Groq)
  • Styling — Tailwind CSS 4
  • Hosting — Vercel

Architecture note

src/components/providers/MiniKitProvider.tsx is the unified wallet layer. It detects Farcaster context via sdk.actions.ready(), exposes a getWalletClient() that returns the right viem WalletClient (Farcaster SDK provider or wagmi connector) for the currently selected chain, and mirrors wagmi's chain state as the app-wide selectedChainKey. Modules never touch the raw provider — they call getWalletClient() and hand the result to lib/payment.ts::sendUSDC, which handles chain switching, decimals lookup, balance check, USDC transfer, and confirmation. Chain metadata (icon, explorer API, USDC address, symbol) lives once in CHAIN_CONFIGS in lib/constants.ts.


Setup

npm install
npm run dev

.npmrc sets legacy-peer-deps=true because RainbowKit declares wagmi ^2.9 as a peer while the app uses wagmi 3.x, whose API is compatible.

Open http://localhost:3000.

Environment variables

Copy to .env.local. Never commit this file — it's covered by .gitignore.

Variable Scope Purpose
NEXT_PUBLIC_APP_URL client Absolute origin. Dev-mode payment bypass triggers only when this contains localhost and NODE_ENV !== 'production'
NEXT_PUBLIC_TREASURY_ADDRESS client Wallet address that receives USDC payments
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID client WalletConnect Cloud project ID used by RainbowKit
BASESCAN_API_KEY server Basescan API key for the astrology first-transaction lookup on Base
GROQ_API_KEY server Groq API key for AI reading generation

Soneium's first-transaction lookup uses Blockscout's public API — no key required.

Deploy

Pushes to main auto-deploy to Vercel via the linked project. Manual: vercel deploy --prod.


Disclaimer

For entertainment purposes only. Not financial advice, not spiritual guidance, and not a promise of future events.

License

MIT — see LICENSE.

About

Onchain fortune telling mini app — numerology, astrology & tarot on Base and Soneium

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages