Individuals and small investors face difficulty in tracking and analyzing their financial data due to unorganized transaction history, information overload, and lack of personalized insights
FinNuvora is a full-stack personal finance management platform designed for sophisticated investors and wealth managers. It combines portfolio tracking, transaction management, AI-powered insights, and PDF document processing into a unified dashboard. The application targets users who manage multiple asset classes and need intelligent analysis of their financial positions.
Frontend:
- Next.js 16.0+ (App Router)
- React 19.2.0
- Tailwind CSS 3.4.1
- Axios with interceptors
- Inter & Fira Code fonts (modern, professional typography)
Backend:
- Express.js 5.1.0
- Node.js with Nodemon (development)
- Mongoose 8.19.3 (MongoDB ODM)
- Bcryptjs 3.0.3 (password hashing)
- JWT 9.0.2 (authentication)
- express-rate-limit 8.2.1 (email-based rate limiting)
- @google/generative-ai (Gemini 2.0 Flash for AI insights)
- express-fileupload (PDF processing)
- pdf-parse 1.1.4 (PDF extraction)
- Axios (external API calls)
Database:
- MongoDB Atlas (cloud) - All financial data & authentication
Deployment:
- Frontend: Vercel (auto-deploys from GitHub)
- Backend: Render (Node.js with environment variables)
- Database: MongoDB Atlas (free tier, 512MB)
Core MongoDB Collections (Mongoose Models)
-
User
name: String (required, trimmed)email: String (required, unique, lowercase)password: String (bcrypt hashed)timestamps: Auto-created/updated
-
Portfolio
- User reference
name: Stringdescription: Stringvisibility: Public/PrivateholdingIds: Array of references to Holdings- Aggregated metrics (total value, returns, etc.)
-
Holding
- Portfolio reference
symbol: Stock ticker (e.g., AAPL)quantity: NumberaverageCost: NumbercurrentPrice: Numbersector: Stringcurrency: String- Timestamps
-
PriceHistory
- Holding reference
date: Dateprice: Numbervolume: Number- Historical data for charting
-
Transaction
- User reference
type: "income" | "expense" | "investment"amount: Numbercategory: Category referencedate: Datedescription: String- PDF metadata if uploaded
-
Category
- User reference
name: String (e.g., "Utilities", "Stocks", "Dividends")type: "income" | "expense" | "investment"color: Hex color for UI
-
UserPreferences
- User reference
theme: "dark" | "light"currency: String (default USD)notifications: Boolean flagsprivacySettings: Object
-
Goal (Future feature)
- User reference
targetAmount: NumbercurrentAmount: Numberdeadline: Datepriority: Stringcategory: String
POST /register- User registration with password strength validationPOST /login- JWT token generation with 7-day expiration- Rate limited: 5 attempts per 15 minutes (email-based)
GET /- List with pagination, filtering, sortingPOST /- Create transactionPUT /:id- Update transactionDELETE /:id- Delete transactionPOST /upload- Upload PDF and extract transactions
GET /- List user portfoliosPOST /- Create portfolioPUT /:id- Update portfolioDELETE /:id- Delete portfolioGET /:id/summary- Portfolio performance metrics
GET /- List holdings with current pricesPOST /- Add holding to portfolioPUT /:id- Update holdingDELETE /:id- Remove holding- Real-time price data from Alpha Vantage API
GET /- List user categoriesPOST /- Create categoryPUT /:id- Update categoryDELETE /:id- Delete category
GET /summary- Financial summary (Gemini AI powered)GET /recommendations- AI investment recommendationsGET /spending-analysis- Transaction analysis- Leverages Google Gemini 2.0 Flash for intelligent insights
GET /- Historical price dataGET /chart/:holdingId- Chart-ready data
GET /- User preferencesPUT /- Update preferences
GET /search- Search stocks by symbol/nameGET /:symbol- Get stock details (Alpha Vantage)
GET /profile- User profile dataPUT /profile- Update profileGET /dashboard-stats- Dashboard metrics
Public Pages:
/- Landing page with Navbar & Footer/auth/login- Login form with email/password/auth/register- Registration with password strength requirements
Protected Pages (require JWT):
/dashboard- Main dashboard with layout sidebar/dashboard/portfolio- Portfolio management/dashboard/transactions- Transaction list with filters/dashboard/holdings- Holdings tracker/dashboard/insights- AI-powered insights/dashboard/goals- Financial goals
Reusable Components:
Navbar.jsx- Navigation with auth state detectionFooter.jsx- 3-column centered footer (Product, Legal, Status)- Layout components with Tailwind styling
- Dark theme with slate/blue color palette
- React hooks (
useState,useEffect,useCallback) - Custom hooks:
useProtectedRoute()for auth guard - Axios interceptors for JWT attachment and 401 handling
- Cookie-based token storage (httpOnly in production)
- Axios instance with baseURL from
NEXT_PUBLIC_API_URL - Request interceptor adds JWT token
- Response interceptor handles 401 errors (redirects to login)
- Organized API calls:
authAPI,transactionAPI,portfolioAPI, etc.
- Password hashing: bcryptjs (10 salt rounds)
- JWT tokens: 7-day expiration
- Secure cookies: HttpOnly, Secure, SameSite=strict (production)
- Rate limiting: Email-based (5 login/register attempts per 15 min)
- User ownership validation on all resources
- Email format validation (RFC 5322)
- Password strength: 8+ chars, uppercase, lowercase, number, special char
- Name format validation (alphanumeric + spaces)
- ObjectId validation for MongoDB queries
X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=blockHSTS: max-age=31536000
- Sanitized error responses (no stack traces in production)
- Consistent error format:
{ success: false, error: "message" } - Input sanitization on all endpoints
- Multiple portfolios per user
- Track holdings across stocks, bonds, crypto, etc.
- Real-time price updates via Alpha Vantage API
- Portfolio performance metrics (returns, allocation, etc.)
- Three transaction types: Income, Expense, Investment
- Category-based organization
- Date-based filtering and sorting
- PDF Upload & Processing: Extract transactions from bank PDFs automatically
- Pagination support (10 items per page)
- Financial summary analysis
- Investment recommendations
- Spending pattern analysis
- Context-aware insights using user's actual data
- Historical price data storage
- Chart-ready time-series data
- Real-time stock quotes (Alpha Vantage API)
- Automatic price update scheduling (background job ready)
- Currency preference
- Notification settings
- Privacy controls
- Used for AI insights and analysis
- Processes financial summaries and recommendations
- Requires:
GOOGLE_API_KEYenv variable
- Stock price data and quotes
- Historical price series
- Free tier: 5 requests/min, 500/day
- Requires:
ALPHA_VANTAGE_API_KEYenv variable
Local Environment:
- MongoDB:
mongodb://localhost:27017/FinNuvora - Backend:
http://localhost:4000 - Frontend:
http://localhost:3000
Frontend (Vercel):
- Auto-deploys on GitHub push
- Environment:
NEXT_PUBLIC_API_URL=https://finnuvora.onrender.com - Build:
npm run build->.nextoutput
Backend (Render):
- Procfile:
web: cd backend && npm install && npm start - Environment variables:
MONGODB_URI(Atlas connection)JWT_SECRET(32-char hex string)GEMINI_API_KEYALPHA_VANTAGE_API_KEYFRONTEND_URL(for CORS)NODE_ENV=production
Color Palette:
- Background:
#05060F(dark navy) - Surface:
#0E1324(slightly lighter) - Primary:
#4C6EF5(blue) - Accent:
#22D3EE(cyan) - Highlight:
#8B5CF6(purple) - Success:
#4ADE80(green)
Typography:
- Sans: Inter (modern, clean, professional)
- Mono: Fira Code (technical text)
- Dark theme optimized
Layout:
- Dashboard sidebar + main content
- Card-based components with glass morphism effects
- Responsive grid layouts
- Mobile-friendly design
- No real-time price updates (scheduled jobs needed)
- Limited AI context window for Gemini
- WebSocket for real-time price updates
- Advanced portfolio rebalancing recommendations
- Tax loss harvesting calculator
- Multi-currency support with conversions
- Collaborative portfolios (shared with advisors)
- Mobile native app
- Advanced charting (TradingView integration)
- Options trading support
- MongoDB-Only Architecture: Project uses ONLY MongoDB for all data (user auth + financial data).
- Rate Limiting: Email-based (not IP-based) to avoid IPv6 validation errors.
- Environment Variables: Must be set in deployment platforms (Vercel & Render) - never hardcoded.
- JWT Flow: 7-day expiration, stored in cookies, validated on protected routes.
- API Structure: RESTful with consistent error handling and response format.
- Security First: All inputs validated, passwords hashed, tokens secured.
- Deployment Pipeline: GitHub -> Vercel (frontend) + Render (backend)