Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
MODE=DEV

API_GATEWAY_PROTOCOL=http
API_GATEWAY_HOST='0.0.0.0'
API_GATEWAY_PORT=5000

PLATFORM_NAME=CREDEBL

[email protected] // Please specify your agent host VM and IP address
AWS_ACCOUNT_ID=xxxxx // Please provide your AWS account Id
S3_BUCKET_ARN=arn:aws:s3:::xxxxx // Please provide your AWS bucket arn

TENANT_EMAIL_LOGO=credebl.jpg
API_ENDPOINT=localhost:5000 #Use your local machine IP Address & PORT
API_ENDPOINT_PORT=5000

SOCKET_HOST=http://localhost:5000

NATS_HOST='0.0.0.0'
NATS_PORT=4222
NATS_URL=nats://0.0.0.0:4222

REDIS_HOST='localhost' # Use IP Address
REDIS_PORT=6379

POSTGRES_HOST=localhost # Use IP Address
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=xxxxxxxx
POSTGRES_DATABASE=postgres

POSTGRES_MEDIATOR_DATABASE='mediator_agent'
POSTGRES_MEDIATOR_PORT=5431

MEDIATOR_AGENT_LABEL=MediatorAgent
MEDIATOR_AGENT_ENDPOINT=''

SENDGRID_API_KEY=xxxxxxxxxxxxxx // Please provide your sendgrid API key

FRONT_END_URL=http://localhost:3000

FILE_SERVER=credebl-dev-mediator-indypool
FILE_SERVER_PORT=8081
FILE_SERVER_USER=credebl
FILE_SERVER_HOST=0.0.0.0

REMOTE_FILE_DIR='/opt/cb-tails-file-server/tails/tails-files/'
ACCESSIBLE_FILE_LOCATION='tails-files'

LOCAL_FILE_SERVER=/opt/credebl-platform/tails-files/
GCLOUD_ENGINE_PATH=/home/credebl/.ssh/google_compute_engine

AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/start_agent.sh

AGENT_SPIN_UP_FILE=/agent-spinup/scripts/start_agent.sh
LIBINDY_KEY=CE7709D068DB5E88

AGENT_RESTART_SCRIPT=/agent-spinup/scripts/manage_agent.sh
AGENT_STATUS_SCRIPT=/agent-spinup/scripts/status_agent.sh

WALLET_PROVISION_SCRIPT=/agent-spinup/scripts/wallet_provision.sh
WALLET_STORAGE_HOST=localhost # Use IP Address
WALLET_STORAGE_PORT=5432
WALLET_STORAGE_USER=postgres
WALLET_STORAGE_PASSWORD=xxxxxx

KEYCLOAK_DOMAIN=http://localhost:8089/auth/
KEYCLOAK_ADMIN_URL=http://localhost:8089
KEYCLOAK_MASTER_REALM=master
KEYCLOAK_CREDEBL_REALM=credebl-platform
KEYCLOAK_MANAGEMENT_CLIENT_ID=adminClient
KEYCLOAK_MANAGEMENT_CLIENT_SECRET=xxxxxx-xxxx-xxxx-xxxx-xxxxxx #Refer from ADMIN CONSOLE of your Keycloak
KEYCLOAK_MANAGEMENT_ADEYA_CLIENT_ID=adeyaClient
KEYCLOAK_MANAGEMENT_ADEYA_CLIENT_SECRET=xxxxxx-xxxx-xxxx-xxxx-xxxxxx #Refer from ADMIN CONSOLE of your Keycloak

FILE_UPLOAD_PATH_TENANT= /uploadedFiles/tenant-logo/

CRYPTO_PRIVATE_KEY=xxxxx-xxxxx-xxxxx-xxxxx
PLATFORM_URL=https://dev.credebl.com
KEYCLOAK_URL=http://localhost:8089
PLATFORM_PROFILE_MODE=DEV

