DONE:
A full-stack web application that gamifies financial literacy education through interactive scenarios and AI-powered financial agents.
technica_hackathon/
โโโ backend/ # Node.js/TypeScript/Express backend
โ โโโ src/
โ โ โโโ config/ # Environment configuration
โ โ โ โโโ env.ts
โ โ โโโ models/ # TypeScript interfaces
โ โ โ โโโ GameState.ts
โ โ โโโ services/ # Business logic layer
โ โ โ โโโ nessieService.ts # Capital One Nessie API integration
โ โ โ โโโ aiService.ts # AI/LLM integration
โ โ โ โโโ gameLogic.ts # Game state management
โ โ โโโ controllers/ # Route handlers
โ โ โ โโโ gameController.ts
โ โ โ โโโ agentController.ts
โ โ โโโ routes/ # API routes
โ โ โ โโโ gameRoutes.ts
โ โ โ โโโ agentRoutes.ts
โ โ โ โโโ healthRoutes.ts
โ โ โโโ index.ts # Express app entry point
โ โโโ package.json
โ โโโ tsconfig.json
โ โโโ .env.example
โ
โโโ frontend/ # React/TypeScript/Vite frontend
โโโ src/
โ โโโ api/ # Backend API clients
โ โ โโโ gameApi.ts
โ โ โโโ agentApi.ts
โ โโโ types/ # TypeScript type definitions
โ โ โโโ game.ts
โ โโโ components/ # Reusable UI components
โ โ โโโ HUDPanel.tsx
โ โ โโโ DialoguePanel.tsx
โ โ โโโ ChoicePanel.tsx
โ โ โโโ MoodSelector.tsx
โ โ โโโ SettingsPanel.tsx
โ โ โโโ MoneyPlaybookView.tsx
โ โโโ pages/ # Main application pages
โ โ โโโ GameScreen.tsx
โ โ โโโ InvestingDistrict.tsx
โ โโโ styles/ # Global styles
โ โ โโโ global.css
โ โโโ App.tsx # Main app component
โ โโโ main.tsx # Application entry point
โโโ package.json
โโโ tsconfig.json
โโโ vite.config.ts
โโโ index.html
- Node.js (v18 or higher)
- npm (comes with Node.js)
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Create environment file:
cp .env.example .env- Edit
.envfile and add your API keys:
PORT=4000
NODE_ENV=development
NESSIE_API_KEY=your_nessie_api_key_here
AI_API_KEY=your_ai_api_key_here
FRONTEND_URL=http://localhost:5173
- Start the development server:
npm run devThe backend will be running at http://localhost:4000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be running at http://localhost:5173
- GET
/api/game/state- Get current game state - POST
/api/game/choice- Submit a player choice - GET
/api/game/playbook- Get money playbook summary
- POST
/api/agent/:agentName- Get message from specific AI agent- Available agents:
mentor,spenderSam,saverSiya,crisis,futureYou,translator
- Available agents:
- POST
/api/agent/mentor/advice- Get personalized financial advice
- GET
/api/health- Server health check
- Interactive Game Screen: Main gameplay interface with event scenarios
- Financial Dashboard (HUD): Real-time display of checking, savings, investment balances, and health score
- AI Agent Dialogue: Messages from various financial personality agents
- Choice System: Multiple-choice decision making with consequences
- Mood Tracking: Player emotional state affects gameplay
- Accessibility Settings: High contrast mode and adjustable font sizes
- Investing District: Placeholder page for future investing module
- Mentor - Provides balanced financial guidance
- Spender Sam - Encourages spending and enjoyment
- Saver Siya - Promotes saving and frugality
- Crisis Alert - Warns about urgent financial situations
- Future You - Provides long-term perspective
- Translator - Explains financial jargon in simple terms
- Runtime: Node.js
- Language: TypeScript
- Framework: Express.js
- CORS: Enabled for frontend communication
- Package Manager: npm
- Library: React 18
- Language: TypeScript
- Build Tool: Vite
- Router: React Router DOM (ready to integrate)
- Styling: Inline styles (can be replaced with Tailwind CSS or styled-components)
Terminal 1 (Backend):
cd backend
npm run devTerminal 2 (Frontend):
cd frontend
npm run devBackend:
cd backend
npm run build
npm startFrontend:
cd frontend
npm run build
npm run preview-
Nessie API Integration (
nessieService.ts)- Implement actual Capital One Nessie API calls
- Handle customer creation
- Manage accounts and transactions
- Track real balances
-
AI/LLM Integration (
aiService.ts)- Connect to OpenAI, Anthropic, or other LLM provider
- Implement agent-specific prompts
- Add mood-aware response generation
- Generate personalized financial advice
-
Game Logic (
gameLogic.ts)- Implement sophisticated event generation
- Add difficulty curve
- Create more diverse scenarios
- Implement state persistence (database)
- Add multiplayer support
-
Authentication
- Add user authentication system
- Implement JWT tokens
- Create user profiles
-
Investing District
- Build investment education module
- Add stock market simulation
- Create portfolio management interface
- Implement investing challenges
-
Enhanced UI/UX
- Add animations and transitions
- Implement sound effects
- Add loading skeletons
- Improve mobile responsiveness
-
Additional Features
- Add achievement/badge system
- Implement leaderboards
- Create tutorial/onboarding flow
- Add data visualization for financial progress
- Ranges from 0-100
- Affected by financial decisions
- Reflects overall financial wellness
- Checking: Day-to-day spending money
- Savings: Emergency fund and short-term savings
- Investment: Long-term wealth building
- Anxious ๐ฐ: Affects risk tolerance
- Okay ๐: Neutral state
- Confident ๐: More willing to take calculated risks
The game teaches:
- Budgeting basics
- Emergency fund importance
- Investment fundamentals
- Risk vs. reward
- Long-term financial planning
- Understanding financial terminology
This project is structured to allow two developers to work simultaneously:
Developer 1 (Backend): Can focus on implementing API integrations, game logic, and database operations without touching frontend code.
Developer 2 (Frontend): Can work on UI/UX improvements, new components, and pages using the mock API responses already in place.
MIT License - Feel free to use this project for educational purposes.
Layout & Safe Areas
- โ
viewport-fit=coverrespected; no content obscured under Dynamic Island or home indicator - โ Status bar area (top) and home indicator area (bottom) have appropriate safe-area padding
- โ
All interactive elements respect
env(safe-area-inset-*)variables
Touch Targets
- โ All buttons and interactive elements โฅ 44pt minimum height
- โ Tap targets have 8-12px internal padding
- โ No accidental taps due to elements being too small or too close together
PWA Installation
- โ
When installed to Home Screen:
- App launches in standalone mode (no Safari UI)
apple-mobile-web-app-status-bar-styleisblack-translucent- Theme color (#0B132B) applied to status bar
- App icon displays correctly (192x192, 512x512)
- โ "Add to Home Screen" prompt shows instructions via Share button
Offline & Updates
- โ Offline app shell loads when network is unavailable
- โ Update banner appears on new deploy with "Reload" button
- โ Service worker caches static assets and API responses (GET only)
- โ
Navigation fallback to
/index.htmlworks offline
Accessibility
- โ Focus indicators are WCAG AA compliant (3px outline with accent color)
- โ Text contrast meets WCAG AA standards (4.5:1 minimum)
- โ Font sizes scale with iOS Dynamic Type settings
Layout & Touch
- โ All buttons and interactive elements โฅ 48dp minimum height
- โ Large screen width (~412-480 CSS px) handled with responsive layout
- โ
Tap targets use
clamp()for fluid scaling based on viewport
Edge Gesture Safety
- โ No interactive elements within 8px of left/right screen edges
- โ
--edge-safeCSS variable (min 8px) applied to containers - โ No accidental back swipe when tapping leftmost buttons
- โ
.container-safeclass provides 12px minimum edge padding
Performance
- โ Smooth 60fps scrolling in main panels and lists
- โ No jank during transitions or animations
- โ
touch-action: manipulationprevents double-tap zoom delay - โ
-webkit-tap-highlight-color: transparentremoves tap flash
Accessibility
- โ High-contrast mode remains legible at 480 CSS px width
- โ Large text mode (20px) flows correctly without overflow
- โ Focus indicators scale appropriately for touch input
- โ
prefers-reduced-motiondisables all animations
PWA Installation
- โ
beforeinstallpromptevent shows install banner with [Install] [Later] buttons - โ Installed app uses standalone display mode
- โ Theme color (#0B132B) applied to system UI
- โ Offline functionality works (NetworkFirst strategy for API)
Run Lighthouse PWA audit:
cd frontend
npm run lighthouse:pwaThis will:
- Build the production bundle
- Run Lighthouse PWA checks (installability, offline support, performance)
- Open results in browser
Expected Lighthouse PWA Score: โฅ 90/100
iOS (Safari + Installed PWA)
- Install app via Share โ Add to Home Screen
- Launch from Home Screen (standalone mode)
- Verify status bar color and style
- Test offline mode (airplane mode)
- Deploy new version and verify update banner appears
- Check safe-area padding around notch and home indicator
- Verify all buttons are tappable (โฅ44pt)
Android (Chrome + Installed PWA)
- Install app via Chrome's "Install" prompt
- Launch from Home Screen (standalone mode)
- Test edge gesture safety (no accidental back swipes)
- Verify offline mode works
- Check 60fps scrolling performance
- Test high-contrast mode and large text
- Verify all buttons are tappable (โฅ48dp)
| Device | OS Version | Browser | Status |
|---|---|---|---|
| iPhone 15 Pro | iOS 17+ | Safari | โ Tested |
| iPhone 15 Pro | iOS 17+ | PWA Installed | โ Tested |
| Samsung Galaxy S23 Ultra | Android 13+ | Chrome | โ Tested |
| Samsung Galaxy S23 Ultra | Android 13+ | PWA Installed | โ Tested |
| iPad Pro 11" | iPadOS 17+ | Safari | โณ Planned |
| Google Pixel 8 Pro | Android 14+ | Chrome | โณ Planned |
- iOS Safari: Service worker update prompt may not appear immediately (requires page refresh)
- Android Chrome: Install prompt dismissal persists for 7 days (localStorage)
- Low-end devices: Initial bundle load may take 1-2 seconds on 3G connections
For questions or issues, please create an issue in the repository or contact the development team.
Happy Coding! ๐ฐ๐ฎ