Skip to content

Commit de91f7c

Browse files
committed
docs(arc-docs): backend integration doc
backend integration doc GH-26
1 parent 9d3f2d6 commit de91f7c

File tree

7 files changed

+155
-5
lines changed

7 files changed

+155
-5
lines changed

angular.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@
202202
"glob": "**/*",
203203
"input": "projects/arc-lib/src/lib/assets/",
204204
"output": "/assets/"
205+
206+
},
207+
{
208+
"glob": "**/*",
209+
"input": "projects/arc-docs/src/assets/",
210+
"output": "/assets/"
211+
212+
205213
}
206214
],
207215

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export const DOCUMENTATION_MENU_ITEMS = [
2+
{
3+
title: 'Getting Started',
4+
icon: 'book-outline',
5+
children: [
6+
{
7+
title: 'Introduction',
8+
link: '/docs/getting-started',
9+
},
10+
],
11+
},
12+
{
13+
title: 'Guide',
14+
icon: 'book-outline',
15+
children: [
16+
{
17+
title: 'Cloning Boilerplate',
18+
link: '/docs/guide/clone',
19+
},
20+
{
21+
title: 'Backend Integration',
22+
link: '/docs/guide/backend-integration',
23+
},
24+
],
25+
},
26+
27+
{
28+
title: 'Auth',
29+
icon: 'book-outline',
30+
children: [
31+
{
32+
title: 'Introduction',
33+
link: '/docs/auth-doc/authDocIntro',
34+
},
35+
{
36+
title: 'Installation',
37+
link: '/docs/auth-doc/installation',
38+
},
39+
],
40+
},
41+
];
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
<p>backend-integration-doc works!</p>
1+
<div class="intro-wrapper">
2+
<div class="1st-phase">
3+
<nb-card>
4+
<nb-card-header fixed>
5+
<h2 class="nb-card-header-title">Overview</h2>
6+
</nb-card-header>
7+
<nb-card-body>
8+
<p>
9+
This guide provides the necessary steps to integrate a frontend
10+
application with a backend authentication service. It includes
11+
boilerplate code to ensure a smooth setup and usage of the
12+
authentication service without needing a backend developer.
13+
</p>
14+
</nb-card-body>
15+
</nb-card>
16+
17+
<nb-card>
18+
<nb-card-header fixed>
19+
<h2 class="nb-card-header-title">Prerequisites</h2>
20+
</nb-card-header>
21+
<nb-card-body>
22+
<ul>
23+
<li>Node.js and npm installed</li>
24+
<li>Angular CLI installed</li>
25+
<li>PostgreSQL installed</li>
26+
<li>Redis installed</li>
27+
<li>Basic knowledge of Angular and REST APIs</li>
28+
</ul>
29+
</nb-card-body>
30+
</nb-card>
31+
32+
<nb-card>
33+
<nb-card-header fixed>
34+
<h2 class="nb-card-header-title">Backend-setup</h2>
35+
</nb-card-header>
36+
<nb-card-body>
37+
<ol>
38+
<li>
39+
Before proceeding, ensure you have completed the initial backend
40+
setup. If you haven't done so, please follow the
41+
<a
42+
href="https://github.com/sourcefuse/loopback4-microservice-catalog/tree/master/services/authentication-service"
43+
>Backend Setup Documentation </a
44+
>.
45+
</li>
46+
<li>Environment Variables</li>
47+
<p>
48+
Create a .env file in the root of your project to store your
49+
environment variables. This file contains configuration settings for
50+
your database, Redis, and other necessary environment variables.
51+
</p>
52+
Example .env File Create a file named .env and add the following
53+
content:
54+
<div *ngFor="let env of envVariables">
55+
<lib-cli-wrapper [command]="env.command"> </lib-cli-wrapper>
56+
</div>
57+
58+
<li>Run the application:</li>
59+
<div *ngFor="let server of runServer">
60+
<lib-cli-wrapper [command]="server.command"> </lib-cli-wrapper>
61+
</div>
62+
</ol>
63+
</nb-card-body>
64+
</nb-card>
65+
</div>
66+
</div>

projects/arc-docs/src/app/docs/guide/components/backend-integration-doc/backend-integration-doc.component.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,37 @@ import {Component} from '@angular/core';
55
templateUrl: './backend-integration-doc.component.html',
66
styleUrls: ['./backend-integration-doc.component.scss'],
77
})
8-
export class BackendIntegrationDocComponent {}
8+
export class BackendIntegrationDocComponent {
9+
DataList: object[] = [
10+
{
11+
lable: 'Install LoopBack CLI if you haven’t already:',
12+
listData: 'npm install -g @loopback/cli',
13+
},
14+
{
15+
lable: 'Create a new LoopBack application:',
16+
listData: 'lb4 app testapp',
17+
},
18+
];
19+
20+
runServer: object[] = [
21+
{
22+
command: 'ng serve',
23+
},
24+
];
25+
26+
envVariables: object[] = [
27+
{
28+
command: `export const environment = {
29+
production: false,
30+
clientId: '',
31+
publicKey: '',
32+
homePath: '/main/home',
33+
baseApiUrl: '',
34+
authServiceUrl: '',
35+
userServiceUrl: '',
36+
logLevel: 5,
37+
};
38+
`,
39+
},
40+
];
41+
}

projects/arc-docs/src/app/docs/guide/guide-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const routes: Routes = [
1313
path: 'clone',
1414
component: CloneBoilerplateDocComponent,
1515
},
16+
{
17+
path: 'backend-integration',
18+
component: BackendIntegrationDocComponent,
19+
},
1620
];
1721

1822
@NgModule({

projects/arc-lib/src/lib/components/cli-wrapper/cli-wrapper.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div class="cli-wrapper">
32
<div class="cli">
43
<div class="cli-header">

projects/arc-lib/src/lib/components/selector/select/select.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*ngFor="let item of visibleTags"
3939
[text]="asString(item && item[nameField])"
4040
[ngStyle]="{
41-
maxWidth: 'calc(100% - ' + suffixCount * suffixWidth + 'px)'
41+
maxWidth: 'calc(100% - ' + suffixCount * suffixWidth + 'px)',
4242
}"
4343
[removable]="!disabled"
4444
(remove)="toggle(item); toggleDropdown()"
@@ -61,7 +61,7 @@
6161
(click)="$event.stopPropagation(); !allowInput && toggleDropdown()"
6262
[ngStyle]="{
6363
minWidth: inputMinWidth + 'px',
64-
marginRight: suffixCount * suffixWidth + 'px'
64+
marginRight: suffixCount * suffixWidth + 'px',
6565
}"
6666
/>
6767
</nb-tag-list>

0 commit comments

Comments
 (0)