Sparrow is a comprehensive mobile money simulation platform built with Spring Boot and modern web technologies. It provides a complete ecosystem for testing, developing, and learning mobile money services with both USSD simulation and RESTful API endpoints. The platform features a professional web-based admin dashboard, comprehensive service management, and extensive API documentation.
- Enterprise-grade Architecture: Built with Spring Boot 3.2.6 and Maven for scalability and maintainability
- Dual Interface Support: USSD simulation frontend and modern web-based admin interface
- RESTful API: Complete REST and XML endpoints for all mobile money operations
- Professional UI: Modern responsive design with Tailwind CSS
- Comprehensive Documentation: Extensive API documentation with examples and integration guides
- πΈ Send Money: Secure peer-to-peer money transfers
- π± Buy Airtime: Mobile airtime top-up services
- πͺ Pay with MoMo: Merchant payment processing
- π§Ύ Bill Payments: Utility and service bill payments
- π° Savings & Loans: Financial savings and loan services
- π Investment & Insurance: Investment portfolios and insurance plans
- π RESTful API: Complete REST and XML endpoints for all services
- π Web Dashboard: Professional admin interface with real-time monitoring
- π Transaction Management: Comprehensive transaction tracking and history
- π₯ User Management: Complete user registration and profile management
- π Security: PIN-based authentication and secure transaction processing
- π± USSD Simulation: Traditional USSD interface for mobile money operations
- π API Documentation: Comprehensive documentation with cURL examples
- π§ͺ Testing Framework: Built-in testing capabilities for service validation
- π§ Service Management: Individual service configuration and monitoring
- π Analytics Dashboard: Real-time service statistics and user metrics
- π― Modular Design: Clean separation of concerns with adapter pattern
- β‘ Spring Boot: Enterprise-grade framework with auto-configuration
- π¨ Modern UI: Responsive design with Tailwind CSS
- ποΈ Database Ready: H2 in-memory database with JPA support
- π Maven Build: Standardized build process and dependency management
- Java 11+ - Oracle JDK or OpenJDK
- Maven 3.6+ - For dependency management and build
- IDE - IntelliJ IDEA, Eclipse, or VS Code with Java extensions
-
Clone the repository
git clone https://github.com/arison99/Sparrow.git cd Sparrow
-
Build the project
mvn clean compile
-
Run the application
mvn spring-boot:run
-
Access the platforms
- Web Admin Dashboard: http://localhost:8080/admin
- API Documentation: http://localhost:8080/admin/api-docs
- USSD Simulator: Run
MoMoUSDDApplication.java
for traditional USSD interface
# Build Docker image
docker build -t sparrow-momo .
# Run container
docker run -p 8080:8080 sparrow-momo
- Access the Dashboard: Navigate to
http://localhost:8080/admin
- User Management: Add users, view balances, and manage accounts
- Service Operations: Process transactions across all mobile money services
- Transaction Monitoring: View real-time transaction history and analytics
- API Testing: Use built-in tools to test REST and XML endpoints
- Send Money:
/admin/service/send-money
- Buy Airtime:
/admin/service/buy-airtime
- Pay with MoMo:
/admin/service/pay-with-momo
- Pay Bills:
/admin/service/pay-bill
- Savings & Loans:
/admin/service/savings-loans
- Invest & Insure:
/admin/service/invest-insure
# Add a new user
curl -X POST http://localhost:8080/admin/addUser \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "phone=+1234567890&pin=1234&balance=1000.00"
# Send money
curl -X POST http://localhost:8080/admin/sendMoney \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "fromPhone=+1234567890&toPhone=+0987654321&amount=100.00"
# Get user balance
curl -X POST http://localhost:8080/api/users/balance \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "phone=+1234567890"
- Run
MoMoUSDDApplication.java
for traditional USSD interface - Navigate through menu options using number selection
- Perform operations like balance inquiry, money transfer, and PIN management
Sparrow/
βββ src/main/java/
β βββ adapters/ # Service adapters for different operations
β β βββ BackendServiceSendMoneyAdapter.java
β β βββ BackendServiceAirtimeAdapter.java
β β βββ BackendServicePayWithMoMoAdapter.java
β β βββ BackendServicePaymentsAdapter.java
β β βββ BackendServiceSavingsLoansAdapter.java
β β βββ BackendServiceInvestInsureAdapter.java
β β βββ BackendServiceFinancialServicesAdapter.java
β β βββ BackendServiceJsonAdapter.java
β β βββ BackendServiceXmlAdapter.java
β βββ core/ # Core business logic
β β βββ BackendService.java
β β βββ Menu.java
β β βββ MenuSystem.java
β β βββ MenuSystemImpl.java
β βββ handlers/ # HTTP request handlers
β β βββ Rest*Handler.java # REST endpoint handlers
β β βββ Xml*Handler.java # XML endpoint handlers
β βββ ui/ # User interface controllers
β βββ AdminController.java
β βββ BackendServer.java
β βββ MoMoUSDDApplication.java
βββ src/main/resources/
β βββ templates/ # Thymeleaf templates
β βββ admin.html # Main dashboard
β βββ users.html # User management
β βββ services.html # Service overview
β βββ transactions.html # Transaction management
β βββ api-docs.html # API documentation
β βββ [service-name].html # Individual service pages
βββ pom.xml # Maven configuration
βββ API_DOCUMENTATION.md # Comprehensive API guide
βββ README.md # This file
- Adapter Pattern: Service adapters for different operation types
- MVC Pattern: Spring Boot controllers with Thymeleaf templates
- Repository Pattern: Data access abstraction
- Factory Pattern: Service creation and management
- Service Validation: Test mobile money services before production deployment
- Load Testing: Simulate high transaction volumes
- Integration Testing: Validate third-party integrations
- Compliance Testing: Ensure regulatory compliance
- Computer Science: Learn about distributed systems and API design
- Fintech Training: Understand mobile money ecosystem
- Software Engineering: Study clean architecture and design patterns
- API Development: Practice RESTful service development
- Prototype Development: Rapid prototyping of mobile money features
- API Testing: Test client applications against realistic endpoints
- Documentation: Generate comprehensive API documentation
- Mock Services: Development environment for mobile money apps
- Transaction Pattern Analysis: Study mobile money usage patterns
- Service Performance: Analyze service response times and reliability
- User Behavior: Understand mobile money user interactions
- Market Research: Simulate different market scenarios
# H2 Database (default)
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
# MySQL Configuration (production)
spring.datasource.url=jdbc:mysql://localhost:3306/sparrow
spring.datasource.username=your_username
spring.datasource.password=your_password
# Server Configuration
server.port=8080
server.servlet.context-path=/
# Logging
logging.level.org.springframework=INFO
logging.level.ui=DEBUG
# Thymeleaf Configuration
spring.thymeleaf.cache=false
spring.thymeleaf.enabled=true
All endpoints support form-based authentication. No API key required for development.
http://localhost:8080
POST /admin/addUser
- Create new userGET /api/users
- Get all users (JSON)GET /api/users/xml
- Get all users (XML)POST /api/users/balance
- Get user balancePOST /api/users/transactions
- Get user transactions
POST /admin/sendMoney
- Send money between usersPOST /admin/buyAirtime
- Purchase airtimePOST /admin/payWithMoMo
- Pay merchantPOST /admin/payBill
- Pay utility billsPOST /admin/savingsLoans
- Savings and loan operationsPOST /admin/investInsure
- Investment and insurance services
For detailed API documentation with examples, visit: /admin/api-docs
mvn test
mvn verify
Use the built-in API documentation page or tools like Postman:
- Import the API collection from
/admin/api-docs
- Test all endpoints with sample data
- Validate JSON and XML responses
-
Build the JAR
mvn clean package
-
Run the application
java -jar target/sparrow-1.0.0.jar
-
Configure production database
java -jar target/sparrow-1.0.0.jar --spring.datasource.url=jdbc:mysql://localhost:3306/sparrow
- AWS: Deploy to Elastic Beanstalk or ECS
- Google Cloud: Use App Engine or Cloud Run
- Azure: Deploy to App Service or Container Instances
- Heroku: Direct deployment with Maven support
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
mvn test
- Submit a pull request
- Follow Java naming conventions
- Add JavaDoc comments for public methods
- Write unit tests for new features
- Use consistent code formatting
- Update documentation for API changes
Please include:
- Java version and OS
- Steps to reproduce
- Expected vs actual behavior
- Stack traces if applicable
- Real-time Notifications: WebSocket support for live updates
- Advanced Analytics: Transaction pattern analysis and reporting
- Multi-currency Support: Handle multiple currencies and exchange rates
- Security Enhancements: OAuth2 and JWT token authentication
- Performance Monitoring: Metrics and health check endpoints
- Microservices Architecture: Break down into individual services
- Message Queue Support: RabbitMQ/Kafka for async processing
- GraphQL API: Alternative to REST endpoints
- Mobile SDK: Native mobile app development kit
- Blockchain Integration: Cryptocurrency transaction support
- β 5+ GitHub Stars
- π₯ 01 Contributor
- π 95% Issue Resolution Rate
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 Sparrow Mobile Money Platform
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
If you find Sparrow helpful, please consider:
- β Star the repository to show your support
- π΄ Fork the project to contribute
- π Report issues to help improve the platform
- π’ Share with others who might benefit from this project
- π¬ Join our community for discussions and support
- Name: Harrison Arison
- Email: [email protected]
- GitHub: arison99
- Issues: GitHub Issues
- Discussions: GitHub Discussions
For commercial support, enterprise licensing, or custom development:
- Email: [email protected]
Built with β€οΈ by the Sparrow Team
Making mobile money accessible for everyone
β Star on GitHub | π Documentation | π Get Started |