microsoft / hack-together

Hack Together: Microsoft Graph and .NET is a hackathon for .NET developers to learn Microsoft Graph and Microsoft 365.
MIT License
523 stars 85 forks source link

Project: Magic Note app to plan the day efficiently with AI & MS Graph [Completed] #92

Open aksoftware98 opened 1 year ago

aksoftware98 commented 1 year ago

Project name

Magic Note - Hack Together

Description

Magic Note allows users to plan their days in a joyful and productive way with the power of Microsoft Graph and AI (Of course the implementation is entirely in .NET)

GET IT NOW FOR WINDOWS

Windows

[v1.1.4 Hackathon version for Windows]

Windows App Overview

The Windows app overview: WinUI

The Problem

Most productive people would like to have the upcoming busy day planned carefully the night before. The process is needed but it's tough, why? Well! we have the tasks we want to do in mind but just thoughts, that's why we take notes and create To-Do lists. The problem happens we open the calendar and the To-Do lists app on our smart device and start adding some important events, meetings, tasks, or other reminders for the upcoming day.

How do users do it without Magic Note? Let's see the steps The 10 things to do the next day (3 events, 2 meetings, 5 to-do items) All thoughts in the brain yet

The process is boring and inefficient.

Writing down everything in mind helps us express our ideas and keep them saved outside our minds, many people write their diaries with a pen and a sheet of paper, that's quick and indestructible. But the paper won't send me a notification 1 hour before the event or send an email for the person I want to meet with if I typed the meeting on that piece of paper.

Here is where Magic Note comes into play. Let's see how the same will be achieved 10x more efficiently using the Magic Note

The Solution

The app is only a single big text box on the left, that's it all. The user starts typing what he/she is up to for the next day in their daily conversational English as if the user is writing his/her diary or a list of tasks on a sheet of paper. The writing is quick, with no text fields to fill, no dates to select, and no save buttons to click. List everything in mind in that text box. Once everything is done, the user clicks Plan. Magic Note will send that text to the server, understand its content using AI (SEE BELOW FOR TECHNOLOGY DETAILS), and build a plan out of the ideas inside (creating an event at this time, creating a meeting with a person, adding a to-do item ..etc.). After the server prepares the plan, the user will see a set of cards each representing either an event to be added to the calendar, scheduling a meeting with someone, or adding a to-do item. Instead of the user having to open every app (Calendar, Teams, and To-Do) to insert them, the user now has a plan in front and he/she should decide if this is correct and make adjustments if needed. Once the user is satisfied with the plan, click Submit and the Magic Note will use Microsoft Graph to populate all this stuff. The user starts the next day with the To-Do app populated, the calendar full of the events and the meeting needed to be done in that day.

How the App Technically Works with Graph API

Magic note technical diagram

Microsoft Graph API which is the core of the #HackTogether hackathon is used as a main component in the system. The majority of users worldwide use Microsoft accounts to manage their meetings, and events, store contacts, and keep tracking of their progress using Microsoft To-Do but the process of adding those resources through this app on a daily bases and in a consistent fashion is tough. So, how Magic Note is utilizing Graph to make people more productive?

  1. When the user mentions in the note that he/she wants to schedule a meeting and mentions a name, the app during the planning the app is trying to search for the mentioned names in the Contacts of the user, and if Graph returns that the name is found, it automatically populates the email and the name in the result.
  2. After the user reviews the plan and makes sure everything is great, the user clicks Looks good to me, then the app is using Graph API to:
    • Fetch the user timezone
    • Fetch the Tasks list in the user's to-do
    • Create a batch content
    • Group all the requests to submit the To-Do items in the batch
    • Group all the requests to add the meetings to the batch
    • Group all the requests to submit the events in the batch
    • Post the batch in a single request

Technologies Used

Because this Hackathon is for fun, learning, and everything Microsoft and because I'm the biggest Microsoft fan ever. I decided to build this demo strictly for MICROSOFT PEOPLE (Users and Developers) 😂😎 The is built with .NET and Azure and divided into the following:

More details about the architecture are available in the repo 🚀🚀🚀

Repo URL

https://github.com/aksoftware98/hack-together23

Team members

Ahmad Mozaffar (GitHub: aksoftware98)

waldekmastykarz commented 1 year ago

Awesome and great to see the cool UI! Looking forward to seeing the final result!

aksoftware98 commented 1 year ago

Thanks! Just have a question, I left the client-ids in the code for the time being but how you are going to run the app? I will release a windows package and an APK for Surface Duo, they will be in the releases of the GitHub repo. The API will be published to Azure too. So my question are you going to use the finalized products? or clone the repo and run the project from with VS? and if this is the case how do you recommend sharing the secrets?

waldekmastykarz commented 1 year ago

For a desktop app, client ID is considered a public value so you don't have to worry about keeping it a secret. If you've got an app that we can install/run we'll use that. Otherwise, we'll try to run it ourselves.

aksoftware98 commented 1 year ago

No, the client Id is fine I mean there is a secret (subscription key) of the Azure Conversation Language Service. But yeah that's fine, there will be a workable version and the API will be hosted on Azure. I will keep the key in the code for a couple of days after the hackathon, then I can regenerate a new one.

waldekmastykarz commented 1 year ago

As long as you mention we need a key and where to enter it in the code, I'm sure we'll figure it out 💪

aksoftware98 commented 1 year ago

The app is completed and the repo is up-to-do with all the required explanations. Thanks for the hackathon idea, it pushed me to do this thing after planning it for long-time