A Next.js web application that mimics the Wise web interface with a supercharged Insights tab, featuring cashflow prediction, spending analysis, savings projections, achievements, and AI-powered insights.
- Node.js 18+
- npm or yarn
# Install dependencies
npm install
# Set up database (creates SQLite DB and seeds with mock data)
npx prisma migrate dev
npx prisma db seed
# Start development server
npm run devOpen http://localhost:3000 in your browser.
# Build for production
npm run build
# Start production server
npm start-
Wise-like UI/UX
- Sidebar navigation matching Wise design
- Header with user profile and actions
- Responsive layout with Tailwind CSS
- Wise brand colors and styling
-
Financial Dashboard (
/)- Total balance overview
- Account cards (Stocks, Cash, Interest)
- Recent transactions summary
- Quick actions (Send, Add money, Request)
-
Insights Dashboard (
/insights)- Wealth & Cashflow: Historical cashflow chart with 12-month forecast
- Savings Jars: Interactive jar cards with scenario projections (+20%, Pause)
- Spending Analysis: Category pie chart and weekday bar chart
- AI Insights: Persona detection with personalized tips
- Achievements: Progress tracking with unlockable card skins
GET /api/insights- Aggregated financial data and analyticsGET /api/achievements- Achievement progress and card skinsPOST /api/ai-insights- AI-generated personalized insights
Complete Prisma schema with:
- User, Account, Transaction, Jar
- Achievement, CardSkin, UnlockedAchievement
- β Database migrations and seeding
- β All API endpoints returning correct data
- β Frontend pages rendering without errors
- β Charts displaying with Recharts
- β Interactive jar scenario buttons
- β Achievement progress calculation
- β Persona detection algorithm
- β Responsive design
- β ESLint passing (no errors)
- Home page:
GET /β 200 OK - Insights page:
GET /insightsβ 200 OK - Insights API:
GET /api/insightsβ Returns β¬9,641.06 total wealth - Achievements API:
GET /api/achievementsβ Returns 6 achievements, 4 card skins - AI Insights API:
POST /api/ai-insightsβ Returns personalized tips
- 1 User: Eduard Baranovskyi (Germany, EUR)
- 2 Accounts: Main EUR (β¬1,902.44), Stocks (β¬2,038.62)
- 3 Jars: Vacation Fund, Emergency Fund, New Laptop
- 587 Transactions: 12 months of realistic spending patterns
- Monthly salary deposits (β¬3,200-β¬3,800)
- Groceries, Restaurants, Coffee, Shopping, Transport, etc.
- Weekend-biased spending for social categories
- 6 Achievements: Coffee Lover, Grocery Master, Frequent Flyer, Subscription Pro, Foodie, Super Saver
- 4 Card Skins: Coffee Edition, Traveler Edition, Foodie Edition, Saver Edition
- 2 Pre-unlocked Achievements: Coffee Lover, Foodie
- Categories: Groceries (33%), Transport (15%), Shopping (15%), Restaurants (11%), etc.
- Time Range: Last 12 months (Nov 2024 - Nov 2025)
- Weekend Bias: Restaurants, Coffee, Entertainment transactions favor weekends
- Currency: EUR (hardcoded throughout)
- Database: SQLite (
file:./dev.db) - User: Single user system (assumes first user in DB)
- Time Periods:
- Spending analysis: Last 90 days
- Cashflow forecast: 12 months
- Wealth prediction: 12 months
- Persona Thresholds:
- Social Spender: >30% social categories + >40% weekend spending
- Shopaholic: >35% shopping
- Explorer: >25% travel/transport
- Home Chef: >30% groceries
- Achievement Thresholds: Fixed in seed data (e.g., 50 coffees, 100 groceries)
- Jar Scenarios: +20% boost, Pause (client-side calculation)
- Mock Implementation: Returns predefined tips based on persona
- No Real LLM: Currently uses rule-based persona matching
- Fallback: Static text if API fails
- Wise Colors:
- Green:
#9fe870,#00b64f - Navy:
#163300 - Background:
#f9fafb
- Green:
- Fonts: System UI stack (no custom fonts)
- Total Wealth: β¬9,641.06
- Average Monthly Net: β¬1,553.83
- Projected Wealth (12mo): β¬28,287
- Spending Categories: 9 categories tracked
- Unlocked Achievements: 3/6 (Coffee Lover, Foodie, Subscription Pro)
- Unlocked Card Skins: 2/4 (Coffee Edition, Foodie Edition)
-
Real AI Integration
- Replace mock AI insights with OpenAI/Anthropic API
- Add environment variable for API keys
- Implement proper error handling and rate limiting
-
Multi-User Support
- Add authentication (NextAuth.js or Clerk)
- User-specific data filtering
- Session management
-
Data Refresh
- Real-time transaction sync (if connecting to Wise API)
- Manual refresh button
- Auto-refresh intervals
-
Enhanced Analytics
- Time range filters (30/90/365 days)
- Category drill-down
- Export to CSV/PDF
- Comparison periods (month-over-month)
-
Jar Management
- Create/edit/delete jars
- Manual contribution tracking
- Goal adjustments
-
Achievement System
- Real-time unlock notifications
- Achievement history
- Share achievements
-
Performance
- Add caching for API responses
- Optimize database queries
- Implement pagination for transactions
-
Testing
- Unit tests for analytics functions
- Integration tests for API routes
- E2E tests with Playwright
-
Production Readiness
- Environment variable validation
- Error logging (Sentry)
- Analytics tracking
- SEO optimization
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLint
npm run db:migrate # Run database migrations
npm run db:seed # Seed database with mock data
npm run db:reset # Reset database (WARNING: deletes all data)wise-app/
βββ prisma/
β βββ schema.prisma # Database schema
β βββ seed.ts # Seed script
β βββ migrations/ # Database migrations
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API routes
β β βββ insights/ # Insights page
β β βββ page.tsx # Home page
β βββ components/ # React components
β βββ lib/ # Utilities & business logic
β βββ types/ # TypeScript types
βββ public/ # Static assets
Create .env file:
DATABASE_URL="file:./dev.db"
# Add when implementing real AI:
# OPENAI_API_KEY="your-key-here"# View database in Prisma Studio
npx prisma studio
# Reset and reseed
npm run db:reset
npx prisma db seedReturns aggregated financial insights.
Response:
{
"totalWealth": 9641.06,
"avgMonthlyNet": 1553.83,
"projectedWealth12Mo": 28287,
"cashflow": [...],
"jars": [...],
"spendingCategories": [...],
"spendingWeekdays": [...],
"persona": { "label": "Home Chef", "description": "..." }
}Returns achievements and card skins with unlock status.
Response:
{
"achievements": [...],
"cardSkins": [...]
}Generates personalized insights (currently mocked).
Request:
{
"persona": "Home Chef",
"stats": { ... }
}Response:
{
"bullets": [
"Your grocery spending is 15% below average...",
"Consider buying seasonal produce...",
"Your cooking habit saves you approximately..."
]
}- Single User: Assumes first user in database
- Mock AI: No real LLM integration
- No Auth: No user authentication
- Static Data: No real-time updates
- EUR Only: Currency hardcoded to EUR
- No Error Boundaries: Basic error handling
This is a hackathon project for demonstration purposes.
Built for Wise Hackathon 2025 - Insights Tab Track.