{"id":1,"date":"2024-09-15T09:00:38","date_gmt":"2024-09-15T09:00:38","guid":{"rendered":"https:\/\/bidesign.net\/?p=1"},"modified":"2024-09-17T14:43:04","modified_gmt":"2024-09-17T14:43:04","slug":"hr-webapp","status":"publish","type":"post","link":"https:\/\/bidesign.net\/?p=1","title":{"rendered":"HR Onboarding and Offboarding Web App"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">Sep 15, 2024<br><br>Our specialists have developed HR Onboarding and Offboarding web app for Entra ID and Hybrid Local AD with flexible Organizational Charts<\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"505\" src=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings-1024x505.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings-1024x505.png 1024w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings-300x148.png 300w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings-768x379.png 768w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings-1536x757.png 1536w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/3_dialog-to-change-groupings.png 1913w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager-1024x453.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager-1024x453.png 1024w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager-300x133.png 300w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager-768x340.png 768w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager-1536x680.png 1536w, https:\/\/bidesign.net\/wp-content\/uploads\/2024\/09\/5_adding-a-new-azure-ad-user-for-manager.png 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This is known that onboarding a new employee to the company&#8217;s working staff and offboarding of leaving members are continuous processes. However, significant parts of these routines can be automated. For instance, the new employee typically joins a specific manager&#8217;s team. This implies we can copy repeating parts of employee&#8217;s attributes such as unit, department, country, subsidiary address and so on from the manager. Also, there are standard routines such as generating new sign-in credentials, joining required security groups, sending a summary report to the manager.<\/p>\n\n\n\n<p>This HR onboarding and offboarding web application solves most frequent problems related to managing employee accounts in Entra ID and Hybrid Local AD.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It provides secure convenient options to quickly create, update, and delete Entra ID and Hybrid Local AD accounts without a need of opening a VPN connection.<\/li>\n\n\n\n<li>The app offers configurable Organizational Charts that provide displaying company hierarchies based on users attributes stored in Azure AD.<\/li>\n\n\n\n<li>Organizational Charts support flexible grouping by multiple user attributes up to 5 levels deep and up to 5 columns long.<\/li>\n\n\n\n<li>Optional operations on local AD are done using proxy-capabilities of Azure Automation Hybrid Worker connected to a VM with access to local AD.<\/li>\n<\/ul>\n\n\n\n<p>More details are available in the&nbsp;<a href=\"https:\/\/github.com\/Paul-Borisov\/nextjs-azure-ad-org-chart-with-hr-onboarding-offboarding\/blob\/main\/docs\/nextjs-entraid-hr-onboarding-offboarding-web-app.pdf\">documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Technical stack<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/Paul-Borisov\/nextjs-azure-ad-org-chart-with-hr-onboarding-offboarding#technical-stack\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Backend<\/h3>\n\n\n\n<p><a href=\"https:\/\/github.com\/Paul-Borisov\/nextjs-azure-ad-org-chart-with-hr-onboarding-offboarding#backend\"><\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next.js 14.2.4, turbo pack, React 18+.<\/li>\n\n\n\n<li>Auth.js v5 for App Router, OAuth2 \/ JWT. Default auth provider is Microsoft Entra ID.<\/li>\n\n\n\n<li>Entra ID with MS Graph REST API, delegated API permissions.<\/li>\n\n\n\n<li>Prisma ORM with SQLITE (default for quick start) \/ Azure SQL \/ Postgres providers.\n<ul class=\"wp-block-list\">\n<li>Also tested with Drizzle ORM. However, it did not support Azure SQL, which I used to host my DB instance. I decided to keep Prisma.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Server-side worker threads (Node.js worker_threads) to support loading optional user images in a non-blocking way.\n<ul class=\"wp-block-list\">\n<li>I noticed that Server Actions have specific problems when they handle multiple simultaneous data fetching requests or database mutations.\n<ul class=\"wp-block-list\">\n<li>For instance, this is possible to make bulk querying of users from Entra ID and save data to cache such as database &#8220;all at once&#8221;.<\/li>\n\n\n\n<li>However, there is no way to make bulk querying of multiple users&#8217; photos. These queries require a separate fetch request per each individual photo.<\/li>\n\n\n\n<li>Cloud services such as Azure Apps limit the max number of simultaneous fetching requests. And, this may cause timeouts (<a href=\"https:\/\/github.com\/nodejs\/undici\/issues\/1531\">nodejs\/undici#1531<\/a>)<\/li>\n\n\n\n<li>This may suspend new requests within the main thread causing undesired delays even though all requests are made in parallel async fetches.<\/li>\n\n\n\n<li>Using server side worker_threads in Next.js solves this problem. It eliminates undesired delays in the main thread.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>They should not be used for making intensive parallel mutations because they tend to block the main thread despite of async processing.<\/li>\n\n\n\n<li>I found it possible to use worker threads in Next.js. They are poorly documented, but working well.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Optional Azure Automation with Hybrid Worker to handle operations on local AD users.<\/li>\n\n\n\n<li>The app is seamlessly deployable on Azure App Service. Recommended App Plan is Linux, 4Gb (1.75GB is not enough).\n<ul class=\"wp-block-list\">\n<li>Make sure you have restricted network access to your App Service for specific virtual networks and\/or IP addresses.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Frontend<\/h3>\n\n\n\n<p><a href=\"https:\/\/github.com\/Paul-Borisov\/nextjs-azure-ad-org-chart-with-hr-onboarding-offboarding#frontend\"><\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>React Hook Forms, Zod<\/li>\n\n\n\n<li>Tanstack Query<\/li>\n\n\n\n<li>next-i18n-router with support of EN, FI, NO locales<\/li>\n\n\n\n<li>Next Themes, Dark and Light themes for all components<\/li>\n\n\n\n<li>UI kits: Radix UI, Fluent UI, Tailwind CSS<\/li>\n\n\n\n<li>PDF printing with no external modules<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Sep 15, 2024 Our specialists have developed HR Onboarding and Offboarding web app for Entra ID and Hybrid Local AD with flexible Organizational Charts This is known that onboarding a new employee to the company&#8217;s working staff and offboarding of leaving members are continuous processes. However, significant parts of these routines can be automated. For [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[22,8,9,19,17,20],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-nextjs-nodejs","tag-azure-entra-id-hybrid-local-ad-azure-sql","tag-nextjs","tag-nodejs","tag-postgre-sql","tag-solution-architecture","tag-sqlite"],"_links":{"self":[{"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bidesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1"}],"version-history":[{"count":5,"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":76,"href":"https:\/\/bidesign.net\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions\/76"}],"wp:attachment":[{"href":"https:\/\/bidesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bidesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bidesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}