Giter Club home page Giter Club logo

clay's People

Contributors

gambaroff avatar

Watchers

 avatar  avatar

Forkers

peoplemerge

clay's Issues

Frontend - integrate with metadata

Sites should read a json file describing the structure of the site, written by lambda/backend side of the app. The metadata is called content.json and has a hierarchy. Adjust the image slider code so it reads this content.json

Basic Lambda / node functionality

Lambda app should respond to an s3 event that dir structure containing images has changed.

This guide explains the source and steps http://docs.aws.amazon.com/lambda/latest/dg/getting-started-amazons3-events.html and http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser.html

Expect the event to have the format http://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html but all you need is the bucket name (well maybe 1-2 more like region).

Write a metadata file in json that reflects the structure of the dir tree, in alphanumeric order. For example:
sculpture
sculpture/2_angel.jpg
sculpture/1_duck.jpg
paintings
paintings/1_amywinehouse.jpg

resulting json:

{
"categories": {
  "sculpture":[
    "1_duck.jpg",
    "2_angel.jpg"
  ], 
  "paintings":[
    "1_amywinehouse.jpg"
  ]
}
}

For now don't worry about the case when a user loads 1000 images. The script will run 1000 times, which is fine.
Write documentation on how a developer can set it up (bucket names / iam permissions), using http://docs.aws.amazon.com/lambda/latest/dg/getting-started-custom-events.html as a reference

Provide the ability to handle text / markdown / etc

How cool would it be if you could just write markdown and have it build pretty pages?

There are a number of possible approaches. Look at https://github.com/jekyll/jekyll and jekyll-bootstrap. Unfortunately, IIRC these are ruby, so they cannot be run from lambda (which requires js/nodejs). Though the deploy script could trigger this, a js implementation is preferred.

Create backend / nodejs repo

The repo will have nodejs app to be run in Lambda that will resize images and write metadata json that the frontend will read.

Create deploy scripts

Deploy scripts should pull down git code to current dir where image directory trees are (ie Dropbox folder), and sync code and images to s3. Deploy scripts should not be in git, just samples.

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.