- Frontend & Backend: Next.js
- Auxiliary Backend: Express
- Monorepo Management: Turborepo
- Database: PostgreSQL
- ORM: Prisma
- CSS Framework: Tailwind CSS
Ensure you have the following installed on your machine:
- Node.js (v14 or later)
- PostgreSQL
- Docker (optional)
- user-app: Handles user interactions and transactions.
- merchant-app: Manages merchant-related functionalities.
- bank-webhook: Simulates bank responses for transaction confirmations.
-
Add Money:
- Navigate to the transfer section in user-app.
- Select a bank and click Add Money.
- You'll be redirected to the bank page.
-
Simulate Bank Response:
- Since we don't have a real bank backend, we'll use bank-webhook.
- Start the bank-webhook server:
cd apps/bank-webhook npm run dev
- Bank-webhook server runs at
http://localhost:3003
.
-
Complete Transaction:
- Bank-webhook will change the status from pending to success.
- Once the status is updated, the user's wallet will reflect the credited amount.
- Send money to other users within the app using the P2P transfer section.
-
Clone the repository:
git clone https://github.com/priyanshu1044/paytm-final.git
-
Install dependencies:
npm install
-
Set up the database:
- Create a PostgreSQL database using a service like Neon or Aiven.
- Alternatively, run PostgreSQL using Docker:
docker run -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
- Configure your
.env
file with your database credentials. An example.env
file might look like:DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/postgres"
-
Run database migrations:
npx prisma migrate dev --name initial_migration npx prisma generate
-
Seed the database:
you already have seeded data in the database. you can login with the following credentials:
number: 1111111111 password: alice
number: 2222222222 password: bob
To start the development server, run:
npm run dev
To build and run the application using Docker:
-
Build the Docker image:
docker build -t priyanshu1044/paytm-final -f docker/Dockerfile.user-app .
-
Run the Docker container:
docker run -p 3000:3000 priyanshu1044/paytm-final
(keep in mind that you have to set up the database as mentioned in the installation section)
We love contributions! Whether you're fixing bugs, improving the documentation, or adding new features, your help is greatly appreciated.
-
Fork the repository:
Click the "Fork" button at the top right of the repository page.
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/paytm-final.git cd paytm-final
-
Create a new branch:
git checkout -b my-new-feature
-
Make your changes:
Make sure to test your changes thoroughly.
-
Commit your changes:
git add . git commit -m "Add some feature"
-
Push to your branch:
git push origin my-new-feature
-
Create a Pull Request:
Go to the repository on GitHub and click the "Compare & pull request" button.
- Bug Fixes: Help us squash bugs!
- New Features: Have an idea for a cool new feature? Implement it and send us a PR.
- Documentation: Improve our documentation to help others understand how to use the project.
All contributors will receive a shoutout in our project's README and release notes. We appreciate your efforts and want to acknowledge your contributions!