PayPL is a MERN Stack payment web app that allows users to sign up, sign in, and transfer money to other users. The app is styled using Tailwind CSS, with data fetching handled by Axios and input validation managed by Zod. It features JWT-based authentication for secure transactions.
- Signup and Signin Functionality: Create a new account or sign in to an existing account.
- Random Money Deposit: Upon signup or signin, a random amount of money is credited to the user's account.
- Dashboard: View your account balance and search for other users.
- Send Money: Navigate to the payments page to transfer money to other users by entering the amount to be sent.
- Frontend: ReactJS with Tailwind CSS for styling
- Backend: Node.js and Express.js
- Database: MongoDB with Mongoose for database management
- Authentication: JWT-based authentication
- Validation: Zod for input validation
- Data Fetching: Axios for API requests
To run PayPL locally:
- Clone the Repository:
git clone https://github.com/shreyashkatkar07/PayPL.git cd PayPL
- Open a new terminal window or tab.
- Navigate to the
backend
directory:cd backend
- Install backend dependencies:
npm install
- Create a
.env
file in thebackend
directory and add the following environment variables:MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
- Set up your MongoDB database and update the connection string (
MONGODB_URI
) andJWT_SECRET
in the.env
file. - Start the backend server:
Or
node index.js
Note:npm start
nodemon
is already configured. Thenpm start
command usesnodemon
under the hood, as defined in thepackage.json
scripts.
- Open another new terminal window or tab (still in the project directory
PayPL
). - Navigate to the
frontend
directory:cd frontend
- Install frontend dependencies:
npm install
- Start the frontend development server:
npm run dev
- Open your browser and visit http://localhost:5173.
- Signup or Signin: Create a new account or sign in to an existing account.
- Dashboard: View your account balance and search for other users.
- Send Money:
- Search for a user to send money to.
- Click on the 'Send Money' button.
- Enter the amount to send on the payments page and click 'Click here to transfer'.
- The specified amount will be debited from your account and credited to the receiver's account.
For transaction support, MongoDB must be configured as a replica set or a sharded cluster. Standalone deployments do not support transactions. If you're using MongoDB on Atlas, there's no need to worry, as all Atlas clusters are already set up as replica sets or sharded clusters. If you're managing your own standalone MongoDB instance, refer to the MongoDB guide to convert it to a replica set.
PayPL is currently under construction. More features and improvements are planned, and you can expect additional pull requests in the future.
Contributions are welcome! If you have any suggestions, improvements, or feature requests, feel free to open an issue or create a pull request.
For any questions or feedback, please reach out to [email protected].