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
- π About the Project
- π Arch Map
- π Built With
- π Live OpenAPI Docs
- π» Getting Started
- π€ Contributing
- βοΈ Show your support
- π Acknowledgements
- βFAQ
- π License
The Graph Service is a service enabling easy interaction with DSNP private and public graphs on Frequency.
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.
Framework
Language
Request Library
Scheduling
Validation
Environment Configuration
Containerization
API Documentation
- Fetch Graphs
- Update Graph
- Watch Graphs
To get a local copy up and running, follow these steps.
In order to run this project you need:
Clone this repository to your desired folder:
Example commands:
git clone [email protected]:AmplicaLabs/graph-service.git
cd graph-service
Install NPM Dependencies:
npm install
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.
- Copy the template values into the .env file.
cp env.template .env
- Replace template values with values appropriate to your environment.
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.
make test-e2e
This will run the tests in apps/api/test
folder.
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.
You may also view and manage the application's queue at <base url>/queues.
npm run lint
npm run format
Contributions, issues, and feature requests are welcome!
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.
-
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, whereasGraph Service
is for users who are already on DSNP.
- The
This project is Apache 2.0 licensed.