Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

ProjectLibertyLabs/graph-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Repository Archived and Moved

This repository has been archived and its contents have been moved to a new location.

You can now find the graph-service repository within the AmplicaLabs/gateway repository at the following path:

./services/graph

For any future updates or contributions, please refer to the new location. Thank you!


Link to the new repository: AmplicaLabs/gateway

Graph Service

πŸ“— Table of Contents

πŸ“– graph-service

The Graph Service is a service enabling easy interaction with DSNP private and public graphs on Frequency.

πŸ”­ Arch Maps

The account-service is a NestJS application that is split into two main parts: the API and the Worker.

The API is responsible for handling incoming HTTP requests and the Worker is responsible for processing jobs that require blockchain interaction.

Gateway Graph Service

(back to top)

πŸ›  Built With

Tech Stack

Framework
Language
Testing Libraries
Linting
Data Store
Request Library
Scheduling
Validation
Environment Configuration
Containerization
API Documentation

Key Features

  • Fetch Graphs
  • Update Graph
  • Watch Graphs

(back to top)

πŸš€ Live Docs

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

Setup

Clone this repository to your desired folder:

Example commands:

  git clone [email protected]:AmplicaLabs/graph-service.git
  cd graph-service

Install

Install NPM Dependencies:

  npm install

Environment Variables

The application receives its configuration from the environment. Each method of launching the app has its own source for the environment. If you run a container image using Kubernetes, it is likely your environment injection will be configured in a Helm chart. For local Docker-based development, you may specifiy the environment or point to an environment file (the included docker-compose.yaml can has a self-contained environment which may be edited to suit your purposes). If running natively using the script included in package.json, the app will use a local .env file.

Environment files are documented here, and a sample environment file is provided here.

  1. Copy the template values into the .env file.
    cp env.template .env
  2. Replace template values with values appropriate to your environment.

Usage

Note: using docker compose file to start the services. This will start the services in development mode.

1. Start the Redis server container and the Frequency container. You can view the logs with your Docker setup.

docker compose up -d redis frequency

2. Once Frequency is up. Run a graph setup with Alice as provider 1 and 2,3,4,5,6 as users.

make setup

3. Run the following command to start the graph service api and worker containers. This will start the account service api and worker in development mode.

docker compose up -d api worker

4. Check the job in BullUI, to monitor job progress based on defined tests.

πŸ“‹ Testing

Run the tests

make test-e2e

This will run the tests in apps/api/test folder.

Check e2e test file for more details on the test.

Swagger UI

Check out the Swagger UI hosted on the app instance at <base url>/docs/swagger to view the API documentation and submit requests to the service.

Queue Management

You may also view and manage the application's queue at <base url>/queues.

Linting

npm run lint

Auto-format

npm run format

🀝 Contributing

Contributions, issues, and feature requests are welcome!

(back to top)

⭐️ Show your support

If you would like to explore contributing bug fixes or enhancements, issues with the label good-first-issue can be a good place to start.

(back to top)

❓FAQ

  • What is the difference between Reconnection Service and Graph Service?

    • The Reconnection Service is designed for providers who have users who are migrating to DSNP, whereas Graph Service is for users who are already on DSNP.

(back to top)

πŸ“ License

This project is Apache 2.0 licensed.

(back to top)

About

A Gateway microservice enabling easy interaction with DSNP private and public graphs on Frequency

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7