Live Demo: https://fj-be-r2-varun-damani-vit-vellore-1.onrender.com
FinanceTracker is a high-performance, full-stack Financial Dashboard designed to provide users with deep insights into their household economy. By combining PostgreSQL data persistence with Google Gemini AI, the platform transforms raw transactions into actionable financial wisdom.
- AI Insights Advisor: Leverages Google Gemini AI to analyze spending habits and provide personalized budget optimization feedback.
- Dynamic Visual Analytics: Real-time 7-day cash flow trends and categorical expense distribution powered by Chart.js.
- Visual Ledger: Highly scannable transaction history featuring Emerald Green (+) for income and Rose Red (-) for expenses.
- CSV Bank Import: Automated transaction import from bank statements with smart categorization.
- Multi-Currency Engine: Global readiness with real-time switching between INR (₹), USD ($), and EUR (€).
- Advanced Data Filtering: Instant search and multi-parameter filtering (type, category, date) with a dedicated Reset Filter UI.
- 🔒 Enhanced Security: Rate limiting, input validation, secure authentication, and comprehensive logging.
- 🧪 Testing Suite: Comprehensive test coverage with Jest and automated testing workflows.
- 📊 Structured Logging: Winston-based logging system for monitoring and debugging.
1. Real-time Cash Flow Analytics
2. Gemini AI Insights & Transaction Entry
3. Expense Distribution & Budget Tracking
.4 Custom Category Management & Financial Goal Tracking
5. Searchable Transaction History
| Layer | Technology Used |
|---|---|
| Deployment | Render (Live Production) |
| Frontend | Tailwind CSS, JavaScript (ES6+), Chart.js |
| Backend | Node.js, Express.js |
| Database | PostgreSQL (Hosted on Neon.tech) |
| ORM | Sequelize |
| AI Integration | Google Gemini 2.5 Flash API |
| Authentication | JWT (JSON Web Tokens) & Google OAuth 2.0 |
| Security | Rate Limiting, Input Validation, CORS |
| Testing | Jest, Supertest |
| Logging | Winston |
This project strictly adheres to the Model-View-Controller (MVC) design pattern to ensure scalability and separation of concerns.
- Models: Managed via Sequelize for schema-based data integrity.
- Controllers: Decoupled business logic handling Authentication, Transactions, AI Analysis, and File Uploads.
- Security: Production-ready environment variable protection via
.gitignoreto secure sensitive API keys. - Middleware: Centralized validation, rate limiting, and error handling.
- Testing: Comprehensive test suite with automated coverage reporting.
-
Clone the repository:
git clone https://github.com/Varun2045/FJ-BE-R2-Varun-Damani-VIT-Vellore.git cd FJ-BE-R2-Varun-Damani-VIT-Vellore -
Install dependencies:
npm install
-
Configure Environment Variables: Copy the example environment file and configure:
cp .env.example .env
Edit
.envfile and add your configuration:PORT=3000 DATABASE_URL=your_neon_postgresql_url JWT_SECRET=your_super_secret_jwt_key_here_at_least_32_characters_long GEMINI_API_KEY=your_google_ai_key GOOGLE_CLIENT_ID=your_google_id GOOGLE_CLIENT_SECRET=your_google_secret BASE_URL=http://localhost:3000
-
Launch the Server:
npm run dev
- Local access: Open
http://localhost:3000to view the dashboard. - Production access: https://fj-be-r2-varun-damani-vit-vellore-1.onrender.com
- Local access: Open
Run the test suite:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage report
npm run test:coverage# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run formatPOST /api/auth/register- User registration with validationPOST /api/auth/login- User login with rate limitingGET /api/auth/google- Initiate Google OAuthGET /api/auth/google/callback- Google OAuth callback
GET /api/transactions- Get user transactionsPOST /api/transactions- Create new transactionPUT /api/transactions/:id- Update transactionDELETE /api/transactions/:id- Delete transaction
POST /api/bank/import/upload- Import transactions from CSV bank statement
- Rate Limiting: Auth endpoints (5/15min), AI endpoints (20/hour)
- Input Validation: Comprehensive validation using express-validator
- CORS Protection: Environment-based CORS configuration
- Structured Logging: Winston-based logging with security event tracking
Distributed under the MIT License.