OopsiPAY is a secure digital wallet and payment platform built with React, TypeScript, Node.js, and MongoDB, offering seamless cash-in, cash-out, and money transfer with role-based access and analytics.
FullStack
OopsiPAY is a full-stack digital wallet and payment management system designed to provide secure, efficient, and user-friendly financial transaction capabilities. The platform supports features like cash-in, cash-out, send money, and admin credit, with role-based access control for users, agents, admins, and super admins. The frontend is built with React, TypeScript, and Vite, while the backend leverages Node.js, Express.js, TypeScript, and MongoDB. This document provides a comprehensive overview of the project, combining details from both the frontend and backend for portfolio presentation.
OopsiPay is a Single Page Application (SPA) with a robust backend API, offering a seamless user experience for managing digital wallets and financial transactions. The platform supports secure authentication, real-time transaction processing, and comprehensive admin analytics, making it suitable for users, agents, and administrators.
admin@gmaill.comPa$$w0rd!34123451788386818549kamla@oletters.compasswordA1@123455294780550752user99@oletters.comPa$$w0rd!34123454924478916704agent1@oletters.compasswordA1@123458741495266472npm install -g pnpm)git clone https://github.com/Nahid-Mahmud/OopsiPay-Frontend.git
cd OopsiPay-Frontend
pnpm install
.env file in the project root:
VITE_API_BASE_URL=https://api.oopsipay.example.com
VITE_ENV=development
pnpm dev
pnpm build
git clone https://github.com/Nahid-Mahmud/OopsiPay-Backend.git
cd OopsiPay-Backend
pnpm install
.env file based on .env.example:
PORT=5000
NODE_ENV=development
MONGO_URI=mongodb+srv://username:password@cluster0.mongodb.net/digital_wallet_management
SUPER_ADMIN_EMAIL=admin@oopsipay.com
SUPER_ADMIN_PASSWORD=your_secure_password
SUPER_ADMIN_PIN=123456
SUPER_ADMIN_ADDRESS=Admin Address
ACCESS_TOKEN_JWT_SECRET=your_access_token_secret
ACCESS_TOKEN_JWT_EXPIRATION=1d
REFRESH_TOKEN_JWT_SECRET=your_refresh_token_secret
REFRESH_TOKEN_JWT_EXPIRATION=30d
EXPRESS_SESSION_SECRET=your_session_secret
FRONTEND_URL=http://localhost:5173
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
SMTP_PASS=your_email_password
SMTP_USER=your_email@gmail.com
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_FROM=your_email@gmail.com
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_USERNAME=your_redis_username
REDIS_PASSWORD=your_redis_password
BCRYPT_SALT_ROUNDS=10
pnpm run dev
pnpm run build
pnpm start
Note: Ensure the templates folder from src/utils is copied to dist/utils for production.http://localhost:5000/api/v1https://api.oopsipay.example.com/api/v1/auth)/auth/login: User login (email/password)./auth/refresh-token: Generate new access token./auth/logout: Invalidate tokens./auth/reset-password: Reset password using OTP./auth/change-password: Change current password./auth/forgot-password: Request OTP for password reset./user)/user/create: Register new user./user/:userId: Update user profile (with file upload)./user/get-all: Get all users (Admin/Super Admin only)./user/me: Get current user profile./user/change-pin: Change wallet PIN./user/:userId: Get specific user by ID (Admin/Super Admin only)./wallet)/wallet/type/:walletId: Update wallet type (Admin/Super Admin only)./wallet/me: Get current user's wallet./wallet/get-all: Get all wallets (Admin/Super Admin only)./wallet/:userId: Get wallet by user ID (Admin/Super Admin only)./transaction)/transaction/create: Create transaction (Cash In/Out, Send Money)./transaction/get-all: Get all transactions (Admin/Super Admin only)./transaction/my-transactions: Get user's transaction history./transaction/:transactionId: Get transaction details (Admin/Super Admin only)./otp)/otp/resend: Resend OTP to email./otp/verify-user: Verify user account with OTP./stats)/stats/user: User statistics (Admin/Super Admin only)./stats/transactions: Transaction statistics (Admin/Super Admin only).src/
├── components/ # Reusable UI and feature components
│ ├── ui/ # UI primitives (Button, Input, etc.)
│ ├── layouts/ # Layout components (DashboardLayout, Navbar, etc.)
│ ├── modules/ # Feature-specific components (Admin, Wallet, etc.)
├── pages/ # Route-level pages
│ ├── auth/ # Login, Register, etc.
│ ├── admin/ # AllTransactions, AllWallets, etc.
│ ├── common/ # Home, About, FAQ, Contact
├── redux/ # Redux Toolkit and RTK Query
│ ├── features/ # API slices (auth, transaction, wallet, etc.)
├── types/ # TypeScript interfaces
├── validations/ # Zod schemas for form validation
├── hooks/ # Custom hooks (use-debounce, withAuth, etc.)
├── lib/ # Utility libraries (axios, utils)
├── main.tsx # React entry point
├── index.css # Global Tailwind CSS styles
├── vite.config.ts # Vite configuration
src/
├── app.ts # Express app configuration
├── server.ts # Server startup and database connection
├── app/
│ ├── config/ # Configurations (Cloudinary, Redis, etc.)
│ ├── constants/ # Application constants
│ ├── errorHelpers/ # Error handling utilities
│ ├── interfaces/ # TypeScript interfaces
│ ├── middlewares/ # Express middlewares (auth, validation, etc.)
│ ├── modules/ # Feature modules (auth, user, wallet, etc.)
│ ├── routes/ # Route definitions
│ ├── utils/ # Utilities (JWT, email templates, etc.)
withAuth HOC, debounced search inputs, and Zod form validation.pnpm builddistVITE_API_BASE_URL and VITE_ENV.templates folder to dist/utils for email functionality.pnpm build to check for errors.VITE_API_BASE_URL matches backend API.axiosBaseQuery.ts for token handling.MONGO_URI is correct.REDIS_HOST and REDIS_PORT..env.git checkout -b feature/amazing-feature).git commit -m 'Add amazing feature').git push origin feature/amazing-feature).pnpm build and pnpm lint pass before submitting.Licensed under the ISC License.
OopsiPay - Empowering seamless and secure digital payments! 💳✨