├── .eslintrc.js ├── .gitignore ├── DOCUMENTS └── images │ ├── Book.jpg │ ├── BookTyping.jpg │ ├── Shelf.jpg │ ├── Shelves.jpg │ └── Signin.jpg ├── README.md ├── assets └── img │ ├── arrow.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── icon.png │ ├── logo.png │ └── shelf.png ├── client ├── components │ ├── About.js │ ├── App.js │ ├── Book.js │ ├── BookNotesHeader.js │ ├── BookRow.js │ ├── Error.js │ ├── Login.js │ ├── NoteRow.js │ ├── Search.js │ ├── Shelf.js │ ├── ShelfRow.js │ └── Shelves.js ├── index.html ├── index.js └── styles.css ├── package-lock.json ├── package.json ├── server ├── controllers │ ├── BookController.js │ ├── grShelfController.js │ ├── grShelvesController.js │ ├── oauthController.js │ └── xmlController.js ├── models │ └── BookNoteModel.js ├── routes │ ├── goodreads.js │ └── oauth.js └── server.js └── webpack.config.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['airbnb-base'], 3 | env: { 4 | browser: true, 5 | node: true, 6 | es6: true, 7 | jest: true, 8 | }, 9 | rules: { 10 | 'consistent-return': 'off', 11 | 'func-names': 'off', 12 | 'no-console': 'off', 13 | curly: 'off', 14 | 'react/destructuring-assignment': 'off', 15 | 'react/jsx-filename-extension': 'off', 16 | 'react/prop-types': 'off', 17 | 'react/jsx-wrap-multilines': 'off', 18 | 'react/jsx-one-expression-per-line': 'off', 19 | 'react/jsx-closing-tag-location': 'off', 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | .DS_Store 3 | 4 | # dependencies 5 | node_modules/ 6 | 7 | # logs 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | *.log 12 | 13 | # output from webpack 14 | dist/ 15 | 16 | # zip file for initial aws deployment 17 | *.zip 18 | 19 | # jest coverage 20 | coverage/ 21 | 22 | .vscode/ 23 | 24 | # environment variables 25 | .env -------------------------------------------------------------------------------- /DOCUMENTS/images/Book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/DOCUMENTS/images/Book.jpg -------------------------------------------------------------------------------- /DOCUMENTS/images/BookTyping.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/DOCUMENTS/images/BookTyping.jpg -------------------------------------------------------------------------------- /DOCUMENTS/images/Shelf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/DOCUMENTS/images/Shelf.jpg -------------------------------------------------------------------------------- /DOCUMENTS/images/Shelves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/DOCUMENTS/images/Shelves.jpg -------------------------------------------------------------------------------- /DOCUMENTS/images/Signin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/DOCUMENTS/images/Signin.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReadingNotes 2 | 3 | A GoodReads companion application for you to jot down private notes about the books you're reading. 4 | 5 | Sign in with your GoodReads account and view all of your shelves. Choose a shelf, then choose a book, and write your personal notes. Write about how you love this author and how they describe the setting so well. Or write about how much it irritates you that -. Write all your thought because these notes are just for you. You can look back on all your books and recall if you should pick up another book by that author. 6 | 7 | # Views 8 | 9 |

10 | 11 | 12 | 13 | 14 | 15 |

16 | -------------------------------------------------------------------------------- /assets/img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/arrow.png -------------------------------------------------------------------------------- /assets/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/favicon-32x32.png -------------------------------------------------------------------------------- /assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/favicon.ico -------------------------------------------------------------------------------- /assets/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/icon.png -------------------------------------------------------------------------------- /assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/logo.png -------------------------------------------------------------------------------- /assets/img/shelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosedamasco/ReadingNotes/2b97adb77cbcc61b31743f4be7df9f962412d63c/assets/img/shelf.png -------------------------------------------------------------------------------- /client/components/About.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const About = () => { 4 | return ( 5 |
6 |

About Reading Notes

7 |

8 | Hello there! Thank you for coming to Reading Notes, a GoodReads companion application to jot 9 | down private notes about the books you're reading. 10 |

11 |
12 |

13 | GoodReads does allow you to add private notes for each book on your shelf, but sometimes 512 14 | characters just isn't enough. I read so many books, so I personally like to jot down notes 15 | as I'm reading to remind myself later on if I loved a book by an author or not. This way, if 16 | I come across a fun synopsis, I can check real quick if I've enjoyed the writing style by 17 | that same author before. 18 |

19 |
20 |

21 | Sign in via your GoodReads account and see all of your shelves and books. Pick a book and 22 | start noting your thoughts. Are you loving how the author describes the room so vividly that 23 | you can actually see it? Is the main character TSTL? Note any and all things you want to 24 | remember for later. 25 |

26 | 27 |

Future features:

28 | 35 |
36 |
37 | ); 38 | }; 39 | 40 | export default About; 41 | -------------------------------------------------------------------------------- /client/components/App.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { Switch, Route, Link } from 'react-router-dom'; 3 | import Login from './Login'; 4 | import Shelves from './Shelves'; 5 | import Shelf from './Shelf'; 6 | import Book from './Book'; 7 | import About from './About'; 8 | import Search from './Search'; 9 | import Error from './Error'; 10 | 11 | const App = () => { 12 | const [isSignedIn, setSignedIn] = useState(false); 13 | 14 | useEffect(() => { 15 | const hasUserIdCookie = document.cookie.includes('userid'); 16 | setSignedIn(hasUserIdCookie); 17 | }, []); 18 | 19 | const signout = () => { 20 | // delete cookie by setting expire date to past date 21 | document.cookie = 'userid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; 22 | setSignedIn(false); 23 | }; 24 | 25 | const links = ( 26 | 51 | ); 52 | 53 | return ( 54 |
55 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
70 |
71 | ); 72 | }; 73 | 74 | export default App; 75 | -------------------------------------------------------------------------------- /client/components/Book.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import NoteRow from './NoteRow'; 3 | import BookNotesHeader from './BookNotesHeader'; 4 | 5 | const Book = () => { 6 | const id = window.location.pathname.split('/')[2]; 7 | const [header, setHeaders] = useState([

Loading Title...

]); 8 | const [bookNotes, setBookNotes] = useState([

Loading Notes...

]); 9 | 10 | const [location, setLocation] = useState(''); 11 | const [note, setNote] = useState(''); 12 | 13 | const [locClass, setLocClass] = useState(''); 14 | const [noteClass, setNoteClass] = useState(''); 15 | 16 | useEffect(() => { 17 | fetch(`/gr/book/${id}`) 18 | .then((response) => response.json()) 19 | .then(({ book, notes }) => { 20 | // add book header with image and title 21 | // and notes header (loc, note, date) 22 | setHeaders([ 23 | , 24 | ]); 25 | // add notes 26 | const tempNotes = []; 27 | notes.forEach((oldNote) => { 28 | tempNotes.push( 29 | 30 | ); 31 | }); 32 | setBookNotes(tempNotes); 33 | }); 34 | }, []); 35 | 36 | const updateLocation = (e) => { 37 | const tempLocation = e.target.value; 38 | setLocation(tempLocation); 39 | }; 40 | 41 | const updateNote = (e) => { 42 | const tempNote = e.target.value; 43 | setNote(tempNote); 44 | }; 45 | 46 | const saveNote = () => { 47 | // require location and note fields 48 | if (location === '') { 49 | setLocClass('missing-input'); 50 | return; 51 | } 52 | if (note === '') { 53 | setNoteClass('missing-input'); 54 | setLocClass(''); 55 | return; 56 | } 57 | 58 | // update input fields to be clear and no red borders 59 | setLocClass(''); 60 | setNoteClass(''); 61 | setLocation(''); 62 | setNote(''); 63 | 64 | // add input to view 65 | const today = new Date(); 66 | const date = `${today.getMonth() + 1}/${today.getDate()}/${today.getFullYear()}`; 67 | const newNote = ; 68 | setBookNotes([...bookNotes, newNote]); 69 | 70 | // post new note to db 71 | fetch(`/gr/book`, { 72 | method: 'POST', 73 | headers: { 74 | 'Content-Type': 'application/json', 75 | }, 76 | body: JSON.stringify({ id, location, note, date }), 77 | }); 78 | }; 79 | 80 | return ( 81 |
82 | {header} 83 |
{bookNotes}
84 |
85 | { 92 | updateLocation(e); 93 | }} 94 | /> 95 |