A web application built for managing and synchronizing email data from Outlook using Node.js and Elasticsearch. Features include OAuth integration, real-time data synchronization, and scalable database design.
To run this project, ensure you have the following installed:
Open a browser and go to the Azure Active Directory admin center. Sign in using either a personal Microsoft account or a Work or School Account.
In the left-hand navigation pane, select Azure Active Directory, then under Manage, select App registrations.
Click on New registration. On the Register an application page, provide the following details:
Email Sync Engine
Web
and enter http://localhost:3000/auth/redirect
.Click Register. On the application's overview page, note down the Application (client) ID as you will need it later.
Navigate to Certificates & secrets under Manage. Click on New client secret, provide a description, select an expiration period, and click Add.
Copy the client secret value. Ensure you save it as it will not be shown again.
Important: The client secret value is shown only once, so make sure to copy it.
Go to API permissions in your Email Sync Engine
app and select Microsoft Graph. Add the following delegated permissions:
User.Read
Calendars.ReadWrite
MailboxSettings.Read
Mail.Read
Mail.ReadWrite
openid
profile
offline_access
After adding these permissions, click on Grant admin consent for Default Directory.
example.env
file to .env
..env
file with the following changes.docker-compose up
. This will set up Elasticsearch and run the app in a container.docker exec -it email-engine-app /bin/sh
.setup
directory with cd setup
and run node createIndices.js
.http://localhost:3000
.By following these steps, you'll have the Email Sync Engine up and running with the necessary configurations and prerequisites.