Coder Social home page Coder Social logo

swagreads's Introduction

logo

Swagreads is a full-stack, single-page book management application inspired by Goodreads. Users can create bookshelves, shelve books, write book reviews and mark books as read, unread, want-to-read, or currently reading. Swagreads consists of a PostgreSQL database, a Ruby on Rails backend and a React/Redux frontend.


Features and Implementation

Bookshelves

  • Users can view bookshelves, browse all shelved books, and create new bookshelves directly from the bookshelf index page: add shelf shelve book

The bookshelf carousel feature is implemented using the pure-react-carousel library. The React component responsible for rendering the bookshelves is BookShelfIndex, which renders several BookshelfIndexItems, which in turn render pure-react-carousel Slider components, illustrated below:

...

render() {
    return(
      <div>
        <h3 className='shelf-title'>{this.props.bookshelf.name}</h3>
        <CarouselProvider
         naturalSlideWidth={135}
         naturalSlideHeight={200}
         totalSlides={this.props.bookshelf.book_ids.length}
         visibleSlides={3}>

           <Slider style={{height: '200px', display: 'flex', 'justifyContent': 'space-between'}}>
             {this.props.bookshelf.book_ids.map((id, index) =>(<Slide index={index} key={id} style={{'width': '150px', 'margin': '0 50px'}}>
               <Link to={`/books/${id}`}>
                 <Image style={{height: '200px', width: '140px'}} src ={this.props.books[id].image_url}></Image>
               </Link>
             </Slide>))}
           </Slider>
           <div className='slider-button-container'>
             <ButtonBack className='slider-button'>back</ButtonBack>
             <ButtonNext className='slider-button'>next</ButtonNext>
           </div>
       </CarouselProvider>
     </div>
   );
  }
}

export default withRouter(BookshelfIndexItem);

Book Reviews

  • Users can write book reviews using the book review form on the Book Show page. The component responsible for rendering the book review form is set to only render if the user hasn't already reviewed the current book:

add review

Future Additions/Improvements

  • Bookshelf Detail View: a show page for each individual bookshelf which allowing the user to edit the books in that shelf directly from the bookshelf page.

  • Book recommendations: an engine which generates book recommendations for each user based on their book ratings and the book ratings of similar users.

  • Fix - usernames on comments: edit the review index item so that the username attached to the review's author_id is displayed.

-- Oct 2019 --

Redo entire frontend lmao what the hell

swagreads's People

Contributors

rjacobson16 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.