Skip to content

Commit 69b946c

Browse files
authored
Merge pull request #1 from credebl/initial-commit
initial commit
2 parents 647766e + 1e09b10 commit 69b946c

File tree

403 files changed

+22325
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+22325
-131
lines changed

.env.sample

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
MODE=DEV
2+
3+
API_GATEWAY_PROTOCOL=http
4+
API_GATEWAY_HOST='0.0.0.0'
5+
API_GATEWAY_PORT=5000
6+
7+
PLATFORM_NAME=CREDEBL
8+
9+
AGENT_HOST=[email protected] // Please specify your agent host VM and IP address
10+
AWS_ACCOUNT_ID=xxxxx // Please provide your AWS account Id
11+
S3_BUCKET_ARN=arn:aws:s3:::xxxxx // Please provide your AWS bucket arn
12+
13+
TENANT_EMAIL_LOGO=credebl.jpg
14+
API_ENDPOINT=localhost:5000 #Use your local machine IP Address & PORT
15+
API_ENDPOINT_PORT=5000
16+
17+
SOCKET_HOST=http://localhost:5000
18+
19+
NATS_HOST='0.0.0.0'
20+
NATS_PORT=4222
21+
NATS_URL=nats://0.0.0.0:4222
22+
23+
REDIS_HOST='localhost' # Use IP Address
24+
REDIS_PORT=6379
25+
26+
POSTGRES_HOST=localhost # Use IP Address
27+
POSTGRES_PORT=5432
28+
POSTGRES_USER=postgres
29+
POSTGRES_PASSWORD=xxxxxxxx
30+
POSTGRES_DATABASE=postgres
31+
32+
POSTGRES_MEDIATOR_DATABASE='mediator_agent'
33+
POSTGRES_MEDIATOR_PORT=5431
34+
35+
MEDIATOR_AGENT_LABEL=MediatorAgent
36+
MEDIATOR_AGENT_ENDPOINT=''
37+
38+
SENDGRID_API_KEY=xxxxxxxxxxxxxx // Please provide your sendgrid API key
39+
40+
FRONT_END_URL=http://localhost:3000
41+
42+
FILE_SERVER=credebl-dev-mediator-indypool
43+
FILE_SERVER_PORT=8081
44+
FILE_SERVER_USER=credebl
45+
FILE_SERVER_HOST=0.0.0.0
46+
47+
REMOTE_FILE_DIR='/opt/cb-tails-file-server/tails/tails-files/'
48+
ACCESSIBLE_FILE_LOCATION='tails-files'
49+
50+
LOCAL_FILE_SERVER=/opt/credebl-platform/tails-files/
51+
GCLOUD_ENGINE_PATH=/home/credebl/.ssh/google_compute_engine
52+
53+
AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/start_agent.sh
54+
55+
AGENT_SPIN_UP_FILE=/agent-spinup/scripts/start_agent.sh
56+
LIBINDY_KEY=CE7709D068DB5E88
57+
58+
AGENT_RESTART_SCRIPT=/agent-spinup/scripts/manage_agent.sh
59+
AGENT_STATUS_SCRIPT=/agent-spinup/scripts/status_agent.sh
60+
61+
WALLET_PROVISION_SCRIPT=/agent-spinup/scripts/wallet_provision.sh
62+
WALLET_STORAGE_HOST=localhost # Use IP Address
63+
WALLET_STORAGE_PORT=5432
64+
WALLET_STORAGE_USER=postgres
65+
WALLET_STORAGE_PASSWORD=xxxxxx
66+
67+
KEYCLOAK_DOMAIN=http://localhost:8089/auth/
68+
KEYCLOAK_ADMIN_URL=http://localhost:8089
69+
KEYCLOAK_MASTER_REALM=master
70+
KEYCLOAK_CREDEBL_REALM=credebl-platform
71+
KEYCLOAK_MANAGEMENT_CLIENT_ID=adminClient
72+
KEYCLOAK_MANAGEMENT_CLIENT_SECRET=xxxxxx-xxxx-xxxx-xxxx-xxxxxx #Refer from ADMIN CONSOLE of your Keycloak
73+
KEYCLOAK_MANAGEMENT_ADEYA_CLIENT_ID=adeyaClient
74+
KEYCLOAK_MANAGEMENT_ADEYA_CLIENT_SECRET=xxxxxx-xxxx-xxxx-xxxx-xxxxxx #Refer from ADMIN CONSOLE of your Keycloak
75+
76+
FILE_UPLOAD_PATH_TENANT= /uploadedFiles/tenant-logo/
77+
78+
CRYPTO_PRIVATE_KEY=xxxxx-xxxxx-xxxxx-xxxxx
79+
PLATFORM_URL=https://dev.credebl.com
80+
KEYCLOAK_URL=http://localhost:8089
81+
PLATFORM_PROFILE_MODE=DEV
82+
83+
AFJ_VERSION=afj-0.4.0:latest
84+
INVOICE_PDF_URL=./invoice-pdf
85+
86+
FIDO_API_ENDPOINT=http://localhost:8000 # Host:port of your FIDO (WebAuthn) Server
87+
88+
PLATFORM_WALLET_NAME=platform-admin
89+
PLATFORM_WALLET_PASSWORD= // Please provide encrypt password using crypto-js
90+
PLATFORM_SEED= // The seed should consist of 32 characters.
91+
PLATFORM_ID=
92+
93+
AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/
94+
95+
# This was inserted by prisma init:
96+
# Environment variables declared in this file are automatically made available to Prisma.
97+
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
98+
99+
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB (Preview).
100+
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
101+
102+
DATABASE_URL="postgresql://postgres:xxxxxx@localhost:5432/postgres?schema=public" #Use the correct user/pwd, IP Address
103+
104+
# enable only prisma:engine-level debugging output
105+
export DEBUG="prisma:engine"
106+
107+
# enable only prisma:client-level debugging output
108+
export DEBUG="prisma:client"
109+
110+
# enable both prisma-client- and engine-level debugging output
111+
export DEBUG="prisma:client,prisma:engine"

