How egstar/myreads works
MyReads is a React book-tracking app: users browse books grouped by reading shelf, move books between shelves, and search for books to add. App owns the book collection and loads it from the Books API; shelf changes update the API and refresh that collection. Search results are displayed as books with shelf controls, while book cards also provide a detail preview. The README documents the API’s getAll, update, and search capabilities. Some less-central files are represented only where the sampled imports establish their role.
Main entry points: App.js App state and routes · BooksAPI.js Books API client · Search.js Search controller · Book.js Book card and preview
Components 13
App routing and state
- App state and routes
src/Components/App/App.js - Route outlet
src/Components/Main/Index.js - Home route adapter
src/Components/Main/Main.js
Shelf and book UI
- Shelf home view
src/Views/Home/Home.js - Shelf lists
src/Components/Shelves/Shelves.js - Book card and preview
src/Components/Book/Book.js - Book display
src/Views/Book/Book.js - Shelf selector
src/Components/Shelves/ShelfUpdate.js
Book search
- Search controller
src/Components/Search/Search.js - Search results view
src/Views/Search/Search.js
Books API
- Books API client
src/Backend/BooksAPI.js
Other components
- Reader
- Books API service
Connections 15
- Reader → App state and routes: opens app
- App state and routes → Route outlet: routes through
src/Components/App/App.js - App state and routes → Home route adapter: renders home route
src/Components/App/App.js - App state and routes → Search controller: renders search route
src/Components/App/App.js - App state and routes → Books API client: loads shelf books
src/Components/App/App.js - Home route adapter → Shelf home view: renders
src/Components/Main/Main.js - Shelf home view → Shelf lists: renders shelf lists
src/Views/Home/Home.js - Shelf lists → Book card and preview: renders shelf books
src/Components/Shelves/Shelves.js - Book card and preview → Book display: renders book display
src/Components/Book/Book.js - Book display → Shelf selector: renders selector
src/Views/Book/Book.js - Shelf selector → Books API client: updates shelf and reloads
src/Components/Shelves/ShelfUpdate.js - Search controller → Books API client: loads and searches books
src/Components/Search/Search.js - Search controller → Search results view: renders results view
src/Components/Search/Search.js - Search results view → Book card and preview: renders result books
src/Views/Search/Search.js - Books API client → Books API service: requests books
src/Backend/BooksAPI.js