←Back to Work
Backend
Digital Wallet Management System
Secure, modular, role-based backend API for a digital wallet system similar to Bkash or Nagad with JWT auth, access/refresh tokens, and KYC verification.
Express.jsTypeScriptMongoDBMongoose
Digital Wallet Management System
Secure, modular, role-based backend API for a digital wallet system similar to Bkash or Nagad.
Overview
Design and build a secure, modular, and role-based backend API for a digital wallet system. The system supports multiple roles including Admin, Agent, and User with isolated dashboards and comprehensive wallet operations.
Key Features
- Role-based access control (Admin, Agent, User)
- Wallet operations: cash-in/out, top-up, send money, withdraw
- JWT authentication with access/refresh tokens
- Email reset functionality
- KYC verification
- Account blocking and management
- Transaction history tracking
- Commission management
Tech Stack
Runtime: Node.js
Language: TypeScript
Framework: Express.js
Database: MongoDB with Mongoose
Authentication: JWT, bcrypt
Architecture
The backend follows a clean MVC pattern:
- Controllers: Handle incoming requests and responses
- Services: Business logic layer
- Models: Mongoose schemas and data models
- Middleware: Authentication, validation, error handling
- Routes: API endpoint definitions
- Utils: Helper functions and utilities
Security Features
- JWT-based authentication
- Access and refresh token rotation
- Password hashing with bcrypt
- Input validation and sanitization
- Rate limiting
- CORS configuration
- Environment-based secrets