Turn budgeting into epic battles. Compete with friends, master your spending, and climb the leaderboard with AI-powered insights.
RoomieLoot is a gamified financial management platform that transforms personal finance into an engaging, competitive experience. Connect your bank accounts, track your financial health, compete with friends on leaderboards, and receive AI-powered financial advice to level up your money management skills.
RoomieLoot combines real financial data integration with gaming mechanics to make budgeting fun and motivating. The platform integrates with Plaid's API to fetch your actual bank account and transaction data, calculates your financial wellness score, and creates competitive leaderboards where you can challenge friends to improve their financial habits.
- ๐ฆ Real Financial Data: Connect your bank accounts via Plaid API for live transaction and balance data
- ๐ Financial Wellness Scoring: AI-powered scoring system that evaluates your financial health (0-100)
- ๐ Competitive Leaderboards: Compete with friends on financial efficiency and savings goals
- ๐ค AI Financial Advisor: Personalized financial recommendations and advice
- ๐ฎ Gamification Elements: Achievements, badges, and progress tracking
- ๐ฑ Modern Dashboard: Beautiful, responsive interface with real-time financial insights
- ๐ Secure Authentication: Safe user accounts with encrypted financial data
- Next.js 15.5.4 - React framework with App Router
- React 19.1.0 - UI library
- TypeScript 5.9.2 - Type safety
- Tailwind CSS 4 - Styling framework
- Biome - Linting and formatting
- Next.js API Routes - Server-side API endpoints
- Flask - Python web framework for financial services
- Prisma 6.16.2 - Database ORM
- PostgreSQL - Primary database
- MongoDB - Additional data storage
- bcryptjs - Password hashing
- Plaid API - Bank account and transaction data
- Python 3.8+ - Core financial processing language
- Flask - Python web services and API endpoints
- Plaid Python SDK - Official Plaid integration
- Custom AI Agent - Financial advice generation and scoring
- Financial Data Processing - Transaction analysis and categorization
- Custom Session Management - User authentication
- bcryptjs - Secure password hashing
RoomieLoot/
โโโ app/ # Next.js App Router
โ โโโ api/ # API routes
โ โ โโโ auth/ # Authentication endpoints
โ โ โ โโโ register/ # User registration
โ โ โ โโโ signin/ # User login
โ โ โ โโโ session/ # Session management
โ โ โโโ rooms/ # Room/group management
โ โ โ โโโ create/ # Create new groups
โ โ โ โโโ join/ # Join existing groups
โ โ โ โโโ wishlist/ # Group wishlist (optional feature)
โ โ โโโ users/ # User data endpoints
โ โ โโโ [userId]/
โ โ โโโ financial-data/ # Financial data retrieval
โ โโโ components/ # React components
โ โ โโโ FinancialAdvisor.tsx # AI financial advice
โ โ โโโ RoomWishlistAndSpectrum.tsx # Group features
โ โ โโโ Wishlist.tsx # Wishlist management
โ โ โโโ ContributionSpectrum.tsx # Group contribution tracking
โ โโโ dashboard/ # Personal financial dashboard
โ โโโ room/[roomId]/ # Group/room pages with leaderboards
โ โโโ rooms/ # Group selection
โ โโโ page.tsx # Landing page
โโโ api/ # Python Flask API & financial integration
โ โโโ plaid_client.py # Plaid API client
โ โโโ get_my_data.py # Data fetching script
โ โโโ generate_user_financial_data.py # Data generation
โ โโโ app.py # Flask web application
โ โโโ routes/ # Flask API routes
โ โโโ models/ # Python data models
โ โโโ services/ # Business logic services
โ โโโ requirements.txt # Python dependencies
โโโ agent/ # AI financial advisor
โ โโโ main.py # Main agent logic
โ โโโ calculate_score.py # Financial wellness scoring
โ โโโ tools.py # Agent tools
โโโ prisma/ # Database schema
โ โโโ schema.prisma # Prisma schema definition
โโโ public/ # Static assets
- Node.js 18+ and npm
- Python 3.8+
- PostgreSQL database
- MongoDB (optional, for additional storage)
- Plaid Account (for financial data integration)
-
Clone the repository
git clone <repository-url> cd RoomieLoot/VTHacks
-
Install Node.js dependencies
npm install
-
Install Python dependencies
cd api pip install -r requirements.txt cd ..
-
Set up Python virtual environment (recommended)
cd api python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt cd ..
-
Set up environment variables
Create a
.env.localfile in the root directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/roomieloot" # Plaid API (get from https://dashboard.plaid.com/) PLAID_CLIENT_ID=your_client_id_here PLAID_SECRET=your_secret_here PLAID_ENV=sandbox # Session secret SESSION_SECRET=your_session_secret_here
-
Set up the database
npx prisma generate npx prisma db push
-
Start the Flask API server
cd api python app.py # or flask run
-
Run the Next.js development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
Register a new user account with automatic financial data generation.
Request Body:
{
"username": "string",
"password": "string"
}Response:
{
"message": "Account created successfully",
"userId": "string",
"financialDataGenerated": true
}Sign in to an existing account.
Request Body:
{
"username": "string",
"password": "string"
}Create a new group for financial competition.
Request Body:
{
"roomName": "string"
}Join an existing group.
Request Body:
{
"roomId": "string"
}Get user's financial data including accounts, transactions, and holdings.
Response:
{
"accounts": [...],
"transactions": [...],
"holdings": [...],
"metadata": {...}
}The Flask API provides core financial data processing and AI services:
Analyze user financial data and generate insights.
Request Body:
{
"userId": "string",
"financialData": {...}
}Response:
{
"score": 85,
"recommendations": [...],
"insights": {...}
}Generate financial data for new users using Plaid sandbox.
Request Body:
{
"userId": "string"
}Get current financial wellness score for a user.
Response:
{
"score": 85,
"breakdown": {
"balance": 20,
"investments": 15,
"credit": 10,
"spending": 8,
"diversity": 7,
"base": 30
}
}- Purpose: Handles all Plaid API interactions
- Methods:
create_sandbox_item()- Create test financial dataget_accounts()- Fetch account informationget_transactions()- Retrieve transaction historyget_investments()- Get investment holdingsget_securities()- Fetch security information
- Transaction Categorization: Automatic categorization of expenses
- Balance Analysis: Real-time account balance monitoring
- Investment Tracking: Portfolio analysis and performance metrics
- Data Transformation: Convert raw Plaid data to application format
- Scoring Algorithm: Comprehensive financial wellness calculation
- Recommendation Engine: Personalized financial advice generation
- Data Analysis: Pattern recognition in spending and saving habits
- Comprehensive Scoring: 0-100 financial wellness score based on multiple factors
- Balance Analysis: Rewards healthy account balances and emergency funds
- Investment Tracking: Scores based on investment portfolio diversity and value
- Credit Utilization: Monitors credit card usage and debt management
- Spending Patterns: Analyzes cash flow and spending habits
- Account Diversity: Rewards having multiple account types
- Real-time Rankings: Live leaderboard updates based on financial scores
- Efficiency Metrics: Tracks financial efficiency percentages
- Group Competitions: Compete with friends in private groups
- Achievement System: Unlock badges for financial milestones
- Progress Tracking: Visual progress indicators and trend analysis
- Personalized Recommendations: AI-generated advice based on your financial data
- Category-Based Tips: Advice across saving, budgeting, investment, and debt
- Priority System: High, medium, and low priority recommendations
- Interactive Chat: Chat interface for financial questions
- Smart Insights: Automated analysis of spending patterns and opportunities
- Plaid API Integration: Connect real bank accounts securely
- Transaction Categorization: Automatic categorization of expenses
- Balance Monitoring: Real-time account balance tracking
- Investment Holdings: Track investment portfolios and performance
- Data Security: Encrypted storage and secure API connections
- Financial Score: Personal financial wellness score (0-100)
- Achievement Badges: Unlock badges for financial milestones
- Progress Bars: Visual progress tracking for financial goals
- Streak Tracking: Maintain financial habits with streak counters
- Level System: Level up based on financial improvements
- Group Creation: Create private groups for friends
- Shared Wishlists: Collaborative wishlist for group purchases
- Group Statistics: Aggregate financial statistics for groups
- Social Features: Share achievements and compete with friends
The project includes a sophisticated Python-based AI agent that provides personalized financial advice:
- Balance Analysis: Evaluates account balances and emergency fund adequacy
- Investment Assessment: Analyzes investment portfolio diversity and performance
- Debt Management: Monitors credit utilization and debt-to-income ratios
- Spending Analysis: Tracks cash flow patterns and spending habits
- Account Diversity: Rewards having multiple account types for financial stability
- Personalized Advice: Generates 3 key recommendations per user
- Category-Based Tips: Covers saving, budgeting, investment, and debt management
- Priority Scoring: Ranks recommendations by importance and impact
- Contextual Insights: Provides advice based on current financial situation
cd agent
python main.pynpm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run Biome linternpm run format- Format code with Biome
# Start Flask API server
cd api
python app.py
# Run financial data generation
python get_my_data.py
# Run AI financial agent
cd ../agent
python main.pyThe project uses several Python packages for financial processing:
# Core dependencies
plaid-python>=11.0.0 # Plaid API integration
python-dotenv>=1.0.0 # Environment variable management
requests>=2.31.0 # HTTP requests
# Additional packages (if Flask is used)
flask>=2.0.0 # Web framework
flask-cors>=3.0.0 # CORS handling# Create virtual environment
python -m venv venv
# Activate (Linux/Mac)
source venv/bin/activate
# Activate (Windows)
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtnpx prisma generate- Generate Prisma clientnpx prisma db push- Push schema changes to databasenpx prisma studio- Open Prisma Studio
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Build the application:
npm run build - Start the production server:
npm run start - Ensure database is accessible from production environment
id: Unique user identifierusername: Unique usernamepassword: Hashed passwordcreatedAt: Account creation timestampupdatedAt: Last update timestamp
id: Unique financial data identifieruserId: Reference to userplaidItemId: Plaid item identifierplaidAccessToken: Encrypted access tokenaccountsData: JSON bank account datatransactionsData: JSON transaction dataholdingsData: JSON investment datalastUpdated: Last sync timestamp
-
Account Balance (0-20 points)
- Emergency fund adequacy
- Liquid account balances
- Savings account health
-
Investment Portfolio (0-20 points)
- Investment value relative to income
- Portfolio diversity
- Long-term wealth building
-
Credit Utilization (0-10 points)
- Credit card usage percentage
- Debt management
- Credit health indicators
-
Spending Habits (0-10 points)
- Cash flow analysis
- Expense categorization
- Budget adherence
-
Account Diversity (0-10 points)
- Multiple account types
- Financial product utilization
- Banking relationship strength
-
Base Score (30 points)
- Starting score for all users
- Ensures minimum baseline
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Contact the development team
- Check the documentation in the
/api/README.mdfor Plaid integration details
- Real-time financial notifications
- Mobile app development
- Advanced analytics dashboard
- Integration with more financial institutions
- Enhanced AI recommendations with machine learning
- Social challenges and competitions
- Automated budget goal tracking
- Investment portfolio optimization
- Credit score monitoring
- Bill payment reminders and automation
Built with โค๏ธ for VTHacks - Making Finance Fun!