{"id":16318576,"url":"https://github.com/vic/verily","last_synced_at":"2025-10-24T05:54:58.176Z","repository":{"id":66386379,"uuid":"97997397","full_name":"vic/verily","owner":"vic","description":"Demo application for APW subscriptions via websockets","archived":false,"fork":false,"pushed_at":"2017-10-18T08:21:26.000Z","size":71,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T09:51:34.532Z","etag":null,"topics":["absinthe-graphql","apollo-phoenix-websocket"],"latest_commit_sha":null,"homepage":"https://github.com/vic/apollo-phoenix-websocket","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-07-22T00:59:26.000Z","updated_at":"2023-09-01T10:44:37.000Z","dependencies_parsed_at":"2023-03-18T22:36:44.288Z","dependency_job_id":null,"html_url":"https://github.com/vic/verily","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vic/verily","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fverily","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fverily/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fverily/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fverily/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/verily/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fverily/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266786798,"owners_count":23983871,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["absinthe-graphql","apollo-phoenix-websocket"],"created_at":"2024-10-10T22:23:58.249Z","updated_at":"2025-10-24T05:54:53.152Z","avatar_url":"https://github.com/vic.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Verily\n\nThis is a demo application to serve as an example of how to use [Apollo Phoenix Websocket](https://github.com/vic/apollo-phoenix-websocket) with Absinthe subscriptions.\n\nVerily implements a mail authentication app, akin to Facebook AccountKit. That is, the user enters\ntheir email and clicks on `Login`, then the application awaits (via gql subscription) for the user\nto verify via a link on their inbox. The app receives the subscription data and logins the user automatically.\n\n### Installation\n\n```shell\n$ git clone https://github.com/vic/verily.git\n$ cd verily\n$ mix deps.get\n$ yarn install\n$ mix phoenix.server\n$ open http://localhost:4000/\n```\n\n### Code\n\nThe backend code is just a simple plug application that exposes a tiny GQL API with Absinthe.\n\nOf these the most interesting one is the `viewer` subscription. It takes a `device_token` as topic \n(in my example, every client, eg mobile device or browser must generate a unique device token for\n its viewer subscription to work) \n\nVerification is made via an `email_login` mutation that basically generates a random verification\ntoken (that will be sent via email) and starts a tiny process using an Elixir Registry. These \nveirfier processes live just five minutes, so that if no one confirms the email, the process\nautomatically dies and the token becomes invalid. When the user cliks on the link with the token,\nthe backend terminates the verifier process and sends the original email to the client via the\nGraphQL websocket subscription.\n\nThe client code is at `web/static/js` and most of it has nothing to do with \nApollo Phoenix Websocket, haha, the apollo client configuration\nis made at `apollo.js` which also prefers to convert promises and observers into xstreams\n(as I just wanted to use them for this example) the api is defined at `api.js`, the `app.js` is\nwhere views and logic is bound together.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fverily","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Fverily","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fverily/lists"}