Skip to content

defiant-light/defiantLightParse

Repository files navigation

#Defiant-Light: Faux Poe

Team

  • Product Owner: Luke Davis
  • Scrum Master: Todd Skinner
  • Development Team Members: Arun Suresh, Eric Benson

##The Big Idea There's currently no platform to monetize machine-generated content in a way that capitalizes on the increadible volume possible using generative processes, and the near-zero marginal cost of creating an additional units of content. We've addressed this by using bitcoin as a means of paying for the algorithmically-generated content (in this case poor imitations of Edgar Allan Poe poetry) and Mandrill to deliver that content to the customer.

Chain of Events

  1. A Customer goes to your site and clicks a button that says 'Pay with Bitcoin' (or something like that...)
  2. Coinbase processes the bitcoin payment, because of the nature of the bitcoin payment network this may take 10 minutes or more
  3. When that bitcoin payment clears, Coinbase will send an HTTP POST to a custom url that you set up (the aftermentioned 'callback url') to let you know the payment has been processed. In the repo all the code that handles the callback url is in cloud/app.js
  4. From the JSON payload of that POST you'll extract the email (this should already be handled in the app.js file)
  5. Generate content (text is the easiest to handle, because it can be injected directly into the body of the email, and doesn't require an attachment or anything fancy like spinning up Phantom JS) and inject it into the email.
  6. Use Mandrill to send that email to the customer

Requirements

To Use with your own generative content you'll just need 4 things:

  1. a Coinbase account
  2. a Parse account
  3. a Mandrill account
  4. a JS module that creates content on the fly (of course you could just use/modify faux-poe.js)

Usage

  1. Clone the repo
  2. Log into Mandrill and get your api key
  3. Set up your Parse account:
  4. Install the parse cli in the project's root directory on your machine
  5. Add a creds.js file to the cloud directory and put the path to that file in your .gitignore
  6. Within that creds.js file add your mandrill api key
  7. Also add a parseUsername and parsePassword to the creds file - this doesn't actually need to be your Parse username or password (in fact I would advise against it) these are just used later in the callback url so something like aaa and bbb are fine.
  8. Make whatever asthetic changes you'd like to the index.html file in the public directory
  9. Use the parse deploy command from the command line
  10. Log into Coinbase
  11. Go to Merchant Tools (on the left) > Tools (at the top - this is where you'll get the code necessary for people to pay you in btc) > advanced options,
  12. Click the checkbox next to 'Collect email address from customer'.
  13. In the Callback Url text area you'll tell Coinbase what url to notify once a payment clears. You'll input something like: https://aaa:bbb@yourprojectname.parseapp.com/cburl
  14. This will generate the code for the 'Pay with Bitcoin' button that you'll put into your index.html file
  15. Paste that code into the appropriate place in your index.html file (it's marked with comments - if you don't paste your own code in, I'll be the one who gets paid every time somebody hits that button)
  16. PROFIT!

Development

  • Moving forward, the logical next step would be to use something like Phantom JS (or anything that will let you generate content that's not just text - images, music, etc...) to extend breadth of possible products offered
  • Additionally creating a system by which multiple products could be purchased would turn this single

Dependencies

  • parse cli
  • faux-poe
  • express
  • a Parse account
  • a Coinbase account
  • a Mandrill account

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •