A robust payment transaction simulator designed to test and demonstrate payment processing workflows, built with React, TypeScript, and Supabase. This application simulates real-world payment processing scenarios, including transaction processing, load testing, and ISO8583-like message generation. Perfect for testing the resilience of payment platforms and understanding payment workflows.
---- Support for multiple transaction types:
- Purchases
- Refunds
- Reversals
- Real-time transaction status updates
- ISO8583-like message generation
- Secure card number handling with masking
- Merchant ID tracking
- Configurable transactions per second (TPS)
- Adjustable test duration
- Customizable transaction amounts
- Real-time performance metrics
- Batch simulation tracking
- Transaction success rate monitoring
- Actual TPS calculations
- Total amount tracking
- Detailed transaction logs
- Frontend: React with TypeScript
- Styling: Tailwind CSS
- Icons: Lucide React
- Database: Supabase
- Build Tool: Vite
- Backend: Express.js with Apollo Server (TypeScript)
- Deployment: AWS (Terraform + GitHub Actions)
- Containerization: Docker
- Node.js (v18 or higher)
- npm (comes with Node.js)
- Docker (optional)
-
Clone the repository:
git clone https://github.com/4Min4m/TransactionSimulator.git cd TransactionSimulator -
Install dependencies:
# Frontend cd frontend npm install # Backend cd ../backend npm install
-
Set up environment variables:
- Create a
.envfile in thebackenddirectory:SUPABASE_URL=your-supabase-url SUPABASE_KEY=your-supabase-key
- Create a
-
Start the development servers:
- Frontend:
cd frontend npm run dev - Backend:
cd backend npm run dev
- Frontend:
-
Open your browser and navigate to
http://localhost:5173.
transactions: Stores individual transaction recordssimulation_batches: Tracks load test simulation runs
- Row Level Security (RLS) enabled
- Policies for authenticated users
- Secure data access controls
-
RLS Policy Violations
- Issue: Initial transactions failed due to RLS policy restrictions
- Resolution: Implemented proper RLS policies for authenticated users
-
Supabase Client Export
- Issue: Supabase client export was missing
- Resolution: Fixed the
supabaseClient.tsfile to properly export the client
-
Transaction Simulation
- Currently simulates basic approval/decline scenarios
- Future enhancement: Add more complex validation rules
-
Load Testing
- Limited to single-instance testing
- Future enhancement: Distributed load testing support
-
Enhanced Transaction Processing
- Add support for more transaction types
- Implement advanced fraud detection simulation
- Add support for different card types
-
Advanced Load Testing
- Distributed load testing capabilities
- Custom scenario creation
- Advanced metrics and reporting
-
Analytics Dashboard
- Real-time transaction monitoring
- Advanced analytics and reporting
- Custom metric tracking
-
Security Enhancements
- Additional authentication methods
- Enhanced encryption simulation
- PCI compliance demonstration
-
API Integration
- External payment gateway simulation
- Webhook support
- Third-party integration examples
Contributions are welcome! Please feel free to submit pull requests or open issues for any bugs or feature requests.
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Supabase for real-time database capabilities
- UI components powered by Tailwind CSS
- Icons provided by Lucide
- Backend powered by Express.js and Apollo Server
- Live Demo: Transaction Simulator
- GitHub Repository: GitHub Repo
- Frontend Hosting: Amazon S3 static website
- Backend Hosting: AWS Lambda behind API Gateway
- Infrastructure as Code: Terraform
- CI/CD: GitHub Actions (manual approval + smoke tests)
- Database: Supabase
VITE_SUPABASE_URL=your-production-supabase-url
VITE_SUPABASE_ANON_KEY=your-production-anon-key
-
Frontend Security
- Enable HTTPS
- Configure CSP headers
- Enable rate limiting
-
Database Security
- RLS policies
- API key rotation
- Regular security audits
-
Database Optimization
-- Example index creation for frequently accessed columns CREATE INDEX idx_transactions_timestamp ON transactions(timestamp); CREATE INDEX idx_simulation_batches_status ON simulation_batches(status);
-
Frontend Optimization
- Code splitting
- Asset optimization
- Caching strategies
-
Version Control
- Use feature branches
- Follow conventional commits
- Require pull request reviews
-
CI/CD
- Automate all deployments
- Include automated tests
- Implement staging environments
-
Security
- Regular dependency updates
- Security scanning in CI
- Environment variable management
-
Monitoring
- Set up alerts
- Monitor error rates
- Track performance metrics
- API Documentation: Available at
/docswhen running the backend locally. - User Guide: Coming soon!
- Developer Guide: Check the GitHub Wiki.
Join the discussion and share your feedback:
- GitHub Issues: Open an Issue
- LinkedIn Post: Project Announcement
#PaymentSimulator #ExpressJS #ReactJS #Supabase #Docker #Render #DevOps #OpenSource #FinTech #PaymentProcessing #LoadTesting #TransactionSimulation
