- Introduction
- Features
- Technologies Used
- Installation
- Usage
- API Endpoints
- Contributing
- License
This project is a PayTM-like web application developed using the MERN stack (MongoDB, Express, React, Node.js). It provides functionalities similar to real-world banking transactions, featuring robust user authentication, session-based transactions, and an attractive user interface. The application ensures data integrity and security using tools such as JWT for authentication and Zod for validation.
- User Registration and Authentication
- Secure Transactions using Mongoose Sessions
- Real-time Transaction Updates
- Responsive and Attractive UI
- State Management in React
- API Integration using Axios
- Frontend:
- React.js with Vite
- Tailwind CSS for styling
- Axios
- React State Management Tools
- Backend:
- Node.js
- Express.js
- MongoDB with Mongoose
- Libraries and Tools:
- Zod for validation
- JWT for authentication
- Node.js (v14 or higher)
- MongoDB
git clone https://github.com/syedahmedullah14/PayTM-Project.git
cd PayTM-Project
- Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
-
Set up environment variables:
Create a config.js
file in the backend directory and add the following
module.export ={
JWT_SECRET=your_jwt_secret}
-
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
Start the frontend server using Vite:
npm run dev
- Open your browser and navigate to
http://localhost:3000
for the frontend. - Use Postman or similar tools to interact with the backend at
http://localhost:5000
for API testing.
- Register
POST /api/v1/#
- Body:
{ "firstName": "string", lastName:string, "email": "string", "password": "string" }
- Login
POST /api/v1/user/signin
- Body:
{ "email": "string", "password": "string" }
- Create Transaction
POST /api/transactions
- Headers:
Authorization: Bearer <token>
- Body:
{ "amount": "number", "type": "string" }
- Get Balance
GET /api/user/balance
- Headers:
Authorization: Bearer <token>
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License — see the LICENSE file for details.PayTM-Like Web App