# **Intorduction** Leadline is a SaaS platform that consist of diffrent related parts. We created schemas below to represent this relation and overall project modules. **API documentation:** http://documentation.leadline.io.s3-website-us-east-1.amazonaws.com/apiv2/ **API OPS Documentation:** http://documentation.leadline.io.s3-website-us-east-1.amazonaws.com/api-ops/ **UI Documentation (Outdated. Re-design in progress):** http://documentation.leadline.io.s3-website-us-east-1.amazonaws.com/ui-components **Schema 01 - Overall project Architecture** This schema represents overall project architecture and relations between different system modules. To avoid a mess we removed all non-valuable blocks (for example: AWS ECR, CloudWatch, VPC...). ![](https://i.imgur.com/fXycv9W.jpg) Use this link to access: [Schema 01 - Overall project Architecture](https://drive.google.com/file/d/1QKhMBtE-52Jt_BPLBFRbeMbP4EUT192v/view?usp=sharing) # **Repositories** Project consist of a following repositories: **saas-user-portal saas-api-node saas-ops-portal saas-ops-api saas-app-positions saas-app-message-flow-editor saas-app-administration saas-app-landing-pages saas-app-questionnaire saas-app-messenger saas-svc-messenger saas-email-templates saas-web-assets saas-app-ui-components saas-integration-ess saas-integration-lonestar** **saas-user-portal** The entry point to the user portal, it is built on the Micro Frontend architecture and serves to load certain repositories depending on the route: saas-app-positions, saas-app-message-flow-editor, saas-app-administration, saas-app-landing-pages, saas-app-messenger **saas-app-positions** Contain source code of any functionality that is related to the position management (positions list, campaigns, questionnaire builder, reports, etc...) **saas-app-message-flow-editor** Allows us to edit auto messages flows. **saas-app-administration** Contain source code of any functionality that is related to administrative access (profile settings, company settings, hiring stages billing, etc… ) **saas-app-landing-pages** Contain source code of a landing page builder. **saas-app-questionnaire** Candidates questionnaire that forms for each candidate on a “Join Us” button press. **saas-app-messenger** Contain source code of the chat functionality. **saas-svc-messenger** Contain source code of lambda functions for automessages . It represented by 5 lambda functions (2 for message sending and candidates status update, 1 for db collaboration and 1 for API, 1 for muultilanguage) **saas-email-templates** Convenient way to generate templates for mailing. Templates are rendered and published on AWS SES and than can be triggered via API with SDK. **saas-web-assets** Contains assets for other frontend repositories. **saas-integration-ess** Lambda function for ESS integration with ATS WILL SUB + **saas-integration-lonestar** Lambda function for Lonestar integration with ATS Avionte **saas-api-node** Root API contains all the system main logic. **saas-ops-portal** Contains source code of the unite system configurator **saas-ops-api** API for OPS portal **saas-app-ui-components** UI Components library. Some other repositories are on github but they are not yet used or already deprecated. # **Deployment** Set automatically on EACH Wednesday and oriented to the branch name in each repository dev, demo, prod (CI/CD). All frontend repos and also web assets are deployed on AWS S3. Also with **saas-app-landing-pages** all LP templates are also deployed. **saas-api-node** and **saas-ops-api** deployed on ECS and run inside docker with images stored ECR. In case of DB structure change, it also runs a DB migration automatically. **saas-svc-messenger** - is deployed via Serverless framework as separate lambda functions (in case of big amount of lambda it is also stored on AWS S3) **saas-email-templates** - templates are published on AWS SES/ **Schema 2 - Deployment schema** It represents a deployment (CI/CD) process in the system. ![Deployment schema](https://i.imgur.com/TD45mIp.jpg) Use this link to access: [Schema 02 - Deployment Schema](https://drive.google.com/file/d/1nyVKD5gsmbTPTboY8FPhVDqXQqBnJ7Gn/view?usp=sharing) # **AWS S3 Structure** AWS S3 has a following structure: **Bucket portal.cloud** - contains builds of different saas-user-portal repo versions. **App** itself contains configuration to run other repos and certain portal features **Bucket cdn1.cloud** contains 3 folders: ***apps/*** contains builds of different app versions that are further be injected in the portal or landing pages (saas-app-positions,saas-app-message-flow-editor, saas-app-administration, saas-app-landing-pages, saas-app-questionnaire, saas-app-messenger) ***assets/*** contains all the assets used in the system ***pages/*** contains templates for LP editor **Bucket files.cloud** contains a system and uploaded by the candidate files. **Bucket ops.cloud** - contains version builds of the saas-ops-portal **Bucket jobs.cloud** - landing pages are loaded here after the position is published **Bucket Business** - contains welcome site. Also there exist buckets that are not used anymore or was created by aws to support system features. **Schema 3 - S3 Structure Schema** ![](https://i.imgur.com/FnRm69g.jpg) Use this link to access: [Schema 03 - S3 Structure Schema](https://drive.google.com/file/d/1-0BUivTwXlKxrcH_nfXNb67A911vRvPS/view?usp=sharing) **Schema 04 - S3 Final User Interaction Schema** Here is represented interaction with a final user. AWS Cloud Front required for DNS maping with a bucket required and AWS ACM required for traffic encryption and establishing TLS(SSL) certification ![](https://i.imgur.com/03DgfaO.jpg) Use this link to access: [Schema 04 - S3 Final User Interaction Schema](https://drive.google.com/file/d/1CrDMYEtS3T56TR0eVE1djtG05k2fnr1f/view?usp=sharing) # **ECS cluster structure** **Schema 05 - ECS cluster structure** ECS cluster running on EC2 Linux Networking type Services stored inside cluster are APIV2 and API OPS. Services runs tasks from the docker container and re-run them in case of failure. Also Auto Scalig Group for a resourses scaling set to automatically rise new EC2 instances on lack of resourses and redundant ones will be stopped. It reacts to Cloud Watch Alarm and its sugnals to values. 80% > MemoryUtilization > 30% and 80% > CPUUtilization > 30. API access performed via Application Load Balancer, and traffic encryption via AWS ACM. ![](https://i.imgur.com/58aYWV0.png) Use this link to access: [Schema 05 - ECS cluster structure](https://drive.google.com/file/d/1RcFyHCrSBnfjObant225R2LohbAow9HF/view?usp=sharing) # **Short system flow** Client(company manager or recruiter)provides all the required data and creates landing pages, questionnaire and campaings.LP uploads to S3(jobs-cloud -> company name -> landing-page-slug) and becomes publically visible. After candidate clicks on a "join us" button it will load a React app with a questionnaire. In case candidates results will match minimum requirements candidate will be stored in system and appear on recruiter dashboard. In case configs exist a webhook will be sent to url(commonly used for ATS integration). Also an auto messages flow will be triggered to a hiring stage status in case it was previously set. This flow includes only most important system aspects. Generally system has much more functionality (for example: Reports, scheduling meetings, tags, filters, messaging etc...) # **Auto messages** As auto messages flow is quite comprehensive we provided additional schema for that separately **Schema 06 - Auto-messages flow** ![](https://i.imgur.com/Qw4A4BZ.png) Use this link to access: [Schema 06 - Auto-messages flow](https://drive.google.com/file/d/1GWJRaJE5eihNBzl4KZFX8DDxEYo7_ENJ/view?usp=sharing) # **Scheduling** As a recruiter, company manager or owner, I can customize my meeting schedule and connect my Google or Outlook calendar. Based on these settings, I can schedule appointments with candidates. After scheduling a meeting with the candidate, a notification message with a link will be sent to his email and phone for planning the meeting, where he will be given the opportunity to choose a convenient time for him from the recruiter's schedule (or ...). After this step, the meeting will be created in our system and the corresponding event will be created depending on the selected calendar. ![](https://i.imgur.com/5k2fo8f.jpg) Use this link to access: [Schema 07 - Scheduling](https://drive.google.com/file/d/1KK152XgEBObHwDxJN-tl8vUaopX_nlmz/view?usp=sharing)