diff --git a/services/orchestrator-service/LICENSE b/services/orchestrator-service/LICENSE new file mode 100644 index 0000000..769e212 --- /dev/null +++ b/services/orchestrator-service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2024-2026] [SourceFuse Technologies] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/services/orchestrator-service/README.md b/services/orchestrator-service/README.md index 0b1e17f..42a088c 100644 --- a/services/orchestrator-service/README.md +++ b/services/orchestrator-service/README.md @@ -1,19 +1,19 @@ -# [@arc-saas/orchestrator-service](https://github.com/sourcefuse/arc-saas/tree/master/services/audit-service) +# [@sourceloop/ctrl-plane-orchestrator-service](https://github.com/sourcefuse/arc-saas/tree/master/services/orchestrator-service)
- - + + - + - - + + - + @@ -22,23 +22,23 @@ ## Overview -The `@arc-saas/orchestrator-service` is designed to provide the standard interfaces and endpoint to handle the events sent from / to a SaaS Control Plane. This acts as a orchestrator for the event targets/processors. +The `@sourceloop/ctrl-plane-orchestrator-service` is designed to provide the standard interfaces and endpoint to handle the events sent from / to a SaaS Control Plane. This acts as a orchestrator for the event targets/processors. Consider the following example architecture that uses Amazon EventBridge at the center to pass on the events, and this Orchestrator service is used as its initial target, so that the events can then be sent to the expected candidates to process the event. -![Example Architecture with Orchestrator Service in Use](./docs/example-architecture.png) +![Example Architecture with Orchestrator Service in Use](./docs/orchestrator.png) Above example is of a tenant provisioning event flow, as shown it originates from a control plane service called tenant management service and then when it's received to the Amazon EventBridge, it passes it to the orchestrator service which can run any bussiness logic before it's sent for processing (the example illustrates starting the codebuild or jenkins job conditionally based on the event). Further code examples in this README will take this same reference. ## Installation ```bash -npm i @arc-saas/orchestrator-service +npm i @sourceloop/ctrl-plane-orchestrator-service ``` ## Getting Started -You can start using `@arc-saas/orchestrator-service` in just 4 steps: +You can start using `@sourceloop/ctrl-plane-orchestrator-service` in just 4 steps: 1. [Bind Component](#bind-component) 2. [Configure the Providers and Services](#configure-the-providers-and-services) @@ -50,7 +50,7 @@ Bind the `OrchestratorServiceComponent` to your application constructor as shown Mainly the `EventController` that provides the endpoint to receive the events. ```ts -import {OrchestratorServiceComponent} from '@arc-saas/orchestrator-service'; +import {OrchestratorServiceComponent} from '@sourceloop/ctrl-plane-orchestrator-service'; // ... export class MyApplication extends BootMixin( ServiceMixin(RepositoryMixin(RestApplication)), @@ -102,7 +102,7 @@ Here's how you can bind your custom orchestrator service: import { OrchestratorServiceComponent, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; import {YourOrchestratorService} from './services'; @@ -137,7 +137,7 @@ import { TenantProvisioningHandler, TenantProvisioningSuccessHandler, TenantDeploymentHandler, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; export interface AWSEventBridgeInterface { version: string; @@ -212,7 +212,7 @@ Here's how you can bind your builder service implementation: import { OrchestratorServiceComponent, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; import {AwsCodeBuildService} from './services'; @@ -238,7 +238,7 @@ export class OrchestratorApplication extends BootMixin( ```ts import {injectable, BindingScope} from '@loopback/core'; import {AnyObject} from '@loopback/repository'; -import {BuilderServiceInterface} from '@arc-saas/orchestrator-service'; +import {BuilderServiceInterface} from '@sourceloop/ctrl-plane-orchestrator-service'; import { CodeBuildClient, StartBuildCommand, @@ -290,7 +290,7 @@ Here's how you can bind your tier details provider: import { OrchestratorServiceComponent, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; import {TierDetailsProvider} from './providers'; @@ -315,7 +315,7 @@ export class OrchestratorApplication extends BootMixin( ```ts import {injectable, BindingScope, Provider} from '@loopback/core'; -import {TierDetailsFn} from '@arc-saas/orchestrator-service'; +import {TierDetailsFn} from '@sourceloop/ctrl-plane-orchestrator-service'; import {marshall, unmarshall} from '@aws-sdk/util-dynamodb'; import {DynamoDBClient, QueryCommand} from '@aws-sdk/client-dynamodb'; @@ -376,7 +376,7 @@ For example, In this provider you can implement the logic of invoking the [tier import { OrchestratorServiceComponent, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; import {TenantProvisioningHandlerProvider} from './providers'; @@ -409,7 +409,7 @@ import { TenantProvisioningHandler, TierDetailsFn, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; export type ProvisioningInputs = { planConfig: AnyObject; @@ -486,7 +486,7 @@ For example, In this provider you can implement any business logic you want to e import { OrchestratorServiceComponent, OrchestratorServiceBindings, -} from '@arc-saas/orchestrator-service'; +} from '@sourceloop/ctrl-plane-orchestrator-service'; import {TenantDeprovisioningHandlerProvider} from './providers'; @@ -535,7 +535,7 @@ The way of binding this provider is similar to other provider, just the binding ## Deployment -The @arc-saas/orchestrator-service can be deployed in various ways, including as a serverless application. Here's how you can set it up for serverless deployment, specifically for AWS Lambda. +The @sourceloop/ctrl-plane-orchestrator-service can be deployed in various ways, including as a serverless application. Here's how you can set it up for serverless deployment, specifically for AWS Lambda. ### Serverless Deployment diff --git a/services/orchestrator-service/docs/example-architecture.png b/services/orchestrator-service/docs/example-architecture.png deleted file mode 100644 index 1338b1f..0000000 Binary files a/services/orchestrator-service/docs/example-architecture.png and /dev/null differ diff --git a/services/orchestrator-service/docs/orchestrator.png b/services/orchestrator-service/docs/orchestrator.png new file mode 100644 index 0000000..3fdb592 Binary files /dev/null and b/services/orchestrator-service/docs/orchestrator.png differ diff --git a/services/orchestrator-service/package.json b/services/orchestrator-service/package.json index 57e602c..ca6cfc0 100644 --- a/services/orchestrator-service/package.json +++ b/services/orchestrator-service/package.json @@ -1,7 +1,7 @@ { "name": "@sourceloop/ctrl-plane-orchestrator-service", "version": "0.1.0", - "description": "ARC SaaS Orchestrator service", + "description": "ARC SaaS Orchestrator service.", "keywords": [ "loopback-microservice", "loopback", diff --git a/services/subscription-service/LICENSE b/services/subscription-service/LICENSE new file mode 100644 index 0000000..769e212 --- /dev/null +++ b/services/subscription-service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2024-2026] [SourceFuse Technologies] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/services/tenant-management-service/LICENSE b/services/tenant-management-service/LICENSE new file mode 100644 index 0000000..769e212 --- /dev/null +++ b/services/tenant-management-service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2024-2026] [SourceFuse Technologies] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.