Virtual Business Card Swapping with .NET MAUI + Azure Cognitive Services Form Recognizer
Tags: azuretrialhack, maui, android
Published: 2022-03-08 21:57:48

[Instructions]: # (To submit to the Microsoft Azure Trial Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
**Motivation**
I'm currently part of the development team at [Kuvio Creative](https://kuv.io/), and we've recently been working on a web/MAUI Blazor hybrid app called [My Contact Network](https://mycontactnetwork.com/). So once I read about this hackathon, my first thought was to finally bring to life one of my favorite ideas for this app.

My Contact Network is a native mobile & web contact management app for those who want to keep their contacts' information always up to date. To connect with or invite someone to the platform, you simply type in their email address or phone number, and if they have you in their contacts list as well, you'll automatically swap real-time contact info from then on, granting you an always-current contact list.

With that in mind, my idea was to use the Azure Cognitive Services Form Recognizer library to upgrade the typical "business card swap" that occurs around the conference table. By simply taking a photo of the business card you just received, all the info from the card will be mapped automatically to a new contact in My Contact Network, such as first name, last name, company name, department, phones, emails, etc. This will kick off the auto-connection process in the app as well, causing the new "virtual" business cards to be digitally swapped instantaneously.

**Implementation**
To validate the idea I've created the Business Card Scan app so I can later migrate the feature to My Contact Network. To make the migration process even easier, I decided to create the app with exactly the same stack we're using for My Contact Network: A MAUI Blazor app + .NET 6 Minimal API.


![Solution](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anfmko0m9i0tludxazq3.png)
 

The app is pretty clean and straightforward -- there is a single page to take a photo using MAUI Essentials native functionality on either iOS or Android, and then upload it to the API, where it's processed and all the info extracted is returned and displayed.


![App Home](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8616g42a7uwh46q1vw4.jpeg)

[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)


### Submission Category: AI Aces
Resources:
![Azure resources](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0oz96uqo7egwzmpkvn9.png)
 
[Note]: # (AI Aces, Computing Captains, Low-Code Legends, Java Jackpot, or Wacky Wildcards:)


### Link to Code on GitHub
{% github https://github.com/antoniocorreia/business-card-scan %}
[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
[Note]: # (Your repository must include a README)
[Note]: # (You must use and list a permissive license for your code: MIT, Apache-2)


### Additional Resources / Info

- Prebuilt Business Card Model [docs](https://github.com/antoniocorreia/azure-form-recognizer-prebuilt-business-card-model)
- Console app mapping all the available fields on the prebuilt business card model documentation [GitHub](https://github.com/antoniocorreia/azure-form-recognizer-prebuilt-business-card-model)
- [![Youtube simulation](http://img.youtube.com/vi/frpQ1pH9Hfk/0.jpg)](http://www.youtube.com/watch?v=frpQ1pH9Hfk "Business Card Scan")

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. Prizes for winning projects with multiple collaborators will be sent to the person who posts this submission and they will distribute the prize evenly. DEV will not split prizes as per our rules)

[Reminder]: # (Submissions are due on March 8, 2022 @ 11:59 PM UTC)