๐ Empowering Student Spending. Shaping Financial Futures.
HapoPay is a comprehensive parent-child money management platform that enables safe student spending through QR payments, real-time parental controls, and gamified financial education. Built with modern web technologies and powered by Supabase for real-time data management.
โ Completed Integration
- Database Schema: Comprehensive schema with 10+ tables for users, children, transactions, rewards, and safety systems
- Authentication: Supabase Auth with role-based access control (parent/student)
- Real-time Features: Live transaction monitoring and balance updates
- File Storage: Avatar and document upload capabilities
- Row Level Security: Proper RLS policies for data protection
- Helper Functions: Comprehensive API wrapper functions
- Payment System: QR code payment processing with instant notifications
- Reward System: Gamified spending with points, levels, and achievements
- Parents: Seeking safe digital spending solutions for their children
- Students: Learning financial responsibility through controlled spending
- Families: Building healthy financial habits together
- Educational Institutions: Supporting financial literacy programs
- Parent Dashboard: Complete family financial overview with real-time monitoring
- Student Dashboard: Age-appropriate spending interface with balance tracking
- QR Payment System: Secure contactless payments at participating merchants
- Smart Spending Limits: Automatic category restrictions and weekly allowances
- Emergency Funds: Instant money transfers for urgent situations
- Transaction History: Detailed spending analytics and reporting
- Multi-Child Support: Manage multiple children from single parent account
- Individual Profiles: Customized settings and limits per child
- Real-time Notifications: Instant alerts for all transactions
- Safety Controls: Location-based spending restrictions and merchant filtering
- Money Requests: Children can request funds with parental approval system
- Reward Points System: Earn points for responsible spending and saving
- Achievement Badges: Unlock rewards for financial milestones
- Spending Challenges: Weekly goals to encourage smart financial decisions
- Educational Content: Age-appropriate financial literacy resources
- Progress Tracking: Visual representation of financial growth
- Parental Controls: Comprehensive oversight of all spending activities
- Merchant Restrictions: Block specific store categories or locations
- Spending Alerts: Customizable notifications for various transaction types
- Emergency Features: Quick access to emergency funds and contacts
- Data Protection: Bank-level security with encrypted transactions
- Node.js (version 16 or higher)
- Supabase account and project
- Modern web browser
- Clone the repository:
git clone <repository-url>
cd hapopay- Install Extentions:
Go to Extensions (Ctrl+Shift+X)
Search for Live Server by Ritwick Dey
Click Install
-
Configure Supabase:
- Create a project at supabase.com
- Copy your project URL and anon key from Project Settings โ API
- Update
config.jswith your Supabase credentials
-
Run database migrations:
- Execute all SQL files in order:
database_setup.sql- Core tables and relationshipschildren_table_setup.sql- Child profile managementrewards_system_setup.sql- Gamification featuresgames_system_setup.sql- Achievement systemsafety_system_setup.sql- Security controlsmoney_requests_setup.sql- Fund request systememergency_requests_setup.sql- Emergency featuresrecurring_payments_setup.sql- Automated allowances
- Execute all SQL files in order:
-
Start the application:
Use Live Server (VS Code)
Use browser dev tools or VS Code debugger- Open your browser:
Navigate to the served local URL (typically
http://localhost:3000)
- Frontend: Vanilla HTML5, CSS3, JavaScript (ES6+)
- Backend: Supabase (PostgreSQL database, Authentication, Storage)
- Styling: Custom CSS with responsive design
- Icons: Font Awesome 6.0
- PDF Generation: jsPDF for transaction reports
- Real-time: Supabase real-time subscriptions
- Security: Row Level Security (RLS) policies
HapoPay is designed with a mobile-first approach featuring:
- Responsive layouts that adapt from mobile to desktop
- Touch-friendly interface optimized for smartphones
- QR code scanning capabilities
- Offline transaction queuing
- Progressive Web App (PWA) features
- Fast loading times on low-bandwidth connections
- Sign Up: Create parent account with email verification
- Profile Setup: Complete family information and preferences
- Add Children: Register child profiles with spending limits
- Initial Funding: Add money to family account
- Configure Settings: Set up safety controls and notifications
- Login: Secure student authentication
- View Balance: Check available spending money
- QR Payment: Scan merchant QR code to pay
- Transaction Confirmation: Receive instant payment confirmation
- Earn Rewards: Collect points for responsible spending
- Send Money: Parents transfer funds to children instantly
- Request Funds: Students request money with reason
- Emergency Access: Quick emergency fund disbursement
- Recurring Allowances: Automated weekly/monthly payments
- Spending Analytics: Track and analyze spending patterns
hapopay/
โโโ src/
โ โโโ lib/
โ โ โโโ Images/ # Application assets and logos
โ โ โโโ supabaseClient.mjs # Supabase client configuration
โ โโโ scripts/
โ โโโ test-supabase.mjs # Database connection testing
โโโ *.html # Main application pages
โ โโโ index.html # Landing page
โ โโโ signup.html # Parent registration
โ โโโ parentLogin.html # Parent authentication
โ โโโ studentLogin.html # Student authentication
โ โโโ parentDashboard.html # Parent control panel
โ โโโ studentDashboard.html # Student interface
โ โโโ verify.html # Email verification
โโโ *.sql # Database schema and migrations
โโโ style.css # Application styling
โโโ script.js # Core JavaScript functionality
โโโ config.js # Public configuration
โโโ package.json # Dependencies and scripts
- Modern, responsive design showcasing key features
- Clear call-to-action for parent registration
- Feature highlights with intuitive icons
- Mobile-optimized navigation
- Family Overview: Total balance, spending summaries, child activities
- Child Management: Individual child profiles with custom settings
- Transaction Monitoring: Real-time transaction feed with filtering
- Analytics: Spending patterns, category breakdowns, trends
- Quick Actions: Send money, adjust limits, emergency controls
- Settings: Safety controls, notification preferences, account management
- Balance Display: Current available spending money
- Recent Transactions: Transaction history with merchant details
- Rewards Progress: Points earned, level progression, achievements
- Quick Pay: QR code scanner for instant payments
- Goals: Savings targets and spending challenges
- Profile: Personal information and preferences
- Primary Blue:
#007bff- Main actions and branding - Success Green:
#28a745- Positive actions and confirmations - Warning Orange:
#ffc107- Alerts and important notices - Danger Red:
#dc3545- Critical actions and errors - Light Gray:
#f8f9fa- Backgrounds and subtle elements
- Font Family: System fonts for optimal performance
- Responsive Sizing: Scales appropriately across devices
- Weight Hierarchy: Clear information hierarchy with font weights
- Cards: Consistent card design for information display
- Buttons: Action-oriented button styles with hover states
- Forms: User-friendly form inputs with validation
- Navigation: Intuitive navigation patterns
auth.users: Supabase authentication userschildren: Child profiles linked to parent accountstransactions: All financial transactions and transfersmoney_requests: Student fund requests to parentsemergency_requests: Emergency fund access requestsrewards: Points and achievement trackinggames: Gamification system datasafety_settings: Parental control configurationsrecurring_payments: Automated allowance schedules
- Automatic Relationships: Foreign key constraints ensure data integrity
- Real-time Updates: Database triggers for instant notifications
- Comprehensive RLS: Row-level security for all sensitive data
- Audit Trail: Complete transaction history with timestamps
- Flexible Schema: Extensible design for future features
- Supabase Auth: Industry-standard authentication system
- Role-based Access: Separate parent and student permissions
- Session Management: Secure session handling with automatic expiry
- Email Verification: Required email confirmation for account security
- Row Level Security: Database-level access controls
- Encrypted Storage: All sensitive data encrypted at rest
- Secure Transmission: HTTPS/TLS for all data transfers
- Input Validation: Comprehensive client and server-side validation
- Transaction Limits: Configurable spending and transfer limits
- Fraud Detection: Unusual spending pattern alerts
- Merchant Verification: Verified merchant network
- Emergency Controls: Instant account freezing capabilities
- โ Parent-Child Money Management: Complete family financial ecosystem
- โ QR Payment System: Secure contactless payments for students
- โ Real-time Transaction Monitoring: Live spending alerts and notifications
- โ Supabase Integration: Full backend with authentication and real-time data
- โ Gamified Reward System: Points, levels, and achievement tracking
- โ Safety & Parental Controls: Spending limits, merchant restrictions, emergency controls
- โ Multi-Child Support: Manage multiple children from single parent account
- โ Emergency Fund System: Instant money transfers for urgent situations
- โ Recurring Allowances: Automated weekly/monthly payments
- โ Transaction History: Detailed spending analytics and reporting
- โ Mobile-Responsive Design: Optimized for all device sizes
- โ Comprehensive Schema: 10+ tables for users, transactions, rewards, safety
- โ Row Level Security: Database-level access controls
- โ Role-Based Authentication: Separate parent/student permissions
- โ Real-time Subscriptions: Live data updates across all interfaces
- ๐ง Advanced Analytics Dashboard: Enhanced spending insights and trend analysis
- ๐ง Educational Content Integration: Financial literacy modules for students
- ๐ง Merchant Network Expansion: Growing QR code payment acceptance
- ๐ง Push Notification System: Real-time mobile alerts
Building on our solid foundation, HapoPay 2.0 will introduce a comprehensive expense tracking app with AI-powered insights
- โ Quick Expense Entry: One-tap expense logging with category icons
- โ Visual Reports: Pie charts and bar charts for spending breakdown
- โ Multi-Currency Support: Handle different currencies and account types
- โ Cloud Sync: Google Drive, iCloud, Dropbox integration
- โ Biometric Security: Passcode and fingerprint protection
- โ AI Spending Insights:
- Monthly analysis: "You spent 20% more on dining this month"
- Predictive alerts: "Transport budget will run out in 10 days"
- Personalized savings recommendations
- โ Smart Logging:
- Voice entry: "R120, petrol" โ auto-categorized
- Receipt scanning with AI extraction
- Camera-based expense capture
- โ Predictive Analytics: Forecast spending patterns and budget alerts
- โ Savings Challenges:
- "Save R500 this week"
- "No takeout for 5 days"
- Progress badges and streak tracking
- โ Brand Partnerships: Discounts and rewards for completed challenges
- โ Social Features: Family leaderboards and shared goals
- โ Smart Rounding: Round up expenses (R37 โ R40) for micro-savings
- โ Automatic Savings: Spare change saved into dedicated wallet
- โ Investment Integration: Connect with investment partners
- โ Group Expenses: Shared wallets for families, roommates, trips
- โ Bill Splitting: Built-in expense sharing and settlement
- โ AI-Generated Reports: Monthly spending summaries with insights
- โ Trend Analysis: Weekly/monthly spending pattern recognition
- โ Goal Tracking: Progress toward financial objectives
- โ Forecasting: "Next month, you'll likely save R1,500"
- โ Native Mobile Apps: Flutter-based iOS and Android applications
- โ Physical Card Integration: Debit cards linked to student accounts
- โ Advanced AI: Machine learning for personalized financial advice
- โ Cryptocurrency Support: Digital currency management for teens
- โ Investment Education: Guided investment learning for students
- โ Open Banking Integration: Connect with major South African banks
| Feature Category | HapoPay 1.0 (โ Built) | HapoPay 2.0 (โ Planned) |
|---|---|---|
| User Management | Parent-child accounts | Individual expense tracking |
| Payment Method | QR codes | Manual/voice/photo entry |
| Analytics | Basic transaction history | AI-powered insights |
| Gamification | Points & achievements | Savings challenges & social |
| Platform | Web-based responsive | Native mobile apps |
| AI Features | None | Predictive analytics & smart logging |
| Expense Tracking | Transaction monitoring | Comprehensive expense management |
| Savings | Balance management | Smart rounding & micro-savings |
| Social Features | Family-focused | Groups & bill splitting |
- Frontend: Vanilla HTML5, CSS3, JavaScript
- Backend: Supabase (PostgreSQL, Auth, Storage)
- Platform: Web-based with mobile responsiveness
- Frontend: Flutter (cross-platform mobile)
- Backend: Firebase + Supabase hybrid
- AI/ML: TensorFlow Lite for on-device processing
- Additional: Voice recognition, OCR for receipts
- Security: End-to-end encryption for financial data
- Parent registration completes successfully
- Email verification process works
- Parent login redirects to dashboard
- Student login redirects to student dashboard
- Logout clears session properly
- Password reset functionality works
- Parent can add children to account
- Money transfers work between parent and children
- QR payments process correctly
- Spending limits enforce properly
- Reward points accumulate correctly
- Real-time notifications appear
- Transaction history displays accurately
- Unauthorized access is prevented
- Data isolation between families works
- Spending limits cannot be bypassed
- Emergency controls function properly
- Lazy Loading: Heavy components loaded on demand
- Image Optimization: Compressed images with appropriate formats
- Database Indexing: Optimized queries for fast data retrieval
- Caching Strategy: Strategic caching for frequently accessed data
- Minified Assets: Compressed CSS and JavaScript files
- Chrome: 90+ (Recommended)
- Firefox: 88+
- Safari: 14+
- Edge: 90+
- Mobile Browsers: iOS Safari 14+, Chrome Mobile 90+
Create a .env file from .env.example:
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_keySecurity Notes:
- Never commit real secrets to version control
- Keep
service_rolekeys server-side only - Use environment-specific configurations
- Build the application: Ensure all assets are optimized
- Configure environment: Set production Supabase credentials
- Deploy to hosting: Upload to your preferred hosting service
- Configure domain: Set up custom domain and SSL
- Test thoroughly: Verify all functionality in production
- Netlify: Automatic deployments with GitHub integration
- Vercel: Optimized for modern web applications
- Firebase Hosting: Google's hosting platform
- Traditional Web Hosting: Any service supporting static files
We welcome contributions to improve HapoPay:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow existing code style and conventions
- Ensure mobile-first responsive design
- Write comprehensive tests for new features
- Update documentation for any changes
- Maintain security best practices
For support and questions:
- Email: [email protected]
- Documentation: Available in the application
- GitHub Issues: Report bugs and feature requests
- Community: Join our developer community
This project is licensed under the MIT License - see the LICENSE file for details.
- User Creation: Automatic profile setup on registration
- Transaction Processing: Real-time balance updates
- Reward Calculation: Automatic point allocation
- Notification System: Instant alert generation
- Supabase Client: Comprehensive database operations
- Real-time Subscriptions: Live data updates
- File Storage: Avatar and document management
- Authentication: Secure user management
- Efficient Queries: Optimized database interactions
- Real-time Updates: Minimal latency for critical operations
- Responsive Design: Fast loading across all devices
- Error Handling: Graceful error management and recovery
HapoPay - Empowering the next generation of financially responsible students through safe, smart, and engaging money management.