Blockchain-secured AI accounting platform. Handles invoice OCR, GST reconciliation, and immutable audit trails on Solana.
- Extracts invoice data (numbers, dates, line items, GST info) from images using Google Gemini
- Stores document hashes on Solana for tamper-proof verification
- Pins original documents to IPFS via Pinata
- Reconciles GST across invoices automatically
- Provides a dashboard with financial analytics
| Layer | Tools |
|---|---|
| Framework | Next.js 14 (App Router), React 19, TypeScript 5 |
| Blockchain | Solana Web3.js, Wallet Adapter (Phantom, Backpack) |
| AI/OCR | Google Gemini (vision model), custom extraction pipeline |
| Storage | IPFS/Pinata, localStorage for client state |
| Styling | Tailwind CSS 4, Radix UI, Framer Motion |
- Node.js 18+
- A Solana wallet (Phantom or Backpack)
- Google Gemini API key (get one here)
- Pinata JWT token (sign up)
git clone https://github.com/avinxshKD/Cyfuture-Ai.git
cd Cyfuture-Ai
npm install --legacy-peer-depsCreate .env.local:
NEXT_PUBLIC_GEMINI_API_KEY_1=your_gemini_key
NEXT_PUBLIC_GEMINI_API_KEY_2=optional_secondary_key
NEXT_PUBLIC_GEMINI_MODEL=gemini-flash-latest
NEXT_PUBLIC_PINATA_JWT=your_pinata_jwt
NEXT_PUBLIC_IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs
NEXT_PUBLIC_SOLANA_NETWORK=devnetnpm run devOpen http://localhost:3000.
app/ → Next.js pages (dashboard, OCR, GST, invoices, etc.)
components/ → React components (50+, organized by feature)
ui/ → Reusable primitives (button, dialog, tabs, etc.)
cyfuture/ → Platform-specific components
home/ → Landing page sections
contexts/ → Auth and storage contexts
hooks/ → useIpfs, useSolanaAction, useSpeechRecognition, etc.
lib/ → Gemini client, OCR service, utilities
Upload image → Gemini OCR → Extract invoice data → User reviews/edits
↓
┌──────────┴──────────┐
↓ ↓
IPFS (document) Solana (metadata hash)
↓ ↓
Content hash ←──── Tx signature
- User uploads an invoice image (JPG/PNG/WebP)
- Gemini vision model extracts structured data
- User reviews and corrects if needed
- Document gets pinned to IPFS, metadata hash recorded on Solana
- Both links are permanently verifiable
Gemini: Free tier gives 60 requests/min. Adding a second key enables automatic rotation to avoid rate limits.
Pinata: When creating the API key, enable pinFileToIPFS and pinJSONToIPFS scopes at minimum. See IPFS_FIX_GUIDE.md if you run into 403 errors.
npm run build
npm startFor Docker deployment, see the Dockerfile in the repo root. Note: it may need updating for the current Next.js setup — check comments inside.
- Fork the repo
- Create a branch (
git checkout -b feature/your-feature) - Commit and push
- Open a PR
Keep commits focused. Follow the existing code style. Run npm run lint before pushing.
MIT
GitHub: @avinxshKD