{"id":13878792,"url":"https://github.com/radar/twist-v2","last_synced_at":"2025-03-16T07:32:32.733Z","repository":{"id":38272151,"uuid":"123876876","full_name":"radar/twist-v2","owner":"radar","description":"A book review tool for Leanpub's Markdown Book Format","archived":false,"fork":false,"pushed_at":"2023-05-05T07:29:15.000Z","size":7197,"stargazers_count":128,"open_issues_count":27,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-27T05:51:13.539Z","etag":null,"topics":["dry-rb","graphql","postgresql","react","rom-rb"],"latest_commit_sha":null,"homepage":"https://twist.now.sh","language":"Ruby","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/radar.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}},"created_at":"2018-03-05T06:46:54.000Z","updated_at":"2025-01-10T16:23:17.000Z","dependencies_parsed_at":"2024-01-13T20:40:17.265Z","dependency_job_id":"85461447-1dc2-4fbe-9f7f-ac2a2562009d","html_url":"https://github.com/radar/twist-v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radar%2Ftwist-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radar%2Ftwist-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radar%2Ftwist-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radar%2Ftwist-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radar","download_url":"https://codeload.github.com/radar/twist-v2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806052,"owners_count":20350775,"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":["dry-rb","graphql","postgresql","react","rom-rb"],"created_at":"2024-08-06T08:02:00.144Z","updated_at":"2025-03-16T07:32:32.043Z","avatar_url":"https://github.com/radar.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Twist (v2)\n\nThis is a rewrite of my [Rails-based book review app](http://github.com/radar/twist) in [rom-rb](https://rom-rb.org/), [dry-rb](https://dry-rb.org/), (some parts of) [Hanami](https://hanamirb.org/), [Sidekiq](https://sidekiq.org/), [GraphQL](https://graphql.org/), [React](https://reactjs.org/), [Reach Router](https://reach.tech/router/), [Apollo](https://www.apollographql.com/), [TypeScript](https://www.typescriptlang.org/), [GraphQL Code Generator](https://graphql-code-generator.com/), [Tailwind](https://tailwindcss.com/), and whatever other Cool Hipster Tech™ I can get my grubby hands on.\n\nI am currently using this application to let early reviewers read my books and to leave comments on them.\n\n![Preview](preview.png)\n\n# Structure / Philosophy\n\nMy philosophy for developing this app revolves around separating two main parts of the codebase:\n\n1. The backend: retrieves data from data sources (GitHub / the database), and presents it for frontend consumption\n2. The frontend: retrieves data from the Backend, has no idea where it came from, and presents it to the user\n\nI'm hoping with this app to demonstrate that it _is_ possible to separate these two layers into two separate applications. My mental map of data flow within the application goes something like this:\n\n```\nDB \u003c-\u003e Backend Repositories \u003c-\u003e Backend GraphQL endpoint \u003c-\u003e Frontend \u003c-\u003e Browser\n```\n\nI want to demonstrate with this app that it's possible to build a frontend that only has knowledge of how to find data, not how it is constructed. In this app, the `frontend` component knows only that it can find data at `/graphql`. It has no knowledge at all about how the backend collects that data for presentation.\n\nI want to also demonstrate that it's possible to build a backend app that is data-store agnostic. With the use of the [Repository Pattern](https://msdn.microsoft.com/en-us/library/ff649690.aspx), the backend application knows only that it can talk to the repositories to collect the data. The backend application knows _nothing_ about how that data is collected. Today, the repositories talk to a PostgreSQL database, but tomorrow it could just as easily be a Redis store and (assuming the data returned is the same), the backend app wouldn't know the difference.\n\n## READMEs\n\nThe READMEs for the [backend](http://github.com/radar/twist-v2/tree/master/backend/README.md) and the [frontend](http://github.com/radar/twist-v2/tree/master/frontend/README.md) can be found in their respective apps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradar%2Ftwist-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradar%2Ftwist-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradar%2Ftwist-v2/lists"}