Skip to content

A book review tool for Leanpub's Markdown Book Format

Notifications You must be signed in to change notification settings

redtachyons/twist-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twist (v2)

Maintainability

This is an attempt to rewrite my Rails-based book review app in Hanami, GraphQL, React, Apollo, Flow and whatever other Cool Hipster Tech™ I can get my grubby hands on.

It is a work-in-progress and quite experimental.

My goal is to have this fully developed enough so that I can use it for reviewing my Leanpub books.

Structure / Philosophy

My philosophy for developing this app revolves around separating two main parts of the codebase:

  1. The backend: retrieves data from data sources (GitHub / the database), and presents it for frontend consumption
  2. The frontend: retrieves data from the Backend, has no idea where it came from, and presents it to the user

I'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:

DB <-> Backend Repositories <-> Backend GraphQL endpoint <-> Frontend <-> Browser

I 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.

I 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, 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.

READMEs

The READMEs for the backend and the frontend can be found in their respective apps.

About

A book review tool for Leanpub's Markdown Book Format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 48.6%
  • JavaScript 44.7%
  • CSS 6.2%
  • Other 0.5%