Skip to content

This system allow users to fund their account, transfer funds and withdraw from their account, and also subscribe to Real virtual credit card

Notifications You must be signed in to change notification settings

Emengkeng/Depuis-Ewallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Best E-wallet-virtual-card-system

GitHub code size in bytes GitHub last commit GitHub stars My stars GitHub forks Code size Languages Top Issues Watchers

This system allow users to fund their account, transfer funds and withdraw from their account, and also subscribe to Real virtual credit card

Note

Application is still under developement, new features may be added weekly

Features

  • Basic Authentication (Register & Login)
  • Get Profile
  • Set Wallet Pin
  • Fund Wallet
  • Verify Wallet Funding
  • Fund Transfer
  • Withdraw Fund
  • Get Transactions
  • Create credit card
  • Freeze card
  • Fund Card
  • Get Card Transactions
  • Gift Card
  • Accept or Reject Gifted Card

Tech Stack

  • javascript
  • nodejs
  • mysql(Sequalize)
  • express

Todo

[ ] Switch Deposit and Withdrawal from axios to the Flutterwave Rave Package

[ ] Add mailing

[ ] Add the forget password routes

[ ] Withdraw from Card

API End Points

Users

Register

{BaseUrl}/api/v1/register

This endpoint does the followings:

  • Create a user
  • Create a wallet for the user

Login

{BaseUrl}/api/v1/login

This endpoint does the followings

  • Check if the user details is valid
  • Generate a JWT token if the user details are valid

Get Profile

{BaseUrl}/api/v1/auth/profile
  • This endpoint return the profile of the authenticated user.

All Users

{BaseUrl}/api/v1/getallusers
  • This endpoint return all registered users

Wallet

Set Wallet Pin

{BaseUrl}/api/v1/wallet/set-pin
  • Set wallet pin for the user because by default the wallet created during registration is null

Fund Wallet

{BaseUrl}/api/v1/wallet/fund
  • Takes amount and generate payment link

Verify Wallet funding

{BaseUrl}/api/v1/wallet/verify
  • Takes Payment Link and verifies it

Transfer Money

{BaseUrl}/api/v1/wallet/transfer
  • Transfers money from one account to another

Withdraw money

{BaseUrl}/api/v1/wallet/withdraw
  • Checks account balance and Withdraw money from users account

Get Wallet Balance

{BaseUrl}/api/v1/wallet/balance
  • Get users account balance

Banks

{BaseUrl}/api/v1/wallet/banks
  • Get all available banks used by flutterwave

Transaction

Get Wallet Transactions

{BaseUrl}/api/v1/transactions
  • Get Users transactions

Card

List Cards

{BaseUrl}/api/v1/card/listcard
  • List all Cards that have been created since the existence of the plartform

Create Card

{BaseUrl}/api/v1/card/createcard
  • Create a card for a user, depending on the card type

Fund Card

{BaseUrl}/api/v1/card/fundcard
  • Takes amount and funds a card

Pay

{BaseUrl}/api/v1/card/pay
  • End point to test if a card works by initiating payment with it

Get Card

{BaseUrl}/api/v1/card/getcard
  • Takes card id and return all info about that card

Fetch Transaction of a card

{BaseUrl}/api/v1/card/fetch_transcard
  • Fetch transactions of a card from the flutterwave server
  • We will add a card transaction table on our db to handle this soon

Withdraw

{BaseUrl}/api/v1/card/withdraw
  • Withdraw money from card

Freeze Card

{BaseUrl}/api/v1/card/freezecard
  • Takes card id and Freeze the card

Gift Card

{BaseUrl}/api/v1/card/giftcard
  • Gift a card to a user on the plartform

Accept a Gifted Card

{BaseUrl}/api/v1/card/acceptcard
  • Accept card that has been gifted to you

How to install

Using Git (recommended)

  1. Clone the project from github.
git clone https://github.com/Emengkeng/Depuis-Ewallet.git

git remote add origin https://github.com/Emengkeng/Depuis-Ewallet.git

Using manual download ZIP

  1. Download repository
  2. Uncompress to your desired directory

Install npm dependencies

npm install

Setting up environments

  1. You will find a file named .env.example on root directory of project.
  2. Create a new file by copying and pasting the file and then renaming it to just .env
cp .env.example .env
  1. The file .env is already ignored, so you never commit your credentials.
  2. Change the values of the file to your environment. Helpful comments added to .env.example file to understand the constants.

Running and resetting migrations

  1. To run migrations
npm run migrate
  1. To reset migrations
npm run migrate:reset

How to run

Running API server locally

sh dev-sript.sh

You will know server is running by checking the output of the command npm start

Running API server on The Web

sh production-sript.sh

Running Tests

npm test

Note: Make sure you set up the test variable in the .env file

Author

Emenkeng Juslen

Need help?

Feel free to contact me on LinkedIn

if (youEnjoyed) {
    starThisRepository();
}

License

MIT

About

This system allow users to fund their account, transfer funds and withdraw from their account, and also subscribe to Real virtual credit card

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published