Skip to content

aadityasingh9601/Paytm

Repository files navigation

DigiWallet - A Digital wallet application

A secure digital wallet application with peer-to-peer payments, bank transfers, and transaction management.

Live link

DigiWallet dashboard

Features

  • User Authentication : Uses NextAuth for Sign up & Sign in.
  • Onramp transactions : Transfer money from bank account to wallet.
  • P2P transactions : Transfer money to peers.
  • Transaction history : Showcases history of past On-ramp & P2P transactions.

Tech Stack

Frontend

Backend

Database

DevOps & Infrastructure

Architecture

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

  • Node.js (Version: >=18.x)
  • Docker

Development

Setup


  1. Clone the repo
git clone git@github.com:aadityasingh9601/Paytm.git
  1. Go to the project folder
cd paytm

Manual setup

  1. Install packages
npm install
  1. Setting up .env files
  • Duplicate .env.example to .env

    cp apps/user-app/.env.example apps/user-app/.env
    cp apps/mock-bank/.env.example apps/mock-bank/.env
    cp apps/bank-webhook/.env.example apps/bank-webhook/.env
    cp packages/db/.env.example packages/db/.env
  • Use openssl rand -base64 32 to generate a key and add it under NEXTAUTH_SECRET in the apps/user-app/.env file.

  1. Setup postgres database locally using docker
docker compose up db
  1. Apply database migrations
npm run db:migrate-dev
  1. Generate prisma client
npm run db:generate
  1. Run the development server
npm run dev

Using Docker

  1. Setting up .env file
  • Duplicate .env.example to .env

    cp .env.example .env
  • Use openssl rand -base64 32 to generate a key and add it under NEXTAUTH_SECRET in the apps/user-app/.env file.

  1. Run the development server
docker compose up
  1. To gracefully stop the development server
docker compose down

E2E testing

Create .env.test file in the root directory and set the environment variable DATABASE_URL in the .env.test file. The value should be postgresql://postgres:mysecretpassword@localhost:5432/paytm_test_db.

# In a terminal just run:
./scripts/run-e2e.sh

# To open the last HTML report run:
npx playwright show-report

Resolving issues

E2E browsers not installed

Run npx playwright install --with-deps to download the test browsers and the dependencies.

Author

Releases

No releases published

Packages

 
 
 

Contributors