Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkeccak committed Apr 22, 2024
2 parents 03f28fd + c118fa5 commit f6d29a0
Showing 1 changed file with 55 additions and 22 deletions.
77 changes: 55 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ValyuDID

Welcome to the ValyuDID repository! This project acts as an implementation of the Valyu DID method specification (outlined in DDOC.md), and facilitates the creation and resolution of Valyu DIDs using RESTful APIs, and a simple SQL database.
Welcome to the ValyuDID repository. This project implements the Valyu DID method specification (detailed in DDOC.md) and provides RESTful APIs for creating and resolving Valyu DIDs, utilizing a straightforward SQL database architecture.

## Overview 📖

ValyuDID provides a suite of endpoints to manage DIDs, enabling interactions such as creating new DIDs for users and data, and resolving existing DIDs through a custom-built Veramo-based resolver.
ValyuDID offers a set of endpoints designed for managing decentralized identifiers (DIDs). It enables the creation of new DIDs for users and data, as well as the resolution of existing DIDs, using a custom-built resolver, and provider, based on the Veramo framework.

## Getting Started 🚀

Expand Down Expand Up @@ -59,8 +59,6 @@ The server exposes three primary endpoints:
- `POST /createDataDID` - Create a new data DID.
- `POST /resolveDID` - Resolve an existing DID.

These endpoints allow you to interact with the blockchain and manage DIDs efficiently.

## Postman API Documentation 📚

For comprehensive API testing and documentation, access our Postman collection:
Expand All @@ -69,12 +67,6 @@ For comprehensive API testing and documentation, access our Postman collection:

This collection includes detailed requests and responses for each endpoint, helping you to effectively integrate and test the Valyu-DID APIs.

### Docker Image 🐳

For those interested in deploying using Docker, the Valyu-DID Docker image is available on DockerHub:

[DockerHub: yorkeccak/valyu-did](https://hub.docker.com/repository/docker/yorkeccak/valyu-did/general)

### APIs Included in the Collection:

- **Create Data DID (POST /createDataDID)**: Create a new data DID.
Expand All @@ -88,6 +80,58 @@ For those interested in deploying using Docker, the Valyu-DID Docker image is av
- **Resolve DID (POST /resolveDID)**: Resolve a DID and retrieve the associated DID document.
- Request Body: `did` (required).
- Success Response: Returns the resolved DID document.

Here's a restructured version of the Docker Deployment section that emphasizes pulling the image from DockerHub first, followed by instructions on how to build and run the application locally while specifying the `KMS_SECRET_KEY` as an environment variable:

## Docker Deployment 🐳

This section outlines how to deploy the ValyuDID application using Docker, either by pulling a pre-built image from DockerHub or by building and running a Docker container locally.

### Pulling the Docker Image from DockerHub

To get started quickly without building the image yourself, you can pull the pre-built Docker image from DockerHub:

```bash
docker pull yorkeccak/valyudid:0.1-beta
```

### Running the Docker Container

After pulling the image from DockerHub, you can run the application as follows:

```bash
docker run -p 3000:3000 -e KMS_SECRET_KEY=Your_Secret_Key yorkeccak/valyudid:0.1-beta
```

This command starts a container from the `yorkeccak/valyudid:0.1-beta` image, maps port 3000 inside the container to port 3000 on your host, and sets the `KMS_SECRET_KEY` environment variable required for the application to function properly. Access the application via `http://localhost:3000`.

### Building the Docker Image Locally

If you prefer to build the Docker image yourself, especially for development or modifications, follow these steps:

**Build the Docker Image:**

```bash
docker build -t valyudid .
```

This command builds a Docker image named `valyudid` based on the instructions in your Dockerfile.

**Run the Docker Container:**

```bash
docker run -p 3000:3000 -e KMS_SECRET_KEY=Your_Secret_Key valyudid
```

This command runs your locally built image with the necessary `KMS_SECRET_KEY` set as an environment variable. This setup is crucial for managing cryptographic operations within Veramo used in the application.

### DockerHub

For ease of access and deployment, you can find the Docker image on DockerHub:

[DockerHub: yorkeccak/valyudid](https://hub.docker.com/repository/docker/yorkeccak/valyudid/general)

This configuration ensures that both quick deployments using DockerHub and customized local builds are possible, providing flexibility for different deployment scenarios.

## Contributing 🤝

Expand All @@ -105,17 +149,6 @@ We welcome contributions from the community! Please follow these steps:
- Keep functions small and focused.
- Document your code where necessary.

## Docker Deployment 🐳

This project includes a Dockerfile for building and running the app in a containerized environment. To build and run the Docker container, use:

```bash
docker build -t valyudid .
docker run -p 3000:3000 valyudid
```

This will expose the application on port 3000, accessible via `http://localhost:3000`.

## License 📄

This project is currently unlicensed and proprietary. Please contact us for any inquiries regarding usage or licensing.
This project is currently unlicensed and proprietary. Please contact us for any inquiries regarding usage or licensing.

0 comments on commit f6d29a0

Please sign in to comment.