Giter Site home page Giter Site logo

dynamodb-instagram's Introduction

DynamoDB Instagram

This project was built for a DynamoDB demo on Marcia Villalba's YouTube channel. For this demo, we saw how + why to use DynamoDB, then displayed some common DynamoDB patterns by building a simple Instagram clone.

Table of Contents

You may also refer to the following artifacts to understand this project:

Usage

To deploy this project, run the following commands in your terminal:

git clone [email protected]:alexdebrie/dynamodb-instagram.git && cd dynamodb-instagram
npm i
sls deploy

You should see output indicating the service was deployed and your endpoints are live:

Service Information
service: dynamodb-instagram
stage: dev
region: us-east-1
stack: dynamodb-instagram-dev
resources: 69
api keys:
  None
endpoints:
  POST - https://*********.execute-api.us-east-1.amazonaws.com/dev/users
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}
  POST - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos/{photoId}
  POST - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos/{photoId}/likes
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos/{photoId}/likes
  POST - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos/{photoId}/comments
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/photos/{photoId}/comments
  POST - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/followers
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/followers
  GET - https://*********.execute-api.us-east-1.amazonaws.com/dev/users/{username}/following
functions:
  createUser: dynamodb-instagram-dev-createUser
  getUser: dynamodb-instagram-dev-getUser
  createPhoto: dynamodb-instagram-dev-createPhoto
  ...

Terms and Concepts

We are building an Instagram clone where users can post photos. Other users may like a photo or comment on a photo. Finally, a user may choose to 'follow' another user in order to see their recent activity.

Each entity is discussed further below. Clicking on the entity link will take you to the code definition for the entity.

  • A User represents a person that has signed up for our application. They will be uniquely identified by a username.

  • A Photo represents an image uploaded by a particular User. You can browse all Photos for a particular User in reverse-chronological order. Each Photo can be Liked or Commented on (see below).

  • A Like represents a specific User 'liking' a specific Photo. A specific Photo may only be liked once by a specific User. When showing a Photo, we will show the total number of Likes for that Photo.

  • A Comment represents a User commenting on a particular Photo. There is no limit to the number of Comments on a Photo by a given User. When showing a Photo, we will show the total number of Comments for that Photo.

  • A Follow represents one User choosing to follow another User. By following another User, you will receive updates from that User in your timeline (not implemented in this demo). A Follow is a one-way relationship -- a User can follow another User without the second User following in return. For a particular User, we want to show the number of other Users following them and the number of Users they're following, as well as the ability to show the lists of Followers and Followees.

DynamoDB patterns

Below are a few patterns demonstrated in this repository that can be useful for using DynamoDB in your application:

dynamodb-instagram's People

Contributors

alexdebrie avatar yuyokk 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.