Giter Site home page Giter Site logo

bluebucket's People

Contributors

veselosky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bluebucket's Issues

Site Organizer

As a Blue Bucket user
I want a tool that lets me browse the content in my bucket
So that I can easily select existing files to work on,
And create new files.

In the first release, the site organizer will be a very simple file lister. In future versions the site organizer will grow many new features to aid organizing large sites.

  • List Drafts
    • load pre-built index; if no index, assume empty;
    • populate list box
  • List Published
    • load pre-built index; if no index, assume empty
    • populate list box
  • New/Edit/Delete item
    • JS: Delete: Just s3.deleteObject(); Lambda will follow up
    • JS: New: Display Composer Form
    • JS: Edit: Trigger Composer Form w/URL of Draft/Archetype

bb organizer

Article Composer

As a Blue Bucket user
I want a web form where I can enter Article information
So that I can easily post content to my web site without learning JSON.

Features

  • The SAVE button will save your changes to the Drafts folder.
  • The SAVE & CLOSE button will save your changes to the Drafts folder, and load the Site Organizer.
  • The PUBLISH button will save your changes to the Archetypes folder, removing it from Drafts.
  • A text box is provided to enter article text. Type markdown. (A Lambda function will convert it to HTML after saving. Lambda function is a separate Feature, not part of this Feature).
  • Metadata is entered in the sidebar form.
    • Title is required.
    • Author will be pre-populated from the site config (site.author).
    • Publish date will be pre-populated with NOW.
    • Item type and GUID will be auto-generated and are not editable.

Constraints

  • This version will have no WYSIWYG or writing tools. You get a text box. Write markdown. The system will convert it to HTML on save.

Tasks

  • Build the Article Composer form, with validation
  • Implement the SAVE and SAVE & CLOSE buttons
  • Implement the PUBLISH button
  • Implement the ability to load existing content from a JSON file

bb composer

Lambda: Publish Archetype

When an Archetype is saved to the Archetypes folder,
Then generate an HTML monograph file in the main site,
And update the Archetype Index.

Document File Flows and Task Flows

As a Power User or Developer of Blue Bucket
I want a document that explains simply how files and tasks interact in the system
So that I have the knowledge I need to troubleshoot problems and make improvements.

Branch: docflows

Tasks

  • Workflow diagram showing end-to-end publishing
  • Prose description of directory structures, with rationale
  • Prose descriptions of artifact types and their roles in the system

Account Bootstrap/Update

As a (potential) user of Blue Bucket
I want a browser-based tool that will help me set up the system in my own AWS account
So that I can get started with the system without being a techie.

Requires: #7 Lambda Updater

In this version of the application, we will keep it simple to keep it fast. You will need to have AWS credentials from your account, and feed them to the browser app for it to do its job. In a future version, we may introduce multi-tenancy with a separate and easier authentication system.

Tasks

  • Create a form that gathers AWS credentials. When the form is submitted, the credentials will be stored in local storage, and will be used to configure the AWS client library. On load, check for credentials in local storage. If found, configure the AWS library and skip the credentials form.
  • Check the AWS account for existing Blue Bucket Updater Lambda function. If found, invoke the Lambda function in query mode to get a list of updates available. Present an offer to install updates. If the Updater Lambda is not found, offer to install:
    • Assure: a Role to be assumed by Lambda functions.
      • Grant full permission over Lambda services
      • Grant full permission over S3 services
      • Grant full permission over API Gateway services (for future)
    • if necessary, Install latest Lambda Blue Bucket Updater
    • invoke the Updater Lambda to complete the installation/updates.

Once all is good, forward the user to the Bucket Management Form.

Software Distribution Bucket

As a Blue Bucket user
I need a known distribution point for Blue Bucket code and metadata
So that I can install the system in my own Amazon account
And update my system when new versions are released.

Because we want a new user to be able to bootstrap their own Blue Bucket system needing only point-and-click web skills but no programming skills, the software build and deploy process for Blue Bucket will need to prepare appropriate packages and place them in a known location for automatic discovery by the bootstrapping code.

