GithubHelp home page GithubHelp logo

instashop's Introduction

Instashop

Instashop Live

Instashop is a Full-stack single-page app that makes online shopping easier, it allows its users to curated wish lists and share them with friends. Inspired by Svpply and UI/UX modeled after Instagram.

Features & Implementation

Creating and Rendering Posts

Users can create post by simply providing the websites url, the image url and the price. It's also possible to add a caption and a category. After submitting the item is added to their profile. To prevent broken links and optimize storage of images, each image gets uploaded to Cloudinary's CDN, allowing faster delivery and reliability to the user.

image of post-form

def create
    @post = Post.new(post_params)
    new_url = Cloudinary::Uploader.unsigned_upload(@post.image_url, 'user_post')
    @post['image_url'] = new_url['secure_url']
    if @post.save
      render "api/posts/show"
    else
      render json: @post.errors.full_messages, status: 422
    end
  end

Wishlist and Wants

Its possible for the user to expand their wishlist by either creating a new post or by clicking the Want button on other peoples items. These items get added to their profile and can be easily removed by clicking the Remove button. To have a clean and simple design this app uses a hover effect to hide the Want/Remove button, it also makes use of modals to bring detailed information of each item, the modal can be accessed by clicking on any post revealing the items description, price and comments.

image of a users profile

<div className="hov-but">
  <button
  	className="modal-want2"
  	onClick={ this.handleSubmit }>
  	  {this.belongsToUser() ? "Remove" : "Want"}
  </button>
</div>
<Modal
isOpen={this.state.modalOpen}
onAfterOpen={this.onModalOpen}
onRequestClose={this.modalClose}
closeTimeoutMS={200}
contentLabel="Modal"
style={modal}
>

image of a modal

Comments

The user is able to leave comments on posts.

image of a post

Feed, Discover and Follow

In the feed the user can find the posts of all the people they're following, in the Discover tab the user can find new users to follow, there is a horizontal scroll bar showcasing other users posts, this helps the users get an idea of what other people are adding to their wishlist. Every time the user accesses the discovery they get to see randomly selected users, this made possible by creating a simple helper function to shuffle all the users and give the current user new options each time.

image of the discover page

shuffle(posts) {
  for (let i = posts.length - 1; i > 0; i--) {
      let j = Math.floor(Math.random() * (i + 1));
      let temp = posts[i];
      posts[i] = posts[j];
      posts[j] = temp;
  }
  return posts;
}

instashop's People

Contributors

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