NAD Uploader is a Spring Boot application designed to facilitate the bulk enrollment of bank customers and merchants into the National Alias Directory (NAD) system. It reads customer and merchant data from Excel files, processes the data, and sends it to the NAD API for enrollment. The application tracks successful and failed enrollments by generating CSV reports.
- Bulk Enrollment: Supports enrollment of both individual accounts and merchants.
- Excel File Input: Reads data from
ACCOUNTS.xlsx
andMerchants.xlsx
. - Multi-threading: Allows up to 10 simultaneous operations.
- Error Handling: Gracefully handles missing fields and invalid data.
- CSV Output: Generates separate files for successful and failed enrollments.
- Configurable: Easily update API URLs and authentication tokens in the configuration file.
- Java: 17 or higher
- Spring Boot: 3.3.5
- Dependencies:
- Apache POI for Excel processing
- OpenCSV for CSV file generation
- RestTemplate for HTTP requests
-
Clone the repository:
git clone https://github.com/Tellesy/nadUploader.git cd nadUploader
-
Update the
application.properties
file:- Located in
src/main/resources/application.properties
:api.base-url.accounts=http://your-api-url/accounts/enroll api.base-url.merchants=http://your-api-url/merchants/enroll api.token=Bearer your-auth-token output.accounts-file=accounts_output.csv output.merchants-file=merchants_output.csv
- Located in
-
Build the application:
./gradlew build
-
Run the application:
java -jar build/libs/nad-uploader.jar
Column | Description | Required |
---|---|---|
Name | Account holder's name | Yes |
IBAN | Account IBAN | Yes |
National ID | National ID number | Yes |
Passport No | Passport number | No |
Phone Number | Phone number | No |
Account No | Account number | Yes |
Column | Description | Required |
---|---|---|
Merchant Name | Merchant's name | Yes |
IBAN | Merchant's IBAN | Yes |
National ID | Merchant's national ID | Yes |
Passport No | Passport number | No |
Phone Number | Phone number | No |
Account No | Merchant's account number | Yes |
MCC | Merchant Category Code | Yes |
Trade License | Trade license number | No |
Column | Description |
---|---|
IBAN | The IBAN of the entity |
Alias | The generated alias |
Column | Description |
---|---|
IBAN | The IBAN of the entity |
Response | Error message or response |
Edit the application.properties
file to customize:
- API base URLs for accounts and merchants.
- Authentication token for API requests.
- Output file paths.
- Missing Excel File:
- The application prompts the user to place the required file in the project directory if it is missing.
- Null or Empty Optional Fields:
- Fields such as
passportNo
,phoneNumber
, andtradeLicense
can be left empty or null.
- Fields such as
- Required Fields:
- Missing required fields will result in the row being skipped and the error logged.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add new feature'
- Push your branch:
git push origin feature-name
- Create a pull request.
- After your pull request is reviewed, it will be merged.
This project is licensed under the MIT License. See the LICENSE file for details.
Muhammad Tellesy
GitHub Profile
Feel free to open issues, suggest features, or contribute to the project! 😊