OperatorSync

module
v0.0.0-...-e0ac650 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2023 License: AGPL-3.0

README

xSync Server

Backend server for xSync

Deploy

We recommend deploying xSync server in docker or kubernetes.

Requirements
Docker
  1. Copy environment files from deploy/env/.example to deploy/env
  2. Edit environment files to match your requirements, like:
    • Set ETHEREUM_PRIVATE_KEY to your operator's private key in worker.env.
    • Set IPFS_ENDPOINT to your own IPFS-Upload-Relay server's URI (like https://upload-relay.example.ltd).
    • Edit other fields in different files (like rsshub.stateful.env) for rsshub with platforms logged in
  3. Build services by make build-docker
  4. Start services by make prod-start

For more details, please refer to Makefile.

Kubernetes

Refer to .github/workflows/docker-build-push.yml

Develop

This server parse users' RSS feeds to structured data, and then post them on chain.

Prepare development environment
  1. Make sure you've installed both docker and docker-compose.
  2. Start deps by make dev
Add a new platform
  1. Edit SUPPORTED_PLATFORM in common/consts/platform.go, add target platform's basic information.
  2. Create a new directory under app/worker/platforms/.
  3. We need to implement 2 functions, one for account validate and the other for feed collect. For implementing details, please refer to other platforms.
  4. Call account validate func in app/worker/rpc/jobs/validate_account.go, and call feed collect func in app/worker/mq/jobs/dispatch/collect_feeds.go.
  5. Time to test 🎉

If there's any further questions, please open an issue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL