A smart credit card recommendation tool that helps you find the best card for your spending habits. Compare benefits, rewards, and cashback across cards from multiple banks — powered by AI ranking.
🔗 Live: rajat19.github.io/card-assist
- Frontend — React, TypeScript, Vite, Tailwind CSS, shadcn/ui
- Backend — Firebase Firestore, Cloud Functions
- AI — Gemini API for intelligent card ranking
- CI/CD — GitHub Actions → GitHub Pages
Prerequisites: Node.js & npm (install via nvm)
git clone https://github.com/rajat19/card-assist.git
cd card-assist
npm install
npm run dev- Create a Firebase project with Firestore and Cloud Functions enabled.
- Copy
.env.exampleto.envand fill in your Firebase config:VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_ID- Optional:
VITE_FIREBASE_FUNCTIONS_REGION(defaultus-central1)
- For AI ranking, set a Cloud Functions secret:
cd functions && npm i firebase functions:secrets:set GEMINI_API_KEY npm run deploy
Collection: cards
name: string
bankName: string
cardType: 'premium' | 'regular' | 'entry'
annualFee: number
description?: string | null
benefits: Array<{
category: string
type: 'cashback' | 'reward_points'
value: number
description?: string | null
conditions?: string | null
}>
createdAt: serverTimestamp
The client calls the aiSuggestCards Cloud Function with the user's query and loaded cards. If Gemini is unavailable, a heuristic fallback ranks cards by max matching benefit value.
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Production build |
npm run scrape:cards |
Scrape card data from configured sources |
npm run add:card |
Add a new card by URL |
npm run seed:cards |
Seed cards to Firestore |
Pushes to main trigger an automatic build & deploy to GitHub Pages via GitHub Actions.