Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeantessier/book-reviews
The same app built multiple times with different technology stacks.
https://github.com/jeantessier/book-reviews
grails graphql kafka mongodb mysql nodejs ruby ruby-on-rails
Last synced: about 9 hours ago
JSON representation
The same app built multiple times with different technology stacks.
- Host: GitHub
- URL: https://github.com/jeantessier/book-reviews
- Owner: jeantessier
- Created: 2016-05-26T02:03:27.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T22:43:39.000Z (12 days ago)
- Last Synced: 2024-12-12T17:46:48.972Z (10 days ago)
- Topics: grails, graphql, kafka, mongodb, mysql, nodejs, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://jeantessier.github.io/book-reviews/
- Size: 13.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# book-reviews
I am exploring various technology stacks for web-based apps for my own personal
education.## Context
I am building an app to collect reviews of books. The app will be multi-user
so I can experiment with authentication and authorization frameworks in each
technology stack.## Requirements
1. Anonymous user can view a book and its reviews.
1. Anonymous user can search books and reviews by keyword.
1. User can register.
1. User can login.
1. User can write a review of a book.
1. User can edit their own reviews.
1. Admin user can edit anyone's reviews.
1. Admin user can enter a new book.
1. Admin user can edit a book's data.## Variations
Various storage options:
* Relational database (MySQL)
* NoSQL (MongoDB, Neo4j, Redis)Various stacks for middleware, returning both HTML and JSON:
* NodeJS
* Grails
* Micronaut
* Ruby on Rails
* Django
* Spring Boot and/or Ratpack and/or JHipsterVarious frontend stacks:
* HTML (w/ jQuery)
* AngularJS
* React## Model
![Book Reviews Schema](book_reviews_schema.png)
### Book
* `name` (unique string, no spaces, underscores separate words)
* `titles` (an ordered list of links with HTML markup)
* `authors` (an ordered list of names with HTML markup)
* `publisher` (a string)
* `years` (an ordered list of year designations with HTML markup)Books have a one-to-many relationship to reviews.
A simple example:
```json
{
"name": "Mortality",
"titles": [
{
"title": "Mortality",
"link": "http://amzn.com/1455502758"
}
],
"authors": [
"Christopher Hitchens"
],
"publisher": "Twelve (Hachette)",
"years": [
"2012"
]
}
```A more complex sample:
```json
{
"name": "Discours_sur_les_sciences_et_les_arts",
"titles": [
{
"title": "Discours sur les sciences et les arts",
"link": "http://athena.unige.ch/athena/rousseau/rousseau_discours_sciences_arts.html"
},
{
"title": "Discours sur l'origine et les fondements de l'inégalité parmis les hommes",
"link": "http://athena.unige.ch/athena/rousseau/rousseau_discours_inegalite.html"
},
{
"title": "Discourse on the Arts and Sciences",
"link": "https://en.wikipedia.org/wiki/Discourse_on_the_Arts_and_Sciences"
},
{
"title": "Discourse on the Origin and Basis of Inequality Among Men",
"link": "http://www.constitution.org/jjr/ineq.htm"
}
],
"authors": [
"Jean-Jacques Rousseau"
],
"publisher": "Garnier-Flammarion",
"years": [
"1971",
"(1750 & 1755)"
],
}
```### User
The `User` entity is used to authenticate the app's user and to make sure they can edit the reviews they have created, but not the reviews of other users.
* `name`
* `email` (unique)
* `password` (encrypted)
* `salt` (for password encryption)Users have a one-to-many relationship to reviews.
The `salt` is used in the encryption of the `password`, combined with an application-wide secret.
An example:
```json
{
"name": "Jean Tessier",
"email": "[email protected]",
"password": "0123456789abcdef9842ed9614143f40ca11e5c24da1d1a115087efc6dc2205ce46ee788737dfe06d02ad5d2c5ba67b1ef571dd00bd50136ba2ed5e9f6301e0f",
"salt": "0123456789abcdef0123456789abcdef"
}
```### Review
* `body` (HTML markup)
* `start` (an optional date for when the reviewer started reading the book)
* `stop` (an optional date for when the reviewer finished reading the book)Each review also has a relationship with a book and a user who is the reviewer.
An example with embedded markup for paragraphs and lists:
```json
{
"body": "Hitchens told his editor he would write about anything except sports. So when he was diagnosed with cancer, he wrote about it. And as he approached his own end, he kept on writing. He takes us on an intimate ride along as he explores his attitude towards death.
Early on, when death is but a shadow on the distant horizon, Hitchens is more outward-facing. He deals with religion and people wishing him well (and sometimes not). As the book and his cancer progress, he sheds externalities and slowly gets more personal.
Breakdown by chapter:
- Diagnosis, dealing with the news, side effects of therapy.
- People express their religious sentiments. He'll have none of it.
- The medical establishment tries everything to fight the disease. More false hopes.
- People's euphemisms to avoid talking about death.
- Losing his voice strikes really close to home. Voice and expression are at the core of existence.
- How people choose to die. How what almost kills him is not making him stronger. Starts to yearn for the end.
- Personal observations on pain and fear, in the face of torture ... or medical procedures.
- Unfinished thoughts. Fitting that at the end, even his mind comes apart.
Hitchens mentions journalist John Diamond who also wrote a regular column about his experience with cancer, up to his death. He mentions how his story \"lacked compactness toward the end...\" He didn't fall into the same trap. The book is concise and to the point, a quick read that goes straight to the point.
On 2014-01-26, I came upon this New York Times article where Dr. Paul Kalanithi recounts when he was diagnosed with lung cancer. He talks about the patient-doctor relationship and how focusing too much on survival rates can make you miss the important things in life. I can't help but wonder at the timing coincidence of seeing this article just as I finished reading Mortality. Is it that lots of people are currently contemplating their own mortality these days? Or is it me who is more sensitized to it because I just read this book?
On 2015-02-19, I came upon another New York Times article where Dr. Oliver Sacks talks about his cancer diagnosis. I find it interesting that at this point, he is looking back upon his life. Hitchens was more focused on the present and the future, the pains and the moments to come.
",
"start": "2014-01-12",
"stop": "2014-01-16"
}
```An example where the reviewer is still in the middle of reading the book:
```json
{
"body": "I read this back in high school. Giving it a refresher.
More to come.
",
"start": "2016-05-24"
}
```Sample where the reviewer hasn't even read the book:
```json
{
"body": "I haven't read it, but I still have an opinion.
"
}
```## Data
See the [data/](data) folder for sample data.