• Stars
    star
    313
  • Rank 132,954 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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:

More Repositories

1

awesome-dynamodb

List of resources for learning about modeling, operating, and using Amazon DynamoDB
1,548
star
2

dynamodbguide.com

JavaScript
283
star
3

serverless-flask

Serverless Template for a Flask application
HTML
80
star
4

serverless-dynamodb-backups

Automate your DynamoDB backups! ⚡️
Python
54
star
5

serverless-vpc-examples

Examples for using Serverless within a VPC
JavaScript
36
star
6

graphql-dynamodb-single-table

Example application showing how to use single-table design with GraphQL and DynamoDB
Velocity Template Language
35
star
7

lambda-dynamodb-workshop

Workshop for building Serverless applications with Lambda and DynamoDB
JavaScript
24
star
8

dynamodb-workshop

Workshop to learn basic concepts + operations with DynamoDB
JavaScript
22
star
9

stargazer

Get Slack notifications whenever someone stars your Github repo!
JavaScript
21
star
10

serverless-multi-region

A multi-region Serverless project using regional endpoints & DynamoDB global tables
Python
20
star
11

serverless-dynamodb-scanner

A Serverless project to help you operate on every existing item in a DynamoDB table
Python
17
star
12

dynamodb-performance-testing

Repository with code to run performance tests against Amazon DynamoDB
Python
15
star
13

graphql-dynamodb-multi-table

Example application showing how to use multi-table design with GraphQL and DynamoDB
JavaScript
14
star
14

aws-api-performance-bakeoff

Code and architecture diagrams for performance testing a few API approaches on AWS
Shell
11
star
15

serverless-s3-batch

Plugin to use S3 Batch with Serverless
JavaScript
10
star
16

tutum-schedule

A minimalistic image to handle scheduling processes as Tutum Services
Python
9
star
17

kclpy

Base Docker image for deploying Kinesis Client Applications in Python
Python
9
star
18

serverless-endpoint-configuration

A Serverless plugin to set API Gateway endpoint configuration for your Serverless services
JavaScript
8
star
19

github-webhook-custom-resource

CloudFormation custom resource for creating a Github webhook
Python
8
star
20

rate-limit-momento

A simple, serverless rate limiter using Momento Cache
JavaScript
6
star
21

cfn-macros

Example CloudFormation macros
Python
6
star
22

rockset-financial-demo

FinTech demo application showing how to use DynamoDB + Rockset together
JavaScript
4
star
23

deploy-livegrep

Docker images and utilities for deploying Livegrep
Makefile
4
star
24

tutum-stream

Helper repo to use Tutum's Stream API
Python
3
star
25

tutum-slack

A configurable service to post Tutum Events to Slack
Python
3
star
26

sam-auth

Lab to understand how to use custom authorizers with AWS SAM
JavaScript
1
star
27

my-gatsby-site

JavaScript
1
star
28

tutum-selenium-grid

Quick start repo to launch a Selenium Grid on Tutum
1
star
29

statickit-site

The source for statickit.com
JavaScript
1
star