Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nueluzoma/digital_wallet_system
A project showcasing the development of a digital wallet, built with C# and ASP.NET Core, utilizing Entity Framework and MS SQL Server for database operations and Redis for idempotency.
https://github.com/nueluzoma/digital_wallet_system
asp-net-core csharp dotnet entity-framework jwt-authentication paystack-api redis sqlserver
Last synced: about 2 months ago
JSON representation
A project showcasing the development of a digital wallet, built with C# and ASP.NET Core, utilizing Entity Framework and MS SQL Server for database operations and Redis for idempotency.
- Host: GitHub
- URL: https://github.com/nueluzoma/digital_wallet_system
- Owner: NuelUzoma
- License: mit
- Created: 2024-07-19T16:57:50.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-29T00:07:01.000Z (5 months ago)
- Last Synced: 2024-10-13T07:04:16.655Z (3 months ago)
- Topics: asp-net-core, csharp, dotnet, entity-framework, jwt-authentication, paystack-api, redis, sqlserver
- Language: C#
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Digital Wallet System
## Overview
The Digital Wallet System is a secure and efficient platform that allows users to manage their funds. Users can store money, transfer funds, and track their spending, all while ensuring the highest level of security with features like encryption. The system is built using modern technologies to provide a robust and scalable solution.
## Features
- **User Authentication and Authorization**: Secure login and registration using JWT.
- **Wallet Management**: Create and manage digital wallets for users.
- **Funds Transfer**: Transfer funds between wallets securely.
- **Transaction History**: Track all transactions with detailed records.
- **Encryption**: Enhance security with data encryption.
- **Integration with Paystack**: Secure payment gateway integration for deposits.
- **Integration with Redis**: Idempotency key setup to prevent duplicate wallet transfers.## Technology Stack
- **Backend**: C#, ASP.NET Core, Entity Framework Core,
- **Database**: SQL Server
- **Authentication**: JWT
- **Payment Gateway**: Paystack API
- **Idempotency Keys**: Redis## Prerequisites
- .NET 6.0 SDK or later
- SQL Server
- Redis
- Paystack Account (for payment integration)## Database Design
Digital Wallet System uses a relational database with the following structure:
### Entities
| Entity | Attributes |
|--------|------------|
| User | - Id (int, primary key)
- Username (string, unique)
- Email (string, unique)
- Password (string) |
| Wallet | - Id (int, primary key)
- Balance (decimal)
- UserId (int, foreign key to User) |
| DepositTransaction | - Id (int, primary key)
- UserId (int, foreign key to User)
- Amount (decimal)
- Timestamp (DateTime)
- Status (string)
- Reference (string)
- ReferenceHash (string)
- TransactionType (string) |
| TransferTransaction | - Id (int, primary key)
- SenderId (int, foreign key to User)
- RecipientId (int, foreign key to User)
- Amount (decimal)
- Timestamp (DateTime)
- TransactionType (string) |### Relationships
| Relationship | Description |
|--------------|-------------|
| User <-> Wallet | One-to-One |
| User -> DepositTransaction | One-to-Many |
| User -> TransferTransaction (as Sender) | One-to-Many |
| User -> TransferTransaction (as Recipient) | One-to-Many |### Constraints and Behaviors
| Type | Description |
|------|-------------|
| Unique Constraints | - Username in User table
- Email in User table |
| Foreign Key Constraints | - Wallet.UserId to User.Id
- DepositTransaction.UserId to User.Id
- TransferTransaction.SenderId to User.Id
- TransferTransaction.RecipientId to User.Id |
| Delete Behavior | Restrict delete on User for related TransferTransactions and DepositTransactions |## Getting Started
### Clone the Repository
```bash
git clone https://github.com/NuelUzoma/digital-wallet-system.git
cd digital-wallet-system
```### Configuration
#### Database Configuration
Update the connection string in `appsettings.json`:
```json
"ConnectionStrings": {
"DefaultConnection": "Server=your_server;Database=your_database;User Id=your_user;Password=your_password;"
}
```#### JWT Configuration
Update the JWT settings in `appsettings.json`:
```json
"Jwt": {
"Key": "your_secret_key",
"Issuer": "your_issuer",
"Audience": "your_audience"
}
```#### Paystack Configuration
Add your Paystack API keys in `appsettings.json`:
```json
"Paystack": {
"SecretKey": "your_paystack_secret_key"
}
```#### Redis Configuration
```json
"Redis": {
"Configuration": "localhost:6379"
},
```### Migrations and Database Update
Apply migrations and update the database:
```bash
dotnet dotnet-ef migrations add InitialCreate
dotnet dotnet-ef database update
```### Running the Application
```bash
dotnet run
```The application will be available at `http://localhost:5052`.
## API Documentation
The API Documentation is available on [API Documentation](https://documenter.getpostman.com/view/27344999/2sA3kXELSP)
## Security Features
### Data Encryption
All sensitive data, including user passwords and transaction details, are encrypted using industry-standard encryption algorithms.
## Contribution
We welcome contributions! Please follow these steps to contribute:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes and commit them (`git commit -m 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for more details.
---