https://github.com/s-satyajit/payflow
A mern stack app with jwt auth protected rest apis for user auth, account linking, and transactional operations, built with node.js on server and react.js on client
https://github.com/s-satyajit/payflow
express mern-stack mongodb mongoose nodejs payment-app react rest-api zod
Last synced: 3 months ago
JSON representation
A mern stack app with jwt auth protected rest apis for user auth, account linking, and transactional operations, built with node.js on server and react.js on client
- Host: GitHub
- URL: https://github.com/s-satyajit/payflow
- Owner: s-satyajit
- Created: 2025-07-07T04:20:08.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-12-12T14:14:34.000Z (7 months ago)
- Last Synced: 2026-02-10T23:52:26.160Z (5 months ago)
- Topics: express, mern-stack, mongodb, mongoose, nodejs, payment-app, react, rest-api, zod
- Language: JavaScript
- Homepage: https://payflow-zeta.vercel.app/
- Size: 108 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PayFlow
**Full‑Stack Payment Application**
PayFlow is a MERN‑stack web application that allows users to create accounts, link bank details, transfer funds, search for accounts, and view transaction history. Built with React (Vite), Node.js, Express, and MongoDB Atlas, deployed on Vercel.
---
## 📦 Features
* **User Authentication**: Sign up & Sign in with JWT-based sessions
* **Account Management**: Create and view multiple bank accounts
* **Fund Transfers**: Secure, atomic transactions between accounts
* **Search**: Lookup accounts by number, IFSC, or user name
* **Transaction History**: View, filter, and export transaction records
* **Dashboard**: Consolidated user profile, balances, and recent activity
---
## 🚀 Quick Start
1. **Clone the repo**
```bash
git clone https://github.com/s-satyajit/payflow.git
cd payflow
```
2. **Setup environment**
* **Backend** (`server/`):
```bash
cd server
npm install
```
Create `server/src/.env`:
```env
MONGO_URI=
JWT_SECRET=
```
* **Frontend** (`client/`):
```bash
cd ../client
npm install
```
Create `client/.env`:
```env
VITE_API_URL=/api/v1
```
3. **Local Development**
* Start backend:
```bash
cd server
npm run dev
```
* Start frontend:
```bash
cd ../client
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) (or Vite’s port) in your browser.
---
## 📖 API Reference
*Base URL: `/api/v1`*
All routes `(except /auth/*)` are protected and require the `Authorization: Bearer ` header.
### Auth
| Method | Endpoint | Body | Description |
| ------ | -------------- | ----------------------------------------------------------- | ------------------------- |
| POST | `/auth/signup` | `{ username, firstname, lastname, email, password, phone }` | Register new user |
| POST | `/auth/signin` | `{ email, password }` | Login (email or username) |
### Account
| Method | Endpoint | Query/Body | Description |
| ------ | -------------------- | ----------------------------------------- | ------------------------- |
| GET | `/account/create-account` | `{accountNumber, ifsc, bankName}` | Create an account |
| GET | `/account/search-accounts?q=` | (query) accountNumber, IFSC, or user name | Search accounts |
| POST | `/account/get-account`| `{ accountNumber }` | Get account details |
### Transaction
| Method | Endpoint | Body | Description |
| ------ | ----------------------- | -------------------------------------------------------------------------- | -------------------------------- |
| POST | `/transaction/transfer-funds` | `{ id, toAccountNumber, ifsc, firstname, lastname, amount, description? }` | Transfer funds between accounts |
| POST | `/transaction/transactions` | `{ userId }` | List all transactions for a user |
### User
| Method | Endpoint | Body / Protected | Description |
| ------ | ----------------- | ---------------- | ------------------------------------ |
| GET | `/user/user/me` | Protected | Get current user profile |
---
## You can connect with me via
Email: satyajitsamal.workmail@gmail.com
LinkedIn: https://linkedin.com/in/satyajitsamal
X: https://x.com/satyajitstwt
GitHub: https://github.com/s-satyajit
Portfolio: https://satyajitsamal.vercel.app