SwiftPay is a full-stack fintech wallet application for securely sending money between users. It provides account authentication, email OTP verification, bank linking, transaction PIN protection, transfer history, and recent payees.
- User sign-up and login with JWT-based authentication
- Email OTP verification and transaction-PIN reset flow
- Bank account linking and transaction PIN setup
- Secure transfers to users by SwiftPay ID
- Transaction history, recent payees, and balance dashboard
- Protected client routes and protected API endpoints
- Frontend: React, Vite, React Router, Axios, Tailwind CSS
- Backend: Node.js, Express, MongoDB with Mongoose
- Security & email: JWT, bcrypt, Nodemailer
SwiftPay/
├── client/ # React single-page application
└── server/ # Express REST API and MongoDB models
- Node.js 18 or later
- MongoDB connection string (local MongoDB or MongoDB Atlas)
- A Gmail account with an app password for OTP emails
Clone the repository, then install dependencies for both applications:
git clone https://github.com/ankush-exe/SwiftPay.git
cd SwiftPay
cd server
npm install
cd ../client
npm installCreate server/.env from server/.env.example and provide your values:
PORT=5001
CLIENT_URL=http://localhost:5173
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_long_random_jwt_secret
EMAIL_USER=your_gmail_address
EMAIL_PASS=your_gmail_app_passwordCreate client/.env from client/.env.example:
VITE_API_BASE_URL=http://localhost:5001/apiDo not commit either .env file or real credentials.
Start the API in one terminal:
cd server
npm run devStart the frontend in another terminal:
cd client
npm run devOpen the local URL shown by Vite (normally http://localhost:5173). The API runs on http://localhost:5001 by default.
| Directory | Command | Purpose |
|---|---|---|
client |
npm run dev |
Start the Vite development server |
client |
npm run build |
Create a production frontend build |
client |
npm run lint |
Lint the frontend source |
server |
npm run dev |
Start the API with Nodemon |
server |
npm start |
Start the API with Node.js |
| Area | Base route | Operations |
|---|---|---|
| Authentication | /api/auth |
Sign up, log in, send and verify OTPs |
| Users | /api/users |
Link bank, manage transaction PIN, look up SwiftPay IDs |
| Transactions | /api/transactions |
Transfer money, retrieve/clear history, get recent payees |
Most user and transaction endpoints require a valid JWT bearer token.
This project is licensed under the ISC License.