AFJ_VERSION=afj-0.4.0:latest
INVOICE_PDF_URL=./invoice-pdf

FIDO_API_ENDPOINT=http://localhost:8000 # Host:port of your FIDO (WebAuthn) Server

PLATFORM_WALLET_NAME=platform-admin
PLATFORM_WALLET_PASSWORD= // Please provide encrypt password using crypto-js
PLATFORM_SEED= // The seed should consist of 32 characters.
PLATFORM_ID=

AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/

# This was inserted by prisma init:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB (Preview).
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://postgres:xxxxxx@localhost:5432/postgres?schema=public" #Use the correct user/pwd, IP Address

# enable only prisma:engine-level debugging output
export DEBUG="prisma:engine"

# enable only prisma:client-level debugging output
export DEBUG="prisma:client"

# enable both prisma-client- and engine-level debugging output
export DEBUG="prisma:client,prisma:engine"
Empty file added .eslintignore
Empty file.
104 changes: 104 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest: true
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'prettier/prettier': 0,
'no-console': 'error',
// "@typescript-eslint/consistent-type-imports": "error",
'@typescript-eslint/no-unused-vars': [
'error'
// {
// "argsIgnorePattern": "_"
// }
],
'@typescript-eslint/array-type': 'error',
'template-curly-spacing': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-use-before-define': 'error',
complexity: ['error', 50],
'array-callback-return': 'error',
curly: 'error',
'default-case': 'error',
'default-case-last': 'error',
'default-param-last': 'error',
camelcase: [2, { properties: 'always' }],
'no-invalid-this': 'error',
'no-return-assign': 'error',
'no-unused-expressions': ['error', { allowTernary: true }],
'no-useless-concat': 'error',
'no-useless-return': 'error',
'guard-for-in': 'error',
'no-case-declarations': 'error',
'no-implicit-coercion': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-param-reassign': 'error',
'no-return-await': 'error',
'no-self-compare': 'error',
'no-throw-literal': 'error',
'no-useless-catch': 'error',
'prefer-promise-reject-errors': 'error',
'vars-on-top': 'error',
yoda: ['error', 'always'],
'arrow-body-style': ['warn', 'as-needed'],
'no-useless-rename': 'error',
'prefer-destructuring': [
'error',
{
array: true,
object: true
},
{
enforceForRenamedProperties: false
}
],
'prefer-numeric-literals': 'error',
'prefer-rest-params': 'warn',
'prefer-spread': 'error',
'array-bracket-newline': ['error', { multiline: true, minItems: null }],
'array-bracket-spacing': 'error',
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'block-spacing': 'error',
'comma-dangle': 'error',
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
'func-call-spacing': 'error',
'implicit-arrow-linebreak': ['error', 'beside'],
'keyword-spacing': 'error',
'multiline-ternary': ['error', 'always-multiline'],
'no-mixed-operators': 'error',
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
'no-tabs': 'error',
'no-unneeded-ternary': 'error',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': ['error', 'below'],
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
semi: ['error', 'always'],
'semi-spacing': 'error',
'space-before-blocks': 'error',
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'arrow-spacing': 'error',
'no-confusing-arrow': 'off',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
quotes: ['warn', 'single', { allowTemplateLiterals: true }]
}
};
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Prerequisites**

**Steps to Reproduce**

**Current behavior**

**Expected behavior**

**Environment**

**Desktop**
- OS:
- Browser:
- Browser Version:
- CREDEBL Version:

**Smartphone**
- Device:
- OS:
- ADEYA version:

**Screenshots or Screen recording**
136 changes: 7 additions & 129 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,8 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
node_modules
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
uploadedFiles
.env
sonar-project.properties
.scannerwork/*
coverage
libs/prisma-service/prisma/data/credebl-master-table.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "apps/agent-provisioning/AFJ/afj-controller"]
path = apps/agent-provisioning/AFJ/afj-controller
url = https://github.com/credebl/afj-controller.git
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17
Loading