Skip to content
Snippets Groups Projects
README.md 1.77 KiB
Newer Older
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
# OCM Attestation Manager
Sagar Khole's avatar
Sagar Khole committed

## Description
<hr/>

The Attestation Manager is the microservice responsible for handling the features related to Issuance of Credentials. It handles REST endpoints for Schemas, Credential Definitions and Verifiable Credentials.
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed

## Usage
<hr/>
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed

###  Swagger Documentation: 
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed

[Swagger/OpenAPI](swagger.json)
Sagar Khole's avatar
Sagar Khole committed

## Installation
<hr/>
Sagar Khole's avatar
Sagar Khole committed

Anusha Garg's avatar
Anusha Garg committed
### Pre-requisite
Sagar Khole's avatar
Sagar Khole committed

Anusha Garg's avatar
Anusha Garg committed
* yarn
* docker
* docker-compose
Boyan Tsolov's avatar
Boyan Tsolov committed
* PostgreSQL
Sagar Khole's avatar
Sagar Khole committed

Anusha Garg's avatar
Anusha Garg committed
### OCM Services Dependencies
Sagar Khole's avatar
Sagar Khole committed

Anusha Garg's avatar
Anusha Garg committed
* SSI Abstraction
* Connection Manager
Sagar Khole's avatar
Sagar Khole committed

Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
## Running the app
Sagar Khole's avatar
Sagar Khole committed

Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
**Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.**
Sagar Khole's avatar
Sagar Khole committed

Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
**The .env files are in the infrastructure repository under /env**
Sagar Khole's avatar
Sagar Khole committed

```bash
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
    ## production in:
      ./deployment/ci
    ## development in:
      ./deployment/dev
```
Sagar Khole's avatar
Sagar Khole committed

Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
* (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles.
Sagar Khole's avatar
Sagar Khole committed

Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
* Run while in **"infrastructure"** project:
```bash
$ docker-compose up --build attestation-m
```
to run only Attestation Manager or
Sagar Khole's avatar
Sagar Khole committed
```bash
Vinay Bhardwaj's avatar
Vinay Bhardwaj committed
$ docker-compose up --build
```
to run all the services.
Sagar Khole's avatar
Sagar Khole committed

Anusha Garg's avatar
Anusha Garg committed
## Build
```
yarn build
Anusha Garg's avatar
Anusha Garg committed
```

## Run
```
yarn start
Anusha Garg's avatar
Anusha Garg committed
```

### Environment Variables Required
Anusha Garg's avatar
Anusha Garg committed
```
1. PORT
2. DATABASE_URL
3. ECSURL
4. NATS_URL
5. AGENT_URL
```

### Outgoing communication services
Anusha Garg's avatar
Anusha Garg committed
```
1. SSI Abstraction
```

### Incomming communication services
Anusha Garg's avatar
Anusha Garg committed
```
1. Principal Manager
```

### Features supported
Anusha Garg's avatar
Anusha Garg committed
```
1. Create Schema
2. Create Credential Definition
3. Offer Credentials
4. Propose Credentials
5. Accept Credential
```

Sagar Khole's avatar
Sagar Khole committed

Boyan Tsolov's avatar
Boyan Tsolov committed
## Test
<hr/>

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```


## GDPR
<hr/>

Anusha Garg's avatar
Anusha Garg committed
[GDPR](GDPR.md)
Sagar Khole's avatar
Sagar Khole committed

Kalin Canov's avatar
Kalin Canov committed
## Dependencies
Kalin Canov's avatar
Kalin Canov committed
[Dependencies](package.json)

## License
<hr/>
Sagar Khole's avatar
Sagar Khole committed

Kalin Canov's avatar
Kalin Canov committed
[Apache 2.0 license](LICENSE)