💳 Digital Wallet Management System - Backend
A secure and scalable RESTful API for managing digital wallet operations with role-based access control.
🧠 Backend: Node.js , Express , TypeScript
🗄️ Database: MongoDB with Mongoose
🔐 Authentication: JWT , Session , Passport.js
✅ Validation: Zod
🧹 Code Quality: ESLint , Prettier
git clone https://github.com/your-username/backend-digital-wallet.git
cd backend-digital-wallet
npm install
npm run dev
Method
Endpoint
Access
Description
POST
/user/register
Public
Register new user
PATCH
/user/update
Admin
Update user details
GET
/user/all-users
Admin
Get all users
GET
/user/all-agents
Admin
Get all agents
Method
Endpoint
Access
Description
POST
/wallet/add
Agent
Add money to user wallet
POST
/wallet/withdraw
User
Withdraw money from wallet
POST
/wallet/transfer-money
User
Transfer money to another
GET
/wallet/all-wallet
Admin
View all wallets
GET
/wallet/my-wallet
User/Agent
View own wallet
PATCH
/wallet/:id
Admin
Update wallet info
Method
Endpoint
Access
Description
GET
/trans/all-transactions
Admin
All system transactions
GET
/trans/your-transactions
User
Your own transactions
Method
Endpoint
Access
Description
GET
/com/all-agent-com
Admin
All commissions data
GET
/com/agent-com
Agent
My commission earnings
Folder/File
Path
Description
app/modules/user
src/app/modules/user/
User controllers, services
app/modules/auth
src/app/modules/auth/
Authentication logic
app/modules/wallet
src/app/modules/wallet/
Wallet operations
app/modules/transaction
src/app/modules/transaction/
Transaction handling
app/modules/commission
src/app/modules/commission/
Commission system
app/middlewares
src/app/middlewares/
Custom middleware
config
src/config/
Configuration files
utils
src/utils/
Utility functions
server.ts
src/server.ts
Server entry point