To Run:
npm run start
To Deploy:
npm run build
pm2 serve build/ 80 --spa
To Run:
npm run dev
To Deploy:
npm run deploy:dev
A basic wallet project with the following features.
- User can join the system with an initial balance(default balance is 20) & name.
- Username & balance is shown on login.
- User can credit debit amount.
- The transaction history on the home page with pagination & table sorting features.
- The transaction history can be exported in "CSV" file.
- Session is maintained with help of localStorage in frontend.
Total 4 APIs as following:
{
"name": "jack",
"balance": 1200.98642468
}
{
"data": {
"name": "omnamahshivaya1",
"balance": 1200.9864,
"_id": "6372721bb383e9dd20b75b22",
"createdAt": "2022-11-14T16:51:39.060Z",
"updatedAt": "2022-11-14T16:51:39.060Z",
"__v": 0,
"id": "6372721bb383e9dd20b75b22"
},
"message": "Wallet setup successful !"
}
{
"name": "jack",
"balance": 1200.98642468
}
{
"data": {
"_id": "6370e6dd4cf84ace5f2031c6",
"name": "jack",
"balance": 1305.4254,
"createdAt": "2022-11-13T12:45:17.890Z",
"updatedAt": "2022-11-14T16:31:30.159Z",
"__v": 0,
"id": "6370e6dd4cf84ace5f2031c6"
},
"message": "Wallet found !"
}
{
"amount": -0.0110,
"description": "shop1-paytm"
}
{
"data": {
"_id": "6370e6dd4cf84ace5f2031c6",
"name": "jack",
"balance": 1200.4254,
"createdAt": "2022-11-13T12:45:17.890Z",
"updatedAt": "2022-11-14T14:12:13.035Z",
"__v": 0,
"id": "6370e6dd4cf84ace5f2031c6"
},
"message": "Transaction done !"
}
{
"amount": -0.0110,
"description": "shop1-paytm"
}
{
"data": {
"transactions": [
{
"_id": "6370e6dd4cf84ace5f2031c8",
"wallet_id": "6370e6dd4cf84ace5f2031c6",
"amount": 1200.9864,
"balance": 1200.9864,
"description": "Transaction added on wallet setup",
"type": "Credit",
"createdAt": "2022-11-13T12:45:17.954Z",
"updatedAt": "2022-11-13T12:45:17.954Z",
"__v": 0,
"id": "6370e6dd4cf84ace5f2031c8"
},
{
"_id": "6370e6eb4cf84ace5f2031d5",
"wallet_id": "6370e6dd4cf84ace5f2031c6",
"amount": -0.011,
"balance": 1200.9534,
"description": "shop1-paytm",
"type": "Debit",
"createdAt": "2022-11-13T12:45:31.202Z",
"updatedAt": "2022-11-13T12:45:31.202Z",
"__v": 0,
"id": "6370e6eb4cf84ace5f2031d5"
}
],
"transactionsCount": 2
}
}