{"id":18387792,"url":"https://github.com/octo-technology/tezos-link","last_synced_at":"2025-10-04T09:29:30.163Z","repository":{"id":40289647,"uuid":"239727735","full_name":"octo-technology/tezos-link","owner":"octo-technology","description":"Your gateway to the Tezos network","archived":false,"fork":false,"pushed_at":"2023-03-06T23:08:40.000Z","size":18671,"stargazers_count":12,"open_issues_count":18,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-22T10:24:02.633Z","etag":null,"topics":["tezos"],"latest_commit_sha":null,"homepage":"https://tezoslink.io/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octo-technology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-11T09:51:14.000Z","updated_at":"2022-04-13T07:50:18.000Z","dependencies_parsed_at":"2024-11-06T01:53:13.451Z","dependency_job_id":"21c25789-aeba-4cc3-b8ae-06e1c8be7e02","html_url":"https://github.com/octo-technology/tezos-link","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octo-technology%2Ftezos-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octo-technology%2Ftezos-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octo-technology%2Ftezos-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octo-technology%2Ftezos-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octo-technology","download_url":"https://codeload.github.com/octo-technology/tezos-link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247577871,"owners_count":20961191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tezos"],"created_at":"2024-11-06T01:27:50.434Z","updated_at":"2025-10-04T09:29:30.041Z","avatar_url":"https://github.com/octo-technology.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tezos Link\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/octo-technology/tezos-link)](https://goreportcard.com/report/github.com/octo-technology/tezos-link) ![Build](https://github.com/octo-technology/tezos-link/workflows/Build/badge.svg?branch=master)\n\nTezos link is a gateway to access to the Tezos network aiming to improve developer experience when developing Tezos dApps.\n\n# Table of Contents\n\n- [Project organization](#project-organization)\n- [Run services locally on the machine](#run-services-locally-on-the-machine)\n- [Build all services](#build-all-services)\n- [Tests all services](#tests-all-services)\n- [Frontend](#frontend)\n- [Services](#services)\n  - [API](#api)\n  - [Proxy](#proxy)\n  - [Snapshot exporter](#snapshot-exporter)\n- [Infrastructure](#infrastructure)\n  - [Architecture](#architecture)\n  - [Requirements](#requirements)\n  - [How To Deploy](#how-to-deploy)\n- [Documentation](#documentation)\n- [References](#references)\n\n# Project Organization\n\nThe repository is currently following this organization:\n\n```\n.\n├── api          # api documentation\n├── build        # packaging\n├── cmd          # mains\n├── config       # config parsers\n├── data         # config and migrations\n├── infra        # infrastructure\n├── internal     # services\n├── test         # test-specific files\n└── web          # frontend\n    └── public\n        └── docs # usage documentation\n```\n\n## Run services locally on the machine with mockup blockchain node\n\n\u003e Blockchain nodes are mocked up for development environment the be as lightweight as possible. \n\n### Requirements\n\n- `Docker`\n- `docker-compose`\n- `Yarn` (setup with 1.22.0)\n- `Golang` (setup with 1.13)\n- `GNU Make` (setup with 3.81)\n- `Node.js` (setup with 11.14.0)\n\n### How to\n\nTo run services locally on the machine, you will need to run those commands :\n\n```bash\n$\u003e make deps\n$\u003e make build-docker\n$\u003e make run-dev\n```\n\nIt will run:\n\n- `tezos-link_proxy`\n- `tezos-link_proxy-carthagenet`\n- `tezos-link_api`\n- `mockserver/mockserver:mockserver-5.9.0` (mocking a blockchain node)\n- `postgres:9.6`\n\nThe only endpoint served by the blockchain mock is:\n\n```bash\ncurl -X PUT localhost:8001/v1/\u003cYOUR_PROJECT_ID\u003e/mockserver/status\n```\n\n## Test all services\n\n### Requirements\n\n- `Golang` (setup with 1.13)\n- `GNU Make` (setup with 3.81)\n\nFor integrations tests only:\n\n- `Docker`\n- `docker-compose`\n- `yarn`\n\n### How to\n\nTo run the `unit tests`, you can use the command\n\n```bash\n$\u003e make unit-test\n```\n\nTo run `integration tests` locally, you will need to run following commands :\n\n```bash\n# We build docker images and run them\n$\u003e make build-docker \u0026 make run\n\n# We run integration tests...\n$\u003e make integration-test\n\n# And we clean the environment when we are done\n$\u003e docker-compose down\n```\n\n## Build all services and frontend\n\n### Requirements\n\n- `GNU Make` (setup with 3.81)\n- `Golang` (setup with 1.13)\n- `Yarn` (setup with 1.22.0)\n- `Node.js` (setup with 11.14.0)\n\n### How to\n\nTo build your project, you need first to `install dependencies`:\n\n```bash\n$\u003e make deps\n```\n\nAfter, you can run the `build` with\n\n```bash\n$\u003e make build\n```\n\n## Frontend\n\n### Requirements\n\n- `Yarn` (setup with 1.22.0)\n- `Node.js` (setup with 11.14.0)\n\nTo build the frontend, you need first to `install dependencies`:\n\n```bash\n$\u003e make deps\n```\n\n### Run\n\nTo run the frontend, execute:\n\n```bash\n$\u003e cd web \u0026\u0026 yarn start-local\n```\n\n### Build\n\nTo run the frontend, execute:\n\n```bash\n$\u003e make build-frontend\n```\n\n### Deploy\n\n\u003e You will need AWS credentials setup on your machine, see [AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)\n\nTo run the frontend, execute:\n\n```bash\n$\u003e make deploy-frontend\n```\n\n## Services\n\n### API\n\nREST API to manage projects and get project's metrics.\n\n#### Dependencies\n\n- `PostgreSQL` (setup with 9.6)\n\n#### Environment variables\n\n- `DATABASE_URL` (default: `postgres:5432`)\n- `DATABASE_USERNAME` (default: `user`)\n- `DATABASE_PASSWORD` (default: `pass`)\n- `DATABASE_TABLE` (default: `tezoslink`)\n- `DATABASE_ADDITIONAL_PARAMETER` (default: `sslmode=disable`)\n- `SERVER_HOST` (default: `localhost`)\n- `SERVER_PORT` (default: `8000`)\n\n### Proxy\n\n- HTTP proxy in front of the nodes\n- In-memory (LRU) cache\n\n#### Dependencies\n\n- `PostgreSQL` (setup with 9.6)\n\n#### Environment variables\n\n- `DATABASE_URL` (default: `postgres:5432`)\n- `DATABASE_USERNAME` (default: `user`)\n- `DATABASE_PASSWORD` (default: `pass`)\n- `DATABASE_TABLE` (default: `tezoslink`)\n- `DATABASE_ADDITIONAL_PARAMETER` (default: `sslmode=disable`)\n- `ARCHIVE_NODES_URL` (default: `node`)\n- `TEZOS_ARCHIVE_PORT` (default: `1090`)\n- `ROLLING_NODES_URL` (default: `node`)\n- `TEZOS_ROLLING_PORT` (default: `1090`)\n- `SERVER_PORT` (default: `8001`)\n\n### Snapshot exporter lambda\n\nLambda function scheduled with a `Cloudwatch Rule` cronjob, connect to a node with SSH and trigger a snapshot export.\n\n#### Deploy for testing and  for development purpose\n\nIndividual deployment of the lambda is possible for testing and development purpose.\n\n\u003e You will need AWS credentials setup on your machine, see [AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)\n\nIt will build, send to the S3 bucket and update snapshot lambda code:\n\n```bash\n$\u003e make build-unix\n$\u003e make deploy-snapshot-lambda\n```\n\nTo execute the lambda, run:\n\n```bash\naws lambda invoke --region=eu-west-1 --function-name=snapshot --log Tail output.txt | grep \"LogResult\"| awk -F'\"' '{print $4}' | base64 --decode\n```\n\n### Metrics cleaner lambda\n\nLambda function scheduled with a `Cloudwatch Rule` cronjob, connect to a node with SSH and trigger a metrics clean.\n\n#### Deploy for testing and development purpose\n\nIndividual deployment of the lambda is possible for testing and development purpose.\n\n\u003e You will need AWS credentials setup on your machine, see [AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)\n\nIt will build, send to the S3 bucket and update metrics-cleaner lambda code:\n\n```bash\n$\u003e make build-unix\n$\u003e make deploy-metrics-cleaner-lambda\n```\n\nTo execute the lambda, run:\n\n```bash\naws lambda invoke --region=eu-west-1 --function-name=metrics --log Tail output.txt | grep \"LogResult\"| awk -F'\"' '{print $4}' | base64 --decode\n```\n\n#### Environment variables\n\nThese environment variables are set in `infra/dev.tfvars`.\n\n- `NODE_USER` (default: `ec2-user`)\n- `S3_REGION` (default: `eu-west-1`)\n- `S3_BUCKET` (default: `tzlink-snapshot-lambda-dev`)\n- `S3_LAMBDA_KEY` (default: `snapshot_lambda_key`)\n\n## Infrastructure\n\n### Architecture\n\n![Architecture](infra/img/architecture.png \"Architecture\")\n\n### Requirements\n\n- `Terraform` (version == 0.12.20)\n- `Terragrunt` (version == 0.21.4)\n\n\u003e We recommend to install `tf-env` to manage easily your terraform environments.\n\n### How to deploy\n\nAll the files related to the infrastructure are based on the `infra` folder.\n\nFirst, you will need to update the configuration (if needed). To do this, you will find `common.tfvars` and `\u003cenv\u003e.tfvars` in the folder `infra/terragrunt`.\n\n\u003e Currently, database password is encrypted inside the file `vaulted.tfvars`. To see it content, you will need ansible-vault and a passphrase to decrypt it with the command `ansible-vault decrypt vaulted.tfvars`.\n\u003e\n\u003e This will be changed soon with AWS Secret Manager.\n\nWhen they are updated, we will use Terragrunt to deploy our infrastructure by running:\n\n```bash\n# To check if all is OK\n$\u003e terragrunt plan-all\n\n# To apply the change\n$\u003e terragrunt apply-all\n```\n\nIf you want to apply a specific part of the infrastructure (ex: `00_network`), you can run\n\n```bash\n$\u003e cd infra/terragrunt/00_network\n\n# To check if all is OK\n$\u003e terragrunt plan\n\n# To apply the change\n$\u003e terragrunt apply\n```\n\n## Documentation\n\nThe documentation usage is located at `web/public/docs`.\n\nIt contains the various Markdown files served by the application at `/documentation`.\n\n## References\n\nThis repo took some ideas \u0026 code from:\n\n- https://github.com/tezexInfo/TezProxy\n- https://github.com/AymericBethencourt/serverless-mern-stack/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focto-technology%2Ftezos-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focto-technology%2Ftezos-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focto-technology%2Ftezos-link/lists"}