Welcome to the Paytm Clone application! This project is a robust full-stack implementation featuring a React frontend and an Express.js backend, mimicking key functionalities of the Paytm app. The app allows users to sign up, log in, check balances, transfer funds, and view transaction details with a user-friendly interface.
MIT License
Welcome to the Paytm Clone application! This project is a robust full-stack implementation featuring a React frontend and an Express.js backend, mimicking key functionalities of the Paytm app. The app allows users to sign up, log in, check balances, transfer funds, and view transaction details with a user-friendly interface.
Ensure you have the following installed before starting the project:
Clone the Repository:
git clone https://github.com/skizzy-creates-projects/paytm-clone.git
cd paytm-clone
Backend Setup:
Navigate to the backend directory:
cd backend
Install backend dependencies:
npm install
Start the backend server:
nodemon index.js
The backend server will run on http://localhost:3000
.
Frontend Setup:
Navigate to the frontend directory:
cd frontend
Install frontend dependencies:
npm install
Start the frontend application:
npm run dev
The frontend app should be accessible at http://localhost:3000.
Signup Page (/Signup
)
Signin Page (/Signin
)
Dashboard Page (/dashboard
)
Send Money Page (/send
)
Transaction Page (/transaction
)
The backend is powered by the following libraries:
Signup
/api/v1/user/signup
POST
{
"username": "string (must be an email)",
"firstName": "string",
"lastName": "string",
"password": "string (minimum 6 characters)"
}
{
"msg": "User Created Successfully",
"token": "JWT token"
}
{
"msg": "Username already taken"
}
Login
/api/v1/user/login
POST
{
"username": "string (must be an email)",
"password": "string"
}
{
"msg": "User Logged In Successfully",
"token": "JWT token"
}
{
"msg": "User not found / Credentials Incorrect"
}
Update User Info
/api/v1/user
PUT
{
"username": "string (optional)",
"firstName": "string (optional)",
"lastName": "string (optional)",
"password": "string (optional)"
}
{
"msg": "User Updated Successfully",
"user": "updated user data"
}
{
"msg": "User Update Failed"
}
Bulk User Retrieval
/api/v1/user/bulk
GET
filter
: (optional) A string to filter users by first or last name.{
"users": [
{
"username": "string",
"firstName": "string",
"lastName": "string",
"_id": "string"
}
]
}
{
"msg": "Server Error"
}
Check Balance
/api/v1/account/balance
GET
Authorization
: Bearer <JWT token>
{
"balance": "number"
}
{
"msg": "User/Account not found Invalid Creds"
}
Transfer Funds
/api/v1/account/transfer
POST
Authorization
: Bearer <JWT token>
{
"to": "string (receiver's user ID)",
"amount": "number (amount to transfer)"
}
{
"msg": "Transfer Successful",
"transaction": "transaction details"
}
{
"msg": "Invalid Account/ Creds" or "Insufficient Balance" or "Invalid account - NO USER FOUND"
}
Display Users (Frontend)
/displayUsers
GET
Accounts
/accounts
GET
{
"accounts": [
{
"userId": "string",
"balance": "number"
}
]
}
{
"msg": "Server Error --Account Balance Route",
"error": "error details"
}
The backend uses CORS to allow requests from specific origins:
http://localhost:5173
https://paytm-olive-three.vercel.app
https://paytm-git-main-skizzy-creates-projects.vercel.app
https://paytm-skizzy-creates-projects.vercel.app
Utility Middleware
Authentication Middleware
The backend uses Zod for validating request bodies:
login data.
The project is deployed on Render, and the frontend is hosted on Vercel.
This project is licensed under the MIT License.