{"id":21538352,"url":"https://github.com/rarimo/rarime-points-svc","last_synced_at":"2026-01-07T09:04:34.472Z","repository":{"id":218937137,"uuid":"747305203","full_name":"rarimo/rarime-points-svc","owner":"rarimo","description":"Core service of Rarimo Points System","archived":false,"fork":false,"pushed_at":"2024-05-22T10:19:08.000Z","size":22009,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-22T11:34:08.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rarimo.github.io/rarime-points-svc/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rarimo.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":"2024-01-23T17:08:31.000Z","updated_at":"2024-06-28T14:00:12.209Z","dependencies_parsed_at":"2024-03-25T09:46:18.891Z","dependency_job_id":"71011e57-90b7-4b04-ab31-569b64a5e248","html_url":"https://github.com/rarimo/rarime-points-svc","commit_stats":null,"previous_names":["rarimo/rarime-points-svc"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Frarime-points-svc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Frarime-points-svc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Frarime-points-svc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Frarime-points-svc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rarimo","download_url":"https://codeload.github.com/rarimo/rarime-points-svc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246076938,"owners_count":20719894,"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":[],"created_at":"2024-11-24T04:11:43.683Z","updated_at":"2026-01-07T09:04:34.438Z","avatar_url":"https://github.com/rarimo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rarime-points-svc\n\n## Description\n\nCore service of Rarimo Points System\n\n## Install\n\n```\ngit clone github.com/rarimo/rarime-points-svc\ncd rarime-points-svc\ngo build main.go\nexport KV_VIPER_FILE=./config.yaml\n./main migrate up\n./main run service\n```\n\n## API documentation\n\n[Online docs](https://rarimo.github.io/rarime-points-svc/) are available.\n\nAll endpoints from docs MUST be publicly accessible.\n\n### Private endpoints\n\nPrivate endpoints are not documented and MUST only be accessible within the\ninternal network. They do not require authorization in order to simplify back-end\ninteractions with Points service. Package [connector](./pkg/connector) provides\nfunctionality to interact with these endpoints.\n\nThe path for internal endpoints is `/integrations/rarime-points-svc/v1/private/*`.\n\n### Add referrals\n\nPrivate endpoint to set usage count for genesis referral code or create a new\n_System user_ with genesis referral code. _System user_ is unable to claim events or\nwithdraw, it has `is_disabled` attribute set to `true`, so the client app should\nnot allow it interactions with the system, although it is technically possible\nto do other actions.\n\nPath: `/integrations/rarime-points-svc/v1/private/referrals`\nBody:\n```json\n{\n    \"nullifier\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n    \"count\": 2,\n}\n```\nResponse:\n```json\n{\n  \"referral\": \"kPRQYQUcWzW\",\n  \"usage_left\": 2\n}\n```\n\nParameters:\n- `nullifier` - nullifier to create or edit referrals for\n- `count` - number of referral usage\n\n### Local build\n\nWe do use openapi:json standard for API. We use swagger for documenting our API.\n\nTo open online documentation, go to [swagger editor](http://localhost:8080/swagger-editor/) here is how you can start it\n```\n  cd docs\n  npm install\n  npm run start\n```\nTo build documentation use `npm run build` command,\nthat will create open-api documentation in `web_deploy` folder.\n\nTo generate resources for Go models run `./generate.sh` script in root folder.\nuse `./generate.sh --help` to see all available options.\n\nNote: if you are using Gitlab for building project `docs/spec/paths` folder must not be\nempty, otherwise only `Build and Publish` job will be passed.  \n\n## Running from Source\n\n* Run dependencies, based on config example\n* Set up environment value with config file path `KV_VIPER_FILE=./config.yaml`\n* Provide valid config file\n* Launch the service with `migrate up` command to create database schema\n* Launch the service with `run service` command\n\n### Database\nFor services, we do use ***PostgresSQL*** database. \nYou can [install it locally](https://www.postgresql.org/download/) or use [docker image](https://hub.docker.com/_/postgres/).\n\n## Testing\nIn order to run the tests, you need to be in the project directory, have docker and docker compose installed. To start, you need to run the run_tests.sh script.\n\nThe script works as follows:\n1. If there is already an image rarime-points-svc:test - deletes it.\n2. Builds a new rarime-points-svc:test image (some logic mocked)\n3. Starts docker compose with test service and database.\n4. Runs tests\n5. Deletes created containers and everything related to them","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Frarime-points-svc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frarimo%2Frarime-points-svc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Frarime-points-svc/lists"}