Skip to content

Commit 8af507b

Browse files
committed
feat(ci-cd): initial repo setup
gh-00
1 parent 2027938 commit 8af507b

File tree

1 file changed

+2
-317
lines changed

1 file changed

+2
-317
lines changed

README.md

Lines changed: 2 additions & 317 deletions
Original file line numberDiff line numberDiff line change
@@ -1,323 +1,8 @@
1-
# Sourceloop
2-
3-
[![LoopBack](<https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)-@2x.png>)](http://loopback.io/)
4-
5-
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
6-
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
7-
8-
![@loopback/core](https://img.shields.io/github/package-json/dependency-version/sourcefuse/loopback4-microservice-catalog/@loopback/core?filename=packages%2Fcore%2Fpackage.json)
9-
10-
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=sourcefuse_loopback4-microservice-catalog)](https://sonarcloud.io/summary/new_code?id=sourcefuse_loopback4-microservice-catalog)
11-
12-
<!-- docs-index-start -->
13-
14-
The `Sourceloop` is a collection of pre-built microservices that aim to reduce time to market for enterprise projects. Large enterprises usually face a similar set of challenges when developing cloud native platforms as part of digital transformation efforts or the creation of new products. The services are implemented as [LoopBack Extensions](https://loopback.io/doc/en/lb4/Extending-LoopBack-4.html), allowing you to install them into existing LoopBack applications or use the [LoopBack Command-line interface](https://loopback.io/doc/en/lb4/Command-line-interface.html) to generate standalone services. Our recommended approach is to deploy these services as standalone micro-services in Docker.
15-
16-
The current catalog consists of the following services:
17-
18-
- [audit-service](services/audit-service)
19-
- [authentication-service](services/authentication-service)
20-
- [in-mail-service](services/in-mail-service)
21-
- [notification-service](services/notification-service)
22-
- [scheduler-service](services/scheduler-service)
23-
- [video-conferencing-service](services/video-conferencing-service)
24-
- [bpmn-service](services/bpmn-service)
25-
- [chat-service](services/chat-service)
26-
- [feature-toggle-service](services/feature-toggle-service)
27-
- [payment-service](services/payment-service)
28-
- [search-service](services/search-service)
29-
30-
This repository also contains a set of example projects in the [sandbox](sandbox) directory that can be run from `docker-compose`.
31-
32-
- [audit-ms-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/audit-ms-example)
33-
- [auth-multitenant-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/auth-multitenant-example)
34-
- [auth-ms-basic-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/auth-ms-basic-example)
35-
- [notification-socket-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/notification-socket-example)
36-
- [workflow-ms-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/workflow-ms-example)
37-
- [audit-ms-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/audit-ms-example)
38-
- [in-mail-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/in-mail-example)
39-
- [scheduler-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/scheduler-example)
40-
- [video-conferencing-ms-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/video-conferencing-ms-example)
41-
- [chat-notification-pubnub-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/chat-notification-pubnub-example)
42-
- [feature-toggle-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/feature-toggle-example)
43-
- [payment-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/payment-example)
44-
- [search-client-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/search-client-example)
45-
- [search-ms-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/search-ms-example)
46-
- [user-onboarding-example](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/sandbox/user-onboarding-example)
47-
48-
## Table of Contents
49-
50-
- [Sourceloop](#Sourceloop)
51-
- [Table of Contents](#table-of-contents)
52-
- [Long Term Support](#long-term-support)
53-
- [Documentation](#documentation)
54-
- [Getting Started](#getting-started)
55-
- [Production Deployment](#production-deployment)
56-
- [Related Projects](#related-projects)
57-
- [Feedback](#feedback)
58-
- [Contributing](#contributing)
59-
- [Code of Conduct](#code-of-conduct)
60-
- [License](#license)
61-
62-
### Long Term Support
63-
64-
TODO: Establish LTS policy or document here that the catalog is still in development and has not reached an LTS release yet.
65-
66-
| Version | Status | Published | EOL |
67-
| ------- | ------ | --------- | --- |
68-
| | | | |
69-
70-
### Documentation
71-
72-
- [LoopBack| LoopBack Documentation](https://loopback.io/doc/en/lb4/)
73-
- [Extending LoopBack | LoopBack Documentation](https://loopback.io/doc/en/lb4/Extending-LoopBack-4.html)
74-
75-
### Getting Started
76-
77-
For specifics of installing and configuring a particular service, please refer to that service's documentation. The guide here is intended to show the general method for installing and configuring the services. We are going to utilize a fictional service, `@sourceloop/example-service`, as an example. All services load their environment configurations using `dotenv` and `dotenv-extended`.
78-
79-
Install the Loopback4 CLI
80-
81-
```bash
82-
npm install -g @loopback/cli
83-
```
84-
85-
Generate an application (If you don't have one already).
86-
87-
```bash
88-
lb4 app
89-
? Project name: example-application
90-
? Project description: Example Application For SourceLoop
91-
? Project root directory: example-application
92-
? Application class name: ExampleApplicationApplication
93-
? Select features to enable in the project Enable eslint, Enable prettier, Enable mocha, Enable loopbackBuild, Enable vs
94-
code, Enable docker, Enable repositories, Enable services
95-
force .yo-rc.json
96-
create .eslintignore
97-
create .eslintrc.js
98-
create .mocharc.json
99-
create .npmrc
100-
create .prettierignore
101-
create .prettierrc
102-
create DEVELOPING.md
103-
create package.json
104-
create tsconfig.json
105-
create .vscode\launch.json
106-
create .vscode\settings.json
107-
create .vscode\tasks.json
108-
create .gitignore
109-
create .dockerignore
110-
create Dockerfile
111-
create README.md
112-
create public\index.html
113-
create src\application.ts
114-
create src\index.ts
115-
create src\migrate.ts
116-
create src\openapi-spec.ts
117-
create src\sequence.ts
118-
create src\controllers\index.ts
119-
create src\controllers\ping.controller.ts
120-
create src\controllers\README.md
121-
create src\datasources\README.md
122-
create src\models\README.md
123-
create src\repositories\README.md
124-
create src\__tests__\README.md
125-
create src\__tests__\acceptance\home-page.acceptance.ts
126-
create src\__tests__\acceptance\ping.controller.acceptance.ts
127-
create src\__tests__\acceptance\test-helper.ts
128-
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
129-
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
130-
npm notice created a lockfile as package-lock.json. You should commit this file.
131-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
132-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
133-
npm WARN example-application@0.0.1 No license field.
134-
135-
added 637 packages from 816 contributors and audited 646 packages in 16.345s
136-
137-
87 packages are looking for funding
138-
run `npm fund` for details
139-
140-
found 0 vulnerabilities
141-
142-
143-
Application example-application was created in example-application.
144-
145-
Next steps:
146-
147-
$ cd example-application
148-
$ npm start
149-
```
150-
151-
Install `dotenv`, `dotenv-extended` and `@sourceloop/example-service`.
152-
153-
```bash
154-
cd example-application
155-
npm i --save dotenv dotenv-extended @sourceloop/example-service
156-
touch .env.example
157-
```
158-
159-
Update `src/application.ts` to use the new service component and the environment variables. You may also need to bind configurations depending on the service component you are using. You find these configurations in the individual README of the service.
160-
161-
```typescript
162-
import {BootMixin} from '@loopback/boot';
163-
import {ApplicationConfig} from '@loopback/core';
164-
import {
165-
RestExplorerBindings,
166-
RestExplorerComponent,
167-
} from '@loopback/rest-explorer';
168-
import {RepositoryMixin} from '@loopback/repository';
169-
import {RestApplication} from '@loopback/rest';
170-
import {ServiceMixin} from '@loopback/service-proxy';
171-
import path from 'path';
172-
import {MySequence} from './sequence';
173-
174-
import {ExampleServiceComponent} from '@sourceloop/example-service';
175-
import * as dotenv from 'dotenv';
176-
import * as dotenvExt from 'dotenv-extended';
177-
178-
export {ApplicationConfig};
179-
180-
const port = 3000;
181-
export class ExampleApplicationApplication extends BootMixin(
182-
ServiceMixin(RepositoryMixin(RestApplication)),
183-
) {
184-
constructor(options: ApplicationConfig = {}) {
185-
dotenv.config();
186-
dotenvExt.load({
187-
schema: '.env.example',
188-
errorOnMissing: true,
189-
includeProcessEnv: true,
190-
});
191-
options.rest = options.rest || {};
192-
options.rest.port = +(process.env.PORT ?? port);
193-
options.rest.host = process.env.HOST;
194-
super(options);
195-
196-
// Set up the custom sequence
197-
this.sequence(MySequence);
198-
199-
// Set up default home page
200-
this.static('/', path.join(__dirname, '../public'));
201-
202-
// Customize @loopback/rest-explorer configuration here
203-
this.configure(RestExplorerBindings.COMPONENT).to({
204-
path: '/explorer',
205-
});
206-
this.component(RestExplorerComponent);
207-
this.component(ExampleServiceComponent); // OUR EXAMPLE SERVICE COMPONENT
208-
209-
this.projectRoot = __dirname;
210-
// Customize @loopback/boot Booter Conventions here
211-
this.bootOptions = {
212-
controllers: {
213-
// Customize ControllerBooter Conventions here
214-
dirs: ['controllers'],
215-
extensions: ['.controller.js'],
216-
nested: true,
217-
},
218-
};
219-
}
220-
}
221-
```
222-
223-
Modify the environment variable file to have the following contents:
224-
225-
```
226-
NODE_ENV=dev
227-
```
228-
229-
You can now run the example service with `npm start`.
230-
231-
### Config Hidden APIs
232-
233-
Update `src/application.ts` of each service to use the new hidden api feature. Add the following lines
234-
235-
```typescript
236-
import {OperationSpecEnhancer} from './enhancer/operationSpecEnhancer';
237-
import {OASBindings} from './keys';
238-
import {HttpMethod} from './enums/http-oas.enum';
239-
240-
export class ExampleApplicationApplication extends BootMixin(
241-
ServiceMixin(RepositoryMixin(RestApplication)),
242-
) {
243-
constructor(options: ApplicationConfig = {}) {
244-
super(options);
245-
246-
// Set up the custom sequence
247-
this.sequence(MySequence);
248-
249-
// Set up default home page
250-
this.static('/', path.join(__dirname, '../public'));
251-
252-
// Customize @loopback/rest-explorer configuration here
253-
this.configure(RestExplorerBindings.COMPONENT).to({
254-
path: '/explorer',
255-
});
256-
this.component(RestExplorerComponent);
257-
258-
// Bind OASBinding namespace to hide APIs
259-
this.bind(OASBindings.HiddenEndpoint).to([
260-
{httpMethod: HttpMethod.GET, path: '/ping'},
261-
{httpMethod: HttpMethod.POST, path: '/customers/{id}/users'},
262-
{httpMethod: HttpMethod.PUT, path: '/roles/{id}'},
263-
]);
264-
265-
this.projectRoot = __dirname;
266-
// Customize @loopback/boot Booter Conventions here
267-
this.bootOptions = {
268-
controllers: {
269-
// Customize ControllerBooter Conventions here
270-
dirs: ['controllers'],
271-
extensions: ['.controller.js'],
272-
nested: true,
273-
},
274-
};
275-
}
276-
}
277-
```
278-
279-
### DataSources and Migrations
280-
281-
The `Sourceloop` can support any Loopback 4 [DataSource](https://loopback.io/doc/en/lb4/DataSource.html). While you may see existing `DataSources`, it is not mandatory to use them.
282-
283-
The migrations required for this service are processed during the installation automatically if you set the `SOURCELOOP_MIGRATION` env variable. The migrations use [`db-migrate`](https://www.npmjs.com/package/db-migrate) with [`db-migrate-pg`](https://www.npmjs.com/package/db-migrate-pg) driver for migrations, so you will have to install these packages to use auto-migration. Please note that if you are using some pre-existing migrations or databases, they may be affected. In such a scenario, it is advised that you copy the migration files in your project root, using the `SOURCELOOP_MIGRATION_COPY` env variables. You can customize or cherry-pick the migrations in the copied files according to your specific requirements and then apply them to the DB.
284-
285-
### Production Deployment
286-
287-
Inside of the `sandbox` folder, you will find example applications and Dockerfiles for each application. The `Sourceloop` is agnostic of the Docker deployment strategy. Deploy the services into the platform of your choice.
288-
289-
## Sandbox
290-
291-
`sandbox` folder contains example applications and docker files that can be run independently to see the services in action. You can use [Docker Compose](https://docs.docker.com/compose/) to run the sandbox applications.
292-
293-
## Sourceloop CLI
294-
295-
The Sourceloop CLI is a command-line interface tool that one use to initialize, develop, scaffold, and maintain sourceloop applications directly from a command shell. Learn more about [Sourceloop CLI](packages/cli/README.md).
296-
297-
### Related Projects
298-
299-
The `Sourceloop` utilizes many extensions created by SourceFuse.
300-
301-
- [sourcefuse/loopback4-ratelimiter: A rate limiting extension for loopback4 applications (github.com)](https://github.com/sourcefuse/loopback4-ratelimiter)
302-
- [sourcefuse/loopback4-notifications: An extension for setting up various notification mechanisms in loopback4 application, vis-a-vis, Push notification, SMS notification, Email notification (github.com)](https://github.com/sourcefuse/loopback4-notifications)
303-
- [sourcefuse/loopback4-s3: A loopback4 extension for AWS S3 integration (github.com)](https://github.com/sourcefuse/loopback4-s3)
304-
- [sourcefuse/loopback4-audit-log: A loopback-next extension for implementing audit logs in loopback applications for all DB transactions. (github.com)](https://github.com/sourcefuse/loopback4-audit-log)
305-
- [sourcefuse/loopback4-soft-delete: A loopback4 extension for soft delete feature (github.com)](https://github.com/sourcefuse/loopback4-soft-delete)
306-
- [sourcefuse/loopback4-authentication: A loopback-next extension for authentication feature. Oauth strategies supported. (github.com)](https://github.com/sourcefuse/loopback4-authentication)
307-
- [sourcefuse/loopback4-authorization: An authorization extension for loopback4 applications (github.com)](https://github.com/sourcefuse/loopback4-authorization)
308-
- [sourcefuse/loopback4-helmet: A loopback4 extension for helmetjs integration (github.com)](https://github.com/sourcefuse/loopback4-helmet)
309-
- [sourcefuse/loopback4-vault: A loopback-next extension for HashiCorp's Vault integration in loopback-next applications (github.com)](https://github.com/sourcefuse/loopback4-vault)
310-
- [sourcefuse/loopback4-kafka-client: A Kafka Client for Loopback4 built on top of KafkaJS (github.com)](https://github.com/sourcefuse/loopback4-kafka-client)
311-
- [sourcefuse/loopback4-dynamic-datasource: A loopback 4 extension to connect to dynamic data sources runtime while maintaining old connections (github.com)](https://github.com/sourcefuse/loopback4-dynamic-datasource)
312-
- [sourcefuse/loopback4-sequelize: A Loopback 4 Extension that provides Sequelize query builder at repository level (github.com)](https://github.com/sourcefuse/loopback4-sequelize)
1+
# Sourceloop Angular Boiler Plate
3132

3143
### Feedback
3154

316-
If you've noticed a bug or have a question or have a feature request, [search the issue tracker]([Issues · sourcefuse/loopback4-microservices-catalog · GitHub](https://github.com/sourcefuse/loopback4-microservice-catalog/issues)) to see if someone else in the community has already created a ticket. If not, go ahead and [make one](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/new/choose)! All feature requests are welcome. Implementation time may vary. Feel free to contribute the same, if you can. If you think this extension is useful, please [star](https://help.github.com/en/articles/about-stars) it. Appreciation really helps in keeping this project alive.
317-
318-
### Contributing
319-
320-
- [Development Guidelines](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/DEVELOPING.md)
5+
If you've noticed a bug or have a question or have a feature request, [search the issue tracker]([Issues · sourcefuse/angular-boilerplate · GitHub](https://github.com/sourcefuse/angular-boilerplate/issues)) to see if someone else in the community has already created a ticket. If not, go ahead and [make one](https://github.com/sourcefuse/angular-boilerplate/issues/new/choose)! All feature requests are welcome. Implementation time may vary. Feel free to contribute the same, if you can. If you think this extension is useful, please [star](https://help.github.com/en/articles/about-stars) it. Appreciation really helps in keeping this project alive.
3216

3227
### Code of Conduct
3238

0 commit comments

Comments
 (0)