Coder Social home page Coder Social logo

excorpse's Introduction

Exquisite Corpse is a 21st century version of a drawing game popularized by surrealist artists in the 1920s. Each player draws a portion of the 'corpse'. When an artist submits a segment it is delivered into a dynamoDB table. When all three segments of the corpse are present they are concatenated to a single image and stored in an s3 bucket. AWS Rekognition is used to tag each drawing.

This repository contains the IaC that supports this process, Lambda in both Python and Node Runtime, and implements a AWS Serverless HTTP API with DynamoDB and offline support for local development.

The infrastructure contained in this repository is deployed via AWS Amplify.

To see it in action visit the Amplify hosted UI at : https://amplify.d1kgy66goa03vv.amplifyapp.com/ Visit the drawing viewer to see your results at : https://main.d13cwcv20gn7pr.amplifyapp.com/

Serverless-plugin used to test the drawing service locally:

Test your service locally, without having to deploy it first.

Prereqs (for Mac)

Homebrew

https://brew.sh/

npm

brew install npm

Docker

brew install --cask docker
brew install docker-compose

After install is complete, run Docker.app to start Docker Desktop and the daemon

Serverless

brew install serverless

Setup

npm

npm install

Start DynamoDB

Open a new terminal, navigate to the project folder:

cd ./dynamodb_local 
docker-compose up -d

Start ElasticMQ

Open a new terminal, navigate to the project folder:

cd ./elasticMQ 
docker-compose up -d

Start the Service

From the main project folder:

export AWS_ACCESS_KEY_ID="your_key_id"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
serverless offline start
serverless dynamodb migrate

Note: For local testing, you do not need to use valid AWS credentials, but AWS credentials do need to be present which is why the dummy values are in the export statements above.

Run service offline

serverless offline start

Create a Drawing on your Local Machine

navigate to the UI Repository at https://github.com/bailey-mae/exquisiteCorpse clone the repository and follow instructions to run locally

List all Drawings

curl -H "Content-Type:application/json" http://localhost:3000/drawings

Connecting to DynamoDB

The AWS NoSQL Workbench can be used to view the contents of DynamoDB

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.html

Instructions for connecting to a local running DynamoDB instance are here

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.querybuilder.connect.html

excorpse's People

Contributors

infestedcoder avatar lauraginnbailey avatar bailey-mae avatar alex-maul avatar

Watchers

James Cloos avatar  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.