.eslintignore

Whitespace-only changes.

.eslintrc.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module'
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
9+
root: true,
10+
env: {
11+
node: true,
12+
jest: true
13+
},
14+
ignorePatterns: ['.eslintrc.js'],
15+
rules: {
16+
'prettier/prettier': 0,
17+
'no-console': 'error',
18+
// "@typescript-eslint/consistent-type-imports": "error",
19+
'@typescript-eslint/no-unused-vars': [
20+
'error'
21+
// {
22+
// "argsIgnorePattern": "_"
23+
// }
24+
],
25+
'@typescript-eslint/array-type': 'error',
26+
'template-curly-spacing': 'error',
27+
'@typescript-eslint/explicit-function-return-type': 'error',
28+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
29+
'@typescript-eslint/no-explicit-any': 'error',
30+
'@typescript-eslint/no-use-before-define': 'error',
31+
complexity: ['error', 50],
32+
'array-callback-return': 'error',
33+
curly: 'error',
34+
'default-case': 'error',
35+
'default-case-last': 'error',
36+
'default-param-last': 'error',
37+
camelcase: [2, { properties: 'always' }],
38+
'no-invalid-this': 'error',
39+
'no-return-assign': 'error',
40+
'no-unused-expressions': ['error', { allowTernary: true }],
41+
'no-useless-concat': 'error',
42+
'no-useless-return': 'error',
43+
'guard-for-in': 'error',
44+
'no-case-declarations': 'error',
45+
'no-implicit-coercion': 'error',
46+
'no-lone-blocks': 'error',
47+
'no-loop-func': 'error',
48+
'no-param-reassign': 'error',
49+
'no-return-await': 'error',
50+
'no-self-compare': 'error',
51+
'no-throw-literal': 'error',
52+
'no-useless-catch': 'error',
53+
'prefer-promise-reject-errors': 'error',
54+
'vars-on-top': 'error',
55+
yoda: ['error', 'always'],
56+
'arrow-body-style': ['warn', 'as-needed'],
57+
'no-useless-rename': 'error',
58+
'prefer-destructuring': [
59+
'error',
60+
{
61+
array: true,
62+
object: true
63+
},
64+
{
65+
enforceForRenamedProperties: false
66+
}
67+
],
68+
'prefer-numeric-literals': 'error',
69+
'prefer-rest-params': 'warn',
70+
'prefer-spread': 'error',
71+
'array-bracket-newline': ['error', { multiline: true, minItems: null }],
72+
'array-bracket-spacing': 'error',
73+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
74+
'block-spacing': 'error',
75+
'comma-dangle': 'error',
76+
'comma-spacing': 'error',
77+
'comma-style': 'error',
78+
'computed-property-spacing': 'error',
79+
'func-call-spacing': 'error',
80+
'implicit-arrow-linebreak': ['error', 'beside'],
81+
'keyword-spacing': 'error',
82+
'multiline-ternary': ['error', 'always-multiline'],
83+
'no-mixed-operators': 'error',
84+
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
85+
'no-tabs': 'error',
86+
'no-unneeded-ternary': 'error',
87+
'no-whitespace-before-property': 'error',
88+
'nonblock-statement-body-position': ['error', 'below'],
89+
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
90+
semi: ['error', 'always'],
91+
'semi-spacing': 'error',
92+
'space-before-blocks': 'error',
93+
'space-in-parens': 'error',
94+
'space-infix-ops': 'error',
95+
'space-unary-ops': 'error',
96+
'arrow-spacing': 'error',
97+
'no-confusing-arrow': 'off',
98+
'no-var': 'error',
99+
'object-shorthand': 'error',
100+
'prefer-const': 'error',
101+
'prefer-template': 'error',
102+
quotes: ['warn', 'single', { allowTemplateLiterals: true }]
103+
}
104+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Prerequisites**
11+
12+
**Steps to Reproduce**
13+
14+
**Current behavior**
15+
16+
**Expected behavior**
17+
18+
**Environment**
19+
20+
**Desktop**
21+
- OS:
22+
- Browser:
23+
- Browser Version:
24+
- CREDEBL Version:
25+
26+
**Smartphone**
27+
- Device:
28+
- OS:
29+
- ADEYA version:
30+
31+
**Screenshots or Screen recording**

.gitignore

Lines changed: 7 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,8 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
1+
node_modules
922
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
121-
122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
124-
125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
130-
.pnp.*
3+
uploadedFiles
4+
.env
5+
sonar-project.properties
6+
.scannerwork/*
7+
coverage
8+
libs/prisma-service/prisma/data/credebl-master-table.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "apps/agent-provisioning/AFJ/afj-controller"]
2+
path = apps/agent-provisioning/AFJ/afj-controller
3+
url = https://github.com/credebl/afj-controller.git

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.17

0 commit comments

Comments
 (0)