AnyChart / playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AnyChart - Robust JavaScript/HTML5 Chart library for any project

AnyChart Playground Engine

AnyChart Playground is an online tool for testing and showcasing user-created HTML, CSS and JavaScript code snippets.

Build Status production

Build Status staging

Architecture

The application backend is written on Clojure and consists of three parts:

  • Web part - for serving http requets, the main site and the editor
  • Generator - for parsing git repositories and put data to database
  • Preview generator - for generating images for samples

All parts communicate via Redis queues.

The frontend is written on ClojureScript and consists of:

  • Site
  • Editor

The editor is a single page application built with Reagent and re-frame. It uses CodeMirror as a code editor and Tern as a code-analysis engine for JavaScript.

Dependencies

sudo apt-get install postgresql postgresql-contrib
sudo apt-get install redis-server
sudo apt-get install phantomjs
sudo apt-get install pngquant
# elasticsearch
# logstash

PostgreSQL

PostgreSQL is used as a main storage.

Database Schema

Redis

Redis is used for communications between generators and Web part of application.

PhantomJS and pngquant

PhantomJS is used for generating previews. Pngquant - for images optimizations.

ElasticSearch

ElasticSearch is used for samples search.

Logstash

To synchronize Elastic with Postgres you need to set up Logstash.

sudo bin/logstash-plugin install logstash-input-jdbc

sudo systemctl start logstash.service  # start 
sudo systemctl stop logstash.service   # stop

Config files are available here.

External Resources

For now playground uses some of AnyChart resources, later we'll need to rework it to make Playground standalone project.

Resource Description
Data Sets source file JSON file what contains lists of available data sets.
Tags list JSON file what contains data for tags generating process.
Gallery, Chartopedia, API Reference, Documentation, Templates Repositories with predefined samples, some of them are private.
Chartopedia Also chartopedia repo is used as a source for Chart Types pages.

Usage

Application config

Repositories samples format

Editor API

License

If you have any questions regarding licensing - please contact us. sales@anychart.com

About


Languages

Language:JavaScript 45.0%Language:Clojure 41.5%Language:CSS 7.8%Language:HTML 5.0%Language:Java 0.5%Language:Python 0.2%Language:Makefile 0.0%