A sophisticated, full-stack digital wallet platform inspired by Paytm, built with modern technologies in 5 days. Real money is not involved.
- β¨ Features
- π οΈ Tech Stack
- ποΈ Architecture
- π Quick Start
- π Project Structure
- π§ API Documentation
- π¨ UI/UX Features
- π Security Features
- π Performance
- π§ͺ Testing
- π¦ Deployment
- π€ Contributing
- π License
- Instant Money Transfers - Real-time peer-to-peer transactions
- Secure Balance Management - Bank-grade security with encrypted storage
- Transaction History - Comprehensive audit trail with search and filtering
- Multi-Currency Support - INR, USD, ETH, BTC (extensible framework)
- Account Types - Wallet, Savings, and Trading accounts
- JWT-based Authentication - Secure token-based session management
- Password Hashing - BCrypt encryption with salt rounds
- Input Validation - Zod schema validation for all user inputs
- CORS Protection - Cross-origin resource sharing security
- Rate Limiting - Protection against brute force attacks
- Responsive Design - Mobile-first approach with Tailwind CSS
- Dark/Light Mode - Theme switching with system preference detection
- Smooth Animations - Framer Motion powered micro-interactions
- Real-time Updates - Live balance and transaction updates
- Accessibility - WCAG 2.1 compliant components
- Balance Trends - Interactive charts with Recharts
- Transaction Analytics - Spending patterns and insights
- Real-time Dashboard - Live financial overview
- Export Capabilities - Transaction history export
| Technology | Version | Purpose |
|---|---|---|
| React | 18.3.1 | UI Framework |
| TypeScript | 5.9.2 | Type Safety |
| Vite | 5.4.19 | Build Tool & Dev Server |
| Tailwind CSS | 3.4.17 | Utility-First CSS |
| Framer Motion | 12.23.12 | Animation Library |
| React Router | 6.30.1 | Client-side Routing |
| Axios | 1.11.0 | HTTP Client |
| React Query | 5.83.0 | Server State Management |
| Radix UI | Latest | Accessible Components |
| Recharts | 2.15.4 | Data Visualization |
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 18+ | Runtime Environment |
| Express.js | 5.1.0 | Web Framework |
| TypeScript | 5.9.2 | Type Safety |
| MongoDB | 8.17.0 | NoSQL Database |
| Mongoose | 8.17.0 | ODM for MongoDB |
| JWT | 9.0.2 | Authentication |
| BCrypt | 6.0.0 | Password Hashing |
| Zod | 4.0.14 | Schema Validation |
| CORS | 2.8.5 | Cross-Origin Security |
- ESLint - Code linting and formatting
- Nodemon - Development server with auto-reload
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixing
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β (React/TS) βββββΊβ (Node/Express)βββββΊβ (MongoDB) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
β β β
ββββββΌβββββ βββββββΌββββββ ββββββΌβββββ
β Vite β β Express β β Mongooseβ
β Dev β β Server β β ODM β
β Server β β β β β
βββββββββββ βββββββββββββ βββββββββββ
- Microservices-Ready - Modular design for easy scaling
- RESTful API - Standard HTTP methods and status codes
- MVC Pattern - Clear separation of concerns
- Middleware Architecture - Extensible request processing
- Database Transactions - ACID compliance for financial operations
- Node.js (v18 or higher)
- MongoDB (v6.0 or higher)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/titanjagpreet/walletx.git cd walletx -
Install dependencies
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Environment Setup
# Backend (.env) cd backend cp .env.example .env
Configure your
.envfile:PORT=5000 MONGO_URI=mongodb://localhost:27017/walletx JWT_SECRET=your-super-secret-jwt-key NODE_ENV=development
-
Database Setup
# Start MongoDB (if not running) mongod # The application will automatically create collections
-
Start Development Servers
# Terminal 1 - Backend cd backend npm run dev # Terminal 2 - Frontend cd frontend npm run dev
-
Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- API Documentation: http://localhost:5000/api-docs
walletx/
βββ backend/ # Backend API Server
β βββ src/
β β βββ controller/ # Request handlers
β β β βββ accountController.ts # Account operations
β β β βββ userController.ts # User management
β β βββ middlewares/ # Express middlewares
β β β βββ userValidation.ts # Input validation
β β β βββ verifyJWT.ts # JWT authentication
β β βββ models/ # Database models
β β β βββ db.ts # Database connection
β β β βββ models.ts # Mongoose schemas
β β βββ routes/ # API routes
β β β βββ accountRoutes.ts # Account endpoints
β β β βββ userRoutes.ts # User endpoints
β β βββ services/ # Business logic
β β β βββ transferFunds.ts # Money transfer service
β β βββ server.ts # Express server setup
β βββ package.json
β βββ tsconfig.json
β
βββ frontend/ # React Frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ auth/ # Authentication components
β β β βββ ui/ # Base UI components
β β β βββ FAQ.tsx # FAQ section
β β β βββ Features.tsx # Features showcase
β β β βββ Footer.tsx # Footer component
β β β βββ Hero.tsx # Landing hero section
β β β βββ HowItWorks.tsx # How it works section
β β β βββ Navbar.tsx # Navigation bar
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions
β β βββ pages/ # Page components
β β β βββ Dashboard.tsx # Main dashboard
β β β βββ Index.tsx # Landing page
β β β βββ NotFound.tsx # 404 page
β β β βββ SignIn.tsx # Login page
β β β βββ SignUp.tsx # Registration page
β β βββ App.tsx # Main app component
β β βββ index.css # Global styles
β β βββ main.tsx # App entry point
β βββ package.json
β βββ vite.config.ts
β
βββ README.md
Create a new user account.
Request Body:
{
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "john@example.com",
"password": "SecurePass123!"
}Response:
{
"message": "User signed up! Welcome John"
}Authenticate user and receive JWT token.
Request Body:
{
"username": "johndoe",
"password": "SecurePass123!"
}Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"message": "User logged in. Welcome John"
}Get current account balance.
Headers:
Authorization: Bearer <jwt-token>
Response:
{
"message": "Balance fetch successful",
"balance": 1500.50
}Get transaction history.
Headers:
Authorization: Bearer <jwt-token>
Response:
{
"message": "Transactions fetched successfully",
"transactions": [
{
"type": "sent",
"user": "johndoe",
"name": "John Doe",
"amount": 100.00,
"currency": "INR",
"date": "2024-01-15T10:30:00Z",
"status": "success",
"note": "Payment for services"
}
]
}Transfer money to another user.
Headers:
Authorization: Bearer <jwt-token>
Request Body:
{
"receiverUsername": "johndoe",
"amount": 100.00
}Response:
{
"message": "Funds successfully transferred"
}Get user profile information.
Update user email address.
Update username.
- Modern FinTech Aesthetic - Professional, trustworthy design
- Responsive Grid System - Mobile-first responsive design
- Consistent Color Palette - Primary, secondary, and accent colors
- Typography Scale - Hierarchical text system
- Component Library - Reusable UI components
- Smooth Transitions - CSS transitions and Framer Motion animations
- Hover Effects - Interactive feedback on user actions
- Loading States - Skeleton screens and loading spinners
- Toast Notifications - User feedback for actions
- Form Validation - Real-time input validation
- Keyboard Navigation - Full keyboard accessibility
- Screen Reader Support - ARIA labels and semantic HTML
- Color Contrast - WCAG 2.1 AA compliance
- Focus Management - Proper focus indicators
- Reduced Motion - Respects user motion preferences
- JWT Tokens - Secure, stateless authentication
- Token Expiration - Automatic token refresh mechanism
- Password Policies - Strong password requirements
- Account Lockout - Protection against brute force attacks
- Input Sanitization - XSS protection
- SQL Injection Prevention - Parameterized queries
- CORS Configuration - Controlled cross-origin access
- Rate Limiting - API abuse prevention
- Transaction Validation - Multi-layer transaction verification
- Balance Checks - Real-time balance validation
- Audit Trails - Complete transaction logging
- Fraud Detection - Suspicious activity monitoring
- Code Splitting - Dynamic imports for better loading
- Lazy Loading - Component-level code splitting
- Image Optimization - WebP format with fallbacks
- Bundle Analysis - Optimized bundle sizes
- Caching Strategy - Browser and CDN caching
- Database Indexing - Optimized query performance
- Connection Pooling - Efficient database connections
- Response Caching - Redis-based caching layer
- Compression - Gzip response compression
- Load Balancing - Horizontal scaling support
- Performance Metrics - Core Web Vitals tracking
- Error Tracking - Comprehensive error logging
- User Analytics - Usage pattern analysis
- Health Checks - System health monitoring
# Run unit tests
npm run test
# Run integration tests
npm run test:integration
# Run E2E tests
npm run test:e2e# Run unit tests
npm run test
# Run API tests
npm run test:api
# Run load tests
npm run test:load- Unit Tests - Component and function testing
- Integration Tests - API endpoint testing
- E2E Tests - Full user journey testing
- Performance Tests - Load and stress testing
# Build frontend
cd frontend
npm run build
# Build backend
cd backend
npm run build# Production
NODE_ENV=production
PORT=5000
MONGO_URI=mongodb://production-db:27017/walletx
JWT_SECRET=production-jwt-secret
CORS_ORIGIN=https://walletx.com- Frontend - Vercel, Netlify, or AWS S3
- Backend - Heroku, AWS EC2, or Google Cloud
- Database - MongoDB Atlas/Compass or AWS DocumentDB
- CDN - Cloudflare or AWS CloudFront
# Build and run with Docker
docker-compose up -d
# Or build individual containers
docker build -t walletx-frontend ./frontend
docker build -t walletx-backend ./backendWe welcome contributions from the community! Please read our contributing guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TypeScript - Strict type checking enabled
- ESLint - Consistent code formatting
- Prettier - Automatic code formatting
- Conventional Commits - Standard commit message format
- Unit Tests - Minimum 80% coverage
- Integration Tests - All API endpoints covered
- E2E Tests - Critical user flows tested
This project is licensed under the MIT License - see the LICENSE file for details.
- Paytm - Inspiration for the wallet concept
- React Team - Amazing frontend framework
- Node.js Community - Robust backend ecosystem
- MongoDB - Flexible NoSQL database
- Tailwind CSS - Utility-first CSS framework
- Issues - GitHub Issues
- Discussions - GitHub Discussions