ar-zoop / digiPay_m

An e-rupi voucher ecosystem. A solution for corporate, government,users and merchants.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DigiPay: Digital Wallet

An e-rupi voucher ecosystem. A solution for corporate, government,users and merchants.

Description

What is E-Rupi?

E-Rupi is a person and purpose-specific voucher. It can only be redeemed by the intended person for the intended purpose. The transaction takes place between a user's e-voucher and the merchant's bank. It is an offline process. One must make a manual requests to the bank for issuance of E-Rupi Voucher.

Our Solution

Keeping the essence of e-rupi voucher alive we built an online digital wallet to provide extra features on top of the offline feature.

Table of Contents

Folder Setup

Backend

src -> Inside the src folder the actual code resides.

Lets take a look inside the src folder

config -> Connected MySQL database and entered its password.

server-config.js-> Environment variables: PORT, SALT_ROUNDS, JWT_EXPIRY, JWT_SECRET

routes -> V1 version of routing API in this folder. Routing of banks, merchants, transactions, users, and vouchers.

middlewares -> Validator and authenticator for banks is here.

controllers -> The connection setters between Routers and Services. Controllers are made for banks, merchants, transactions, users, and vouchers.

repositories -> DB connections of banks, merchants, transactions, users, and vouchers are here.

services -> All business logic for banks, merchants, transactions, users, and vouchers are here.

utils ->

  • Helper methods: auth, error-response, success-response, Twilio here.
  • Error classes here.

Frontend

public -> Contains static assets such as index.html and other public files.

src -> The main directory where the React source code resides.

assets -> Holds all the images used in the software

components-> Holds the reusable components used throughout the application. The components are:

  • CenterProfile
  • ContentWrapper
  • LeftProfile
  • Navbar
  • RightProfile
  • AppContext.jsx
  • GenerateQR.jsx
  • Lowerprofile.jsx
  • LowerProfile.jsx
  • OtpInput.jsx
  • Popup.jsx

modals ->

  • amountModal
  • otpModal
  • transactionModal
  • departmentModal
  • requestSentModel
  • detailsModal

Pages-> Holds all the pages of the application.

  • Analysis
  • CompanyDashboard
  • Dashboard
  • Home
  • Login
  • Merchant
  • Merchant_Dashboard
  • OtpVerification
  • Profile
  • Rewards
  • Roles
  • Register
  • Transaction
  • VoucherID
  • VoucherPage
  • Constants.js

styles-> Contains CSS or styling files.

App.jsx-> The main component that serves as the entry point for the frontend.

index.js-> The entry point for rendering the React application.

.gitignore-> Specifies which files and directories to ignore in version control.

package.json-> Configuration file that contains project dependencies, scripts, and auth

Installation

Setting up backend

Go inside the folder path and execute the following command:

npm install

In the root directory create a .env file and add the following env variables.

PORT=

ex: PORT=3000

go inside the src folder and execute the following command: npx sequelize init

By executing the above command you will get migrations and seeders folder along with a config.json inside the config folder.

If you're setting up your development environment, then write the username of your db, password of your db and in dialect mention whatever db you are using for ex: mysql, mariadb etc

Setting up frontend

Navigate to the frontend directory: cd Frontend

Run the following command to install frontend dependencies: npm install

In the root directory create a .env file and add the following env variables

PORT=

ex: PORT=5137

Configuration

If the project requires configuration, you may need to provide specific details or environment variables for both the backend and frontend.

Backend

The .env file resides here. It has the port, salt_rounds, jwt_secret, and jwt_expiry.

Running the project

Backend

Open a terminal and navigate to the backend directory.

Run the following command to start the backend server:

To run the server execute : npm run dev

This command will start the backend server, which will listen for incoming API requests.

Frontend

Open a new terminal window (while keeping the backend server running in the previous terminal) and navigate to the frontend directory.

Run the following command to start the frontend development server: npm run dev

Features

User

  • Request Vouchers
  • Extend Expiry of a voucher
  • Pay to Merchant
  • Review Expenditure Analysis
  • Review Yojana's related to the user
  • Transation History

Merchant

  • Accept Payment
  • Review Customer Analysis : See what yojana related vouchers are being redeemed
  • Transaction History

Government

  • Create Voucher
  • Distribute Voucher
  • Analysis : Distribution analysis, Vouchers being expired without being redeemd analysis
  • Vouchers redeemed transaction
  • Users voucher tracking

Corporate

  • Create Voucher
  • Distribute Voucher
  • Analysis : Distribution analysis, Vouchers being expired without being redeemd analysis
  • Employee Transaction History

Node js API's

  1. POST User: signup localhost:3000/api/v1/users/signup

image

  1. POST User: signIn localhost:3000/api/v1/users/signin image

  2. PATCH User: Set pincode localhost:3000/api/v1/users/pincode image

  3. GET User: Check pincode localhost:3000/api/v1/users/pincode image

  4. GET User: Get User details localhost:3000/api/v1/users image

  5. PATCH User: Resend voucher localhost:3000/api/v1/vouchers image

  6. POST User: Request a voucher User: localhost:3000/api/v1/vouchers image

  7. GET User: Get voucher localhost:3000/api/v1/vouchers

image

  1. GET User: Get voucher Cop localhost:3000/api/v1/vouchers

image

  1. POST Merchant: Signup localhost:3000/api/v1/merchants image

  2. POST Merchant: SignIn localhost:3000/api/v1/merchants/signin

image

  1. POST Merchant: create acquirer bank localhost:3000/api/v1/merchants/addBank

image

  1. GET Merchant: Request OTP localhost:3000/api/v1/merchants/requestOTP

image

  1. POST Merchant: Accept Payment localhost:3000/api/v1/merchants/acceptPayment

image

About

An e-rupi voucher ecosystem. A solution for corporate, government,users and merchants.


Languages

Language:JavaScript 62.2%Language:SCSS 35.8%Language:CSS 1.7%Language:HTML 0.2%