https://github.com/crossbell-box/operatorsync
Server for Crossbell xSync
https://github.com/crossbell-box/operatorsync
Last synced: about 1 year ago
JSON representation
Server for Crossbell xSync
- Host: GitHub
- URL: https://github.com/crossbell-box/operatorsync
- Owner: Crossbell-Box
- License: agpl-3.0
- Created: 2022-06-30T02:00:14.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-03-28T09:57:07.000Z (about 2 years ago)
- Last Synced: 2024-04-14T02:09:07.275Z (about 2 years ago)
- Language: Go
- Homepage: https://xsync.app
- Size: 757 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xSync Server
Backend server for xSync
## Deploy
We recommend deploying xSync server in docker or kubernetes.
### Requirements
- IPFS-Upload-Relay: Please deploy your own [IPFS-Upload-Relay](https://github.com/NaturalSelectionLabs/IPFS-Upload-Relay) server.
### 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](https://github.com/Crossbell-Box/OperatorSync/blob/develop/.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 :tada:
If there's any further questions, please open an issue.