Git Product home page Git Product logo

popcode's Introduction

Popcode

Popcode is a simple HTML/CSS/JavaScript editing environment for use in the classroom. It's a lot like JSBin, JSFiddle, or CodePen, but it focuses on giving specific, immediate, human-friendly feedback when the code contains errors.

Project status

Build Status Dependency Status License

Popcode is the official first semester editing environment for the ScriptEd program in the 2016–2017 school year.

Try it out

You can try out Popcode at https://popcode.org.

Table of Contents

Features

  • Edit HTML, CSS, and JavaScript in the browser; in-browser preview updates as you type.
  • Get immediate, comprehensive, easy-to-understand feedback about problems in your code.
  • Errors can't be ignored. If there are any errors in the code, the live preview is replaced by an error list.
  • JavaScript runtime errors are also reported in human-friendly language, with annotations in the source code pointing out the source of the problem.
  • One-click login using GitHub account; all work is saved remotely to Firebase when logged in.
  • Pop out preview of web page in its own window.
  • Export to GitHub gist.
  • Import starter code from a GitHub gist.

About validation

The validation system is the main point of this project. Most syntax checkers, linters, and style enforcers tend to provide feedback using language that is geared toward experienced coders, not beginners. Thus, providing a translation of error messages into plain English for students is the overriding concern of this project.

Popcode tends toward strict enforcement of lint and code style, even when enforced style decisions are arbitrary, under the philosophy that giving students one right way to do it eliminates ambiguity and aids the learning process.

Feature roadmap

Check out the Project Board.

Technical details

Popcode uses React to render views, Redux to manage application state, Ace as the code editor, Webpack to package the client-side application, and Babel to compile ES2016+JSX into ES5.

Popcode detects code errors using slowparse, htmllint, HTML Inspector, Rework CSS, PrettyCSS, stylelint, jshint, and esprima.

Architecture Overview

The architecture of Popcode’s code base is best understood through the lifecycle of a user interaction:

  • User interactions are first captured by handlers in React components.
  • These components propagate the event to the view controller, the Workspace component.
  • The Workspace dispatches one or more Redux actions.
  • Dispatched actions are consumed by the reducers, which update the store.
  • Action creators also perform other business logic, such as initiating validation of project code and persisting changes to persistent storage.
  • When the action lifecycle is complete, the Workspace receives updated props from the store and propagates them to its descendants.

Contributing

Yes please! There are a ton of ways Popcode could be made better. Pull requests, bug reports, feature suggestions are all very very welcome.

When you’re first getting started, I recommend picking an issue that’s good for beginners so you can get your feet wet and make sure you can run a development environment smoothly.

Everyone is welcome to submit pull requests that implement a new feature or fix a bug that you’re particularly passionate about. But if you just want to help out and you’re looking for ideas, you’ve got lots of options. You might check out some of the enhancements that have been proposed, or maybe fix a bug. There’s also plenty of UX and design work to do, if that’s more your speed. Or, if you’re more about tinkering with the guts, there’s lots of development tooling, deployment, and performance work to do.

Running locally

Pretty easy. Just check out the code, then run:

$ npm install

That'll pull down the dependencies. Then run:

$ gulp dev

This will start a local static server, and open it in your browser. The first pageload will be rather slow as it compiles the bundle; after you change files, assets are recompiled incrementally and your browser automatically reloads.

When you're done, lint and make sure tests pass before opening a pull request:

$ npm test

Developer Reference

Popcode endeavors to use up-to-date technologies and code conventions to make development as pleasant as possible. Below are links to reference documentation on the major tools:

License

Popcode is distributed under the MIT license. See the attached LICENSE file for all the sordid details.

Contributors

Thanks to

These companies generously offer Popcode access to paid tiers of their excellent services, free of charge:

BrowserStack Bugsnag

Contact

Feel free to email me at [email protected] if you have any questions.

popcode's People

Contributors

alexpelan avatar carolchau avatar jwang1919 avatar kinduff avatar outoftime avatar v avatar

Watchers

 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.