Each Lambda function needs to be packages in a Zip and uploaded to an S3 bucket, such that the bucket & key can be supplied to the Lambda function registration function.

Themes and admin files should also be Zipped and uploaded in separate packages, so each module can be retrieved with a single GET request rather than copying individual files.

A JSON metadata file (use npm's package.json format?) should be provided, listing the latest versions of each component, so that a single GET can be used for any client to check whether they have any out of date components.

For consistency, old versions of all components should be preserved (including the metadata file for each release) so that users can continue to install fixed versions, not just the latest version. There should also be a mechanism to retrieve the "latest" version, regardless of its number, for those creating new installations or wanting to keep up to date.

TASKS:

  • Define the schema for the metadata file
  • Build automation to create the metadata file for a release
  • Build automation to create the Zip packages for each component in a release
  • Build automation to deploy build artifacts to the public S3 bucket

Bucket Manager

As a Blue Bucket user
I want a way to create a Blue Bucket web site from an existing or new S3 bucket
So that I can publish web sites from the system.

Requires: #9 Lambda: Bucket Setup, #10 Lambda: List Buckets

Constraints:

  • In this version, we will not support non-empty existing buckets. If an existing bucket has files in it already, just error out. In a future feature we will add options either to nuke the files or to leave them there.
  • Since the browser may not be able to access all necessary S3 resources due to missing CORS support, a supporting Lambda function will be invoked to perform most of the work.

Features:

  • Create and initialize a new bucket
  • Initialize an existing empty bucket

Tasks:

  • Bucket Management Forms:
    • bb bucket chooser
    • Bucket configuration form

Lambda: Bucket Setup

To support Bucket Manager functions that may not be available to browser JavaScript, this Lambda function will perform most of the work to optionally create, and then initialize an empty bucket as a Blue Bucket web site.

  • Implement bucket initializer:
    • Set bucket CORS policy (required for JS SDK to operate on bucket)
    • Set bucket read policy as public
    • Set bucket versioning on
    • Set bucket as website
    • Grant IAM Lambda Role permissions on our S3 bucket (if necessary)
    • Install admin in bucket
    • Install theme in bucket
    • Install bluebucket.json in bucket
    • Install Lambda event sources for the bucket

Lambda: Drafts Preview

When a JSON file is saved to Drafts,
Then generate an HTML preview of that file in the same folder.

Document Account Bootstrapping, Bucket Initialization

As a Power User or Developer of Blue Bucket
I want a document that explains simply how files and tasks interact in the system
So that I have the knowledge I need to troubleshoot problems and make improvements.

Branch: docflows

Tasks

  • Workflow diagram showing installation in new AWS account
  • Prose description of installation in new AWS account; requirements.
  • Workflow diagram showing initialization of new bucket
  • Prose description of initialization of new bucket ; requirements.
  • Workflow diagram showing software update of existing AWS account
  • Prose description of software update of existing AWS account; requirements

Lambda: Updater

Because AWS S3 service does not enable CORS, the browser S3 client cannot perform certain functions unless it is served from an S3 domain name. I do not wish to introduce a domain name constraint on the Blue Bucket system. So, much of the work of installing/updating the system needs to be implemented as a Lambda function that can be invoked from the browser.

The function has two modes: update mode and query mode.

  • Implement the query mode of the Updater:
  • Determine the target version, either a specific requested version, or "latest"
  • Retrieve the metadata file for the target version from the distribution point
  • Scan all existing S3 buckets looking for Blue Bucket metadata files
  • Diff the target from the existing files to build a list of components needing update. (If no existing buckets, then all non-bucket components need update.)
  • Implement update mode of the Updater:
  • Install all the Lambda functions requiring update.
  • If S3 components require updating (themes, admin files, etc.), update each bucket in turn.

Lambda: Save Draft

When invoked, validate the submitted JSON, compress, and store in the drafts folder.

Lambda: List Buckets

The Bucket Manager needs to display a list of buckets, but the list_buckets API call may not be accessible to the JS client due to missing CORS configuration on the S3 endpoint. This Lambda function will list existing buckets, determine which are Blue Buckets, and send the complete metadata back to the client for display.

  • Implement List Buckets function

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.