# mrr4ngel/awardsapi architecture

> Architecture diagram of the GitHub repository mrr4ngel/awardsapi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrr4ngel/awardsapi
- Repository: https://github.com/mrr4ngel/awardsapi

## Overview

API Awards is a Spring Boot API for creating and storing wallets, querying balances and tokens, generating award NFTs, deploying them to a blockchain, and returning token imagery. Its documented security capability encrypts private keys with AES before database storage. The tree identifies controllers, wallet service, persistence, and encryption modules, but no source excerpts were provided; internal call ownership and integrations therefore remain unverified, and the graph only asserts documented API behavior.

Main entry points: [`demo/src/main/java/com/example/walletapi/controllers`](https://github.com/mrr4ngel/awardsapi/tree/main/demo/src/main/java/com/example/walletapi/controllers) (HTTP API), [`demo/src/main/java/com/example/walletapi/repositories/KeyRepository.java`](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/repositories/KeyRepository.java) (Wallet key records), [`demo/src/main/java/com/example/walletapi/services/WalletService.java`](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/services/WalletService.java) (Wallet service), [`demo/src/main/java/com/example/walletapi/controllers/DeployController.java`](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/DeployController.java) (NFT deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API surface"]
  node_api["HTTP API"]
end

subgraph group_awards["Award lifecycle"]
  node_award_generation["Award generation"]
  node_nft_assets["Award assets"]
  node_nft_deploy["NFT deployment"]
  node_token_image["Token image response"]
end

subgraph group_wallet["Wallet and security"]
  node_wallet_ops["Wallet operations"]
  node_wallet_generation["Wallet generation"]
  node_wallet_service["Wallet service<br/>[WalletService.java]"]
  node_aes["AES encryption<br/>[AESUtil.java]"]
end

subgraph group_persistence["Persistence and chain"]
  node_award_records["Award records"]
  node_key_records["Wallet key records<br/>[KeyRepository.java]"]
  node_mariadb[("MariaDB")]
  node_blockchain["Blockchain middleware"]
end

node_consumer(("API consumer"))

node_consumer -->|"requests"| node_api
node_api -->|"offers wallet query"| node_wallet_ops
node_api -->|"offers wallet creation"| node_wallet_generation
node_api -->|"offers NFT generation"| node_award_generation
node_api -->|"offers NFT deploy"| node_nft_deploy
node_api -->|"offers token image"| node_token_image
node_wallet_ops -.->|"queries wallets"| node_key_records
node_wallet_service -.->|"stores keys"| node_key_records
node_key_records -.->|"stores records"| node_mariadb
node_award_records -.->|"stores awards"| node_mariadb
node_wallet_service -.->|"encrypts private keys"| node_aes
node_nft_deploy -.->|"deploys awards"| node_blockchain

click node_api "https://github.com/mrr4ngel/awardsapi/tree/main/demo/src/main/java/com/example/walletapi/controllers"
click node_wallet_ops "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/WalletController.java"
click node_wallet_generation "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/WalletControllerGeneration.java"
click node_wallet_service "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/services/WalletService.java"
click node_aes "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/utils/AESUtil.java"
click node_award_generation "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/AwardController.java"
click node_nft_assets "https://github.com/mrr4ngel/awardsapi/tree/main/demo/src/main/resources/images"
click node_nft_deploy "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/DeployController.java"
click node_award_records "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/repositories/AwardRepository.java"
click node_key_records "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/repositories/KeyRepository.java"
click node_token_image "https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/AwardController.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api toneBlue
class node_award_generation,node_nft_assets,node_nft_deploy,node_token_image toneAmber
class node_wallet_ops,node_wallet_generation,node_wallet_service,node_aes,node_consumer toneMint
class node_award_records,node_key_records,node_mariadb,node_blockchain toneRose
```

## Components

### API surface

- [HTTP API](https://github.com/mrr4ngel/awardsapi/tree/main/demo/src/main/java/com/example/walletapi/controllers): `demo/src/main/java/com/example/walletapi/controllers`

### Award lifecycle

- [Award generation](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/AwardController.java): `demo/src/main/java/com/example/walletapi/controllers/AwardController.java`
- [Award assets](https://github.com/mrr4ngel/awardsapi/tree/main/demo/src/main/resources/images): `demo/src/main/resources/images`
- [NFT deployment](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/DeployController.java): `demo/src/main/java/com/example/walletapi/controllers/DeployController.java`
- [Token image response](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/AwardController.java): `demo/src/main/java/com/example/walletapi/controllers/AwardController.java`

### Wallet and security

- [Wallet operations](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/WalletController.java): `demo/src/main/java/com/example/walletapi/controllers/WalletController.java`
- [Wallet generation](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/controllers/WalletControllerGeneration.java): `demo/src/main/java/com/example/walletapi/controllers/WalletControllerGeneration.java`
- [Wallet service](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/services/WalletService.java): `demo/src/main/java/com/example/walletapi/services/WalletService.java`
- [AES encryption](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/utils/AESUtil.java): `demo/src/main/java/com/example/walletapi/utils/AESUtil.java`

### Persistence and chain

- [Award records](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/repositories/AwardRepository.java): `demo/src/main/java/com/example/walletapi/repositories/AwardRepository.java`
- [Wallet key records](https://github.com/mrr4ngel/awardsapi/blob/main/demo/src/main/java/com/example/walletapi/repositories/KeyRepository.java): `demo/src/main/java/com/example/walletapi/repositories/KeyRepository.java`
- **MariaDB**
- **Blockchain middleware**

### Other components

- **API consumer**

## Connections

- API consumer → HTTP API: requests (evidence: `README.md`)
- HTTP API → Wallet operations: offers wallet query (evidence: `README.md`)
- HTTP API → Wallet generation: offers wallet creation (evidence: `README.md`)
- HTTP API → Award generation: offers NFT generation (evidence: `README.md`)
- HTTP API → NFT deployment: offers NFT deploy (evidence: `README.md`)
- HTTP API → Token image response: offers token image (evidence: `README.md`)
- Wallet operations → Wallet key records: queries wallets
- Wallet service → Wallet key records: stores keys
- Wallet key records → MariaDB: stores records
- Award records → MariaDB: stores awards
- Wallet service → AES encryption: encrypts private keys
- NFT deployment → Blockchain middleware: deploys awards
