Web editor for P5.js, modified for workshops at Digital Playground.
Find a file
Mathura MG ced885d03f Add multiple canvas text outputs (#197)
* added grid

* add table to textoutput

* add all three outputs

* add shortcuts

* fix sound bug for triangle

* fix triangle bug - again
2016-11-12 11:53:02 -05:00
client Add multiple canvas text outputs (#197) 2016-11-12 11:53:02 -05:00
server Add multiple canvas text outputs (#197) 2016-11-12 11:53:02 -05:00
static Add multiple canvas text outputs (#197) 2016-11-12 11:53:02 -05:00
.babelrc change dev/production babel configuration 2016-07-22 13:14:26 -04:00
.eslintignore start to add eslint, add repository to package.json 2016-06-22 19:59:12 -04:00
.eslintrc add ES6 references to readme, add jsx-a11y to .eslintrc 2016-08-27 21:28:00 -04:00
.gitignore add another necessary ssl file to .gitignore 2016-09-06 16:53:50 -04:00
cert_chain.crt add embed route, fix path parsing in PreviewFrame 2016-09-06 16:54:16 -04:00
ecosystem.json add ecosystem.json for pm2 configuration 2016-06-28 17:37:02 -04:00
index.html #142 add webpack configuration to decrease loading speed 2016-11-08 18:11:12 -05:00
index.js #142 add webpack configuration to decrease loading speed 2016-11-08 18:11:12 -05:00
nodemon.json add nodemon, remove .env from being tracked 2016-06-22 18:48:45 -04:00
package.json #142 add webpack configuration to decrease loading speed 2016-11-08 18:11:12 -05:00
README.md Add ability to delete projects from sketch list (#125) 2016-10-12 14:24:53 -04:00
webpack.config.dev.js remove some dead code/files, change react components to .jsx files because of sublime syntax highlighting, fix linting errors 2016-11-08 18:54:54 -05:00
webpack.config.prod.js remove some dead code/files, change react components to .jsx files because of sublime syntax highlighting, fix linting errors 2016-11-08 18:54:54 -05:00

#p5.js Web Editor

This project is currently in the early stages of development! It will definitely be announced when it is in alpha/beta/etc.

##Development Installation

  1. Clone this repostory and cd into it
  2. $ npm install
  3. Install MongoDB and make sure it is running
  4. Create a file called .env in the root of this directory that looks like
MONGO_URL=mongodb://localhost:27017/p5js-web-editor
PORT=8000
SESSION_SECRET=whatever_you_want_this_to_be_it_only_matters_for_production
AWS_ACCESS_KEY=<your-aws-access-key>
AWS_SECRET_KEY=<your-aws-secret-key>
S3_BUCKET=<your-s3-bucket>
GITHUB_ID=<your-github-client-id>
GITHUB_SECRET=<your-github-client-secret>

If you don't care about being able to upload media files to S3 or Login with Github, you can drop in the file exactly how it is. Or, if you don't want to do that, just ask me to send you mine. Refer to this gist for creating an S3 bucket for testing, or if you don't want to do that, I can add you to one of my S3 buckets. 5. $ npm start 6. Navigate to http://localhost:8000 in your browser 7. Install the React Developer Tools. 8. Open and close the Redux DevTools using ctrl+h, and move them with ctrl+w

##Production Installation

  1. Clone this repostory and cd into it
  2. $ npm install
  3. Install MongoDB and make sure it is running
  4. Create a file called .env in the root of this directory that looks like
MONGO_URL=mongodb://localhost:27017/p5js-web-editor
PORT=8000
SESSION_SECRET=make_this_a_long-random_string_like_maybe_126_characters_long
AWS_ACCESS_KEY=<your-aws-access-key>
AWS_SECRET_KEY=<your-aws-secret-key>
S3_BUCKET=<your-s3-bucket>
GITHUB_ID=<your-github-client-id>
GITHUB_SECRET=<your-github-client-secret>

For production, you will need to have real Github and Amazon credentions. Refer to this gist for creating an S3 bucket for testing. 5. $ npm run build 6. $ npm run start:prod

###For Production Setup with PM2

  1. $ npm install -g pm2
  2. $ pm2 start ecosystem.json

##Accessibility Guidelines

The code for the p5.js web editor adheres to web accessibility standards. The following guidelines will help to ensure that accessibility continues to be a priority as development continues.

Code Structure

  • Screen Readers are an assistive technology for vision loss which helps users to navigate a web page. They are able to prioritize content based on the semantic meaning of HTML tags. Therefore, it is important to use specific tags, such as nav, ul, li, section, and so on. div is the least screen reader friendly tag. For example, here is the semantic meaning of the body tag
  • All buttons/links/windows need to be accessible by the keyboard ( By tabbing, pressing space etc.)
  • In cases where tags are not screen reader friendly, we can take advantage of tabIndex. Using tabIndex ensures that all elements are accessible via keyboard. code example
  • When opening a new window or pop up window, ensure the keyboard focus also moves to the new window. code example

Labeling

  • When creating button icons, images, or something without text (this does not include an HTML5 <button>), use aria-labels. code example
  • All <table>s need to have a summary attribute. This will ensure user is given context to what the table is. code example
  • uls and navs menus need to include a title. code example

For more information on accessibility see the teach access tutorial

##Contribution Guide I am currently open to contributors! Email me if you are looking for a task, or look at the open issues and reply that you are working on a task.

The p5.js Web Editor is built on a MERN stack - MongoDB, Express, React/Redux, and Node. For a reference to the file structure format I am using, please look at the Mern Starter and this comment.

This project does not use CSS Modules, but uses Sass. I like to follow BEM rules for CSS naming conventions, write OOSCSS with placeholders and mixins, and follow the 7-1 Pattern for Sass.

I'm using ES6 and transpiling to ES5 using Babel. For reference to the JavaScript style guide, see the Airbnb Style Guide, React ESLint Plugin.

I'm new to using ESLint, but I decided on a configuration based on some popular React/Redux boilerplates. Open to suggestions on this. If in development, you're getting annoyed with ESLint, you can remove it from webpack.config.dev.js in the JavaScript loader, or disable any line from eslint by commenting at the end of the line // eslint-disable-line.

##Dump of links I'm saving for reference