A sophisticated, production-ready cross-border payment gateway that enables users to send and receive payments globally through multiple payment providers with AI-powered routing optimization.
- Multi-Platform Payment Integration: PayPal, Wise, Stripe, M-Pesa, and Payoneer support
- AI-Powered Payment Routing: Automatically selects optimal payment routes based on cost, speed, and reliability
- Real-Time Currency Conversion: Live exchange rates with transparent fee breakdown
- Smart Fallback Logic: Automatic rerouting when primary payment methods fail
- Offline Payment Queuing: Queue payments during network outages with automatic retry
- Real-Time Notifications: SMS and email updates via Twilio integration
- Responsive Design: Optimized for mobile, tablet, and desktop
- Interactive Dashboard: Transaction analytics with visual charts
- Payment Tracking: Real-time status updates and delivery confirmations
- Multi-Currency Support: 10+ major currencies with live conversion rates
- Secure Authentication: JWT-based authentication with bcrypt password hashing
- PostgreSQL Database: Robust data persistence with proper indexing
- RESTful API: Well-structured endpoints with validation and error handling
- Background Processing: Automated payment processing with cron jobs
- Rate Limiting: API protection against abuse
- Security Headers: Helmet.js for enhanced security
- Input Validation: Comprehensive validation using express-validator
- React 18 with TypeScript
- Tailwind CSS for styling
- Framer Motion for animations
- React Router for navigation
- Axios for API communication
- Recharts for data visualization
- React Hook Form for form management
- React Hot Toast for notifications
- Node.js with Express.js
- PostgreSQL database
- JWT for authentication
- bcryptjs for password hashing
- Helmet for security headers
- Express Rate Limit for API protection
- Node Cron for scheduled tasks
- Express Validator for input validation
- Stripe for card payments and bank transfers
- PayPal for digital wallet transactions
- Wise for international transfers
- Currency Layer for exchange rates
- Twilio for SMS notifications
- Node.js (v16 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn package manager
git clone https://github.com/your-username/paybridge.git
cd paybridge# Install frontend dependencies
npm install
# Install backend dependencies
npm run server:install# Create PostgreSQL database
createdb paybridge
# The application will automatically create tables on first runCreate a .env file in the server directory:
# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/paybridge
# JWT Secret (generate a secure random string)
JWT_SECRET=your-super-secret-jwt-key-here
# Payment API Keys (use sandbox/test keys for development)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
PAYPAL_CLIENT_ID=your_paypal_sandbox_client_id
PAYPAL_CLIENT_SECRET=your_paypal_sandbox_client_secret
PAYPAL_MODE=sandbox
# Currency Exchange API
CURRENCY_LAYER_API_KEY=your_currency_layer_api_key
# Twilio Configuration (for SMS notifications)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
# Wise API (sandbox)
WISE_API_TOKEN=your_wise_sandbox_api_token
WISE_PROFILE_ID=your_wise_profile_id
# Server Configuration
PORT=5000
NODE_ENV=development# Start both frontend and backend concurrently
npm run dev
# Or start them separately:
# Frontend (port 5173)
npm run dev:client
# Backend (port 5000)
npm run dev:serverpaybridge/
โโโ src/ # Frontend React application
โ โโโ components/ # Reusable UI components
โ โ โโโ Layout.tsx # Main layout wrapper
โ โ โโโ LoadingSpinner.tsx # Loading indicator
โ โโโ contexts/ # React contexts
โ โ โโโ AuthContext.tsx # Authentication context
โ โโโ pages/ # Page components
โ โ โโโ LandingPage.tsx # Marketing landing page
โ โ โโโ LoginPage.tsx # User authentication
โ โ โโโ RegisterPage.tsx # User registration
โ โ โโโ Dashboard.tsx # Main user dashboard
โ โ โโโ SendMoney.tsx # Payment sending flow
โ โ โโโ ReceiveMoney.tsx # Payment receiving setup
โ โ โโโ TransactionHistory.tsx # Transaction management
โ โ โโโ PaymentMethods.tsx # Payment method management
โ โโโ App.tsx # Main application component
โโโ server/ # Backend Node.js application
โ โโโ database/ # Database configuration
โ โ โโโ init.js # Database initialization
โ โโโ middleware/ # Express middleware
โ โ โโโ auth.js # Authentication middleware
โ โโโ routes/ # API route handlers
โ โ โโโ auth.js # Authentication routes
โ โ โโโ payments.js # Payment processing routes
โ โ โโโ users.js # User management routes
โ โ โโโ exchange.js # Currency exchange routes
โ โโโ services/ # Business logic services
โ โ โโโ paymentRouter.js # AI-powered routing engine
โ โ โโโ paymentProcessor.js # Payment processing logic
โ โ โโโ paymentProviders.js # Payment provider integrations
โ โ โโโ notificationService.js # SMS/Email notifications
โ โโโ server.js # Express server entry point
โโโ README.md # This file
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/payments/methods- Get user payment methodsPOST /api/payments/methods- Add payment methodPOST /api/payments/send- Send moneyGET /api/payments/transactions- Get transaction history
GET /api/users/profile- Get user profileGET /api/users/analytics- Get user analytics
GET /api/exchange/rates- Get exchange ratesGET /api/exchange/currencies- Get supported currencies
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt with salt rounds for password security
- Rate Limiting: Protection against brute force attacks
- Input Validation: Comprehensive validation on all endpoints
- CORS Configuration: Proper cross-origin resource sharing setup
- Security Headers: Helmet.js for additional security headers
- SQL Injection Protection: Parameterized queries with pg library
- Primary: Blue (#3B82F6) - Trust and reliability
- Secondary: Purple (#8B5CF6) - Innovation and technology
- Success: Green (#10B981) - Successful transactions
- Warning: Yellow (#F59E0B) - Pending states
- Error: Red (#EF4444) - Failed transactions
- Headings: Inter font family, bold weights
- Body: Inter font family, regular weight
- Code: Monospace for transaction IDs and technical data
- Base Unit: 8px grid system
- Component Padding: 16px, 24px, 32px
- Section Margins: 32px, 48px, 64px
- User registration and login
- Payment method addition
- Money sending flow (all steps)
- Transaction history viewing
- Dashboard analytics
- Responsive design on mobile/tablet
- Error handling and validation
Use tools like Postman or curl to test API endpoints:
# Register a new user
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123","firstName":"John","lastName":"Doe","country":"US","currency":"USD"}'
# Login
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}'# Build the frontend
npm run build
# Deploy the dist/ folder to your hosting provider# Set environment variables on your hosting platform
# Deploy the server/ directory- Use managed PostgreSQL services like:
- Heroku Postgres
- Railway PostgreSQL
- DigitalOcean Managed Databases
- AWS RDS
- Create account at https://stripe.com
- Get API keys from Dashboard > Developers > API keys
- Add keys to
.envfile
- Create developer account at https://developer.paypal.com
- Create sandbox application
- Get Client ID and Secret from app settings
- Create business account at https://wise.com
- Apply for API access
- Get API token and profile ID
- Create account at https://twilio.com
- Get Account SID and Auth Token
- Purchase phone number for SMS
- Transaction success rates
- Payment processing times
- User engagement metrics
- Error rates and types
- Query performance
- Connection pool usage
- Storage utilization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use TypeScript for type safety
- Follow ESLint configuration
- Use Prettier for code formatting
- Write descriptive commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Email: support@paybridge.com
- Documentation: https://docs.paybridge.com
- Core payment functionality
- Multi-provider integration
- User dashboard
- Transaction management
- Mobile app (React Native)
- Advanced analytics
- Multi-language support
- Cryptocurrency support
- Business accounts
- API for third-party integration
- Advanced fraud detection
- White-label solutions
Built with โค๏ธ by the PayBridge Team