GithubHelp home page GithubHelp logo

hirako2000 / gisteam Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 1.02 MB

⚡️ Fast server side rendering code beautifier, minifier, pastebin, encoder/decoder and hash generator ⚡️

Home Page: https://gisteam.herokuapp.com

License: MIT License

JavaScript 36.43% CSS 39.39% Marko 24.18%
koa2 mongodb markojs beautifier pastebin hash lasso formatter minifies minifier

gisteam's Introduction

Codacy Badge uptime Build Status Dependency Status devDependency Status license

GisTeam - Minimalist web app to minify/beautify code, store, hash and encode/decode text

Live Demo

demo

Features

  • 💫 Beautifier - Javascript/JSON, XML, HTML, CSS, SQL
  • 💨 Minifier - Javascript, JSON, XML, CSS, SQL
  • 🔑 Hash - Hash strings with md5 and sha1, sha256, sha512
  • 📋 Paste - Pastebin-like feature, with expiry, download and raw view
  • ⟿ Encode - URL, Base64
  • ⟵ Decode - URL Encode, Base64

Techy bits

  • production ready with properly minified, compressed and bundled assets
  • pm2 to manage and scale node processes

Roadmap

  • Time manipulation/converter
  • Encrypt Pastes

Techy bits

  • Dockerize
  • Add unit tests
  • Benchmark

Quickstart

Prerequisites

  • Node.js
  • MongoDB

Fork/clone/download this repo

Install dependencies

npm install

Build the sources

npm run build

This transpiles *.js files, and copies other files (css/etc), from /src to /lib

It uses gulp build task as defined in the .gulpfile

While developing, use:

npm run gulp -- build watch

This builds the project and then watches /src for file changes and compiles only the changed files.

You can let this run in the background while developing. (you'll still need to restart the server for certain changes to take effect.)

Run the server

npm run start

Libraries used

Koa 2

Koa is an excellent minimalist server framework on node.

Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.

Babel

Babel is a JavaScript compiler. es6/7 is great.

ECMAScript 2015 is the newest version of the ECMAScript standard.

Babel transpiles new ES2015 (and ES2016) syntax into ES5 valid code.

Lasso

Lasso.js is an open source Node.js-style JavaScript module bundler from eBay. It also provides first-level support for optimally delivering JavaScript, CSS, images and other assets to the browser.

It's like Webpack + Browserify/jspm/RequireJS

Marko

Marko is a really fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags.

MongoDB/Mongoose

Ideal for fast development, using mongoose

Usage

Directory structure

│   package.json
│   gulpfile.js
│   .babelrc
│   .gitignore
│   README.md
│
├───src
│   │
│   │   index.js   // basic initial configuration (babel, sourcemaps)
│   │
│   │   server.js  // Koa server and configuration
│   │              // exports the koa `app` which can be required elsewhere
│   │              // imports /routes/xxx
│   │
│   ├───routes
│   │   │   layout.marko // basic layout
│   │   │
│   │   ├───beautify
│   │   │       index.js
│   │   │       template.marko
│   │   ├───hash
│   │   │       index.js
│   │   │       template.marko
│   │   ├───home
│   │   │       index.js       // route logic
│   │   │       template.marko // marko template (extends from layout.marko)
│   │   │       widget.js      // marko-widget (better client-side javascripting)
│   │   ├───minify
│   │   │       index.js
│   │   │       template.marko
│   │   ├───paste
│   │   │       index.js
│   │   │       template.marko
│   │   │       otemplate.marko // this one has a specific output template
│   │   │   browser.json // for lasso
│   │   │
│   │   └───...
│   │
│   ├───db
│   │   └───... // db schema for Paste
│   └───public
│       └───... // public resources exposed as static files
│
│
├───lib (auto-generate)
│   │  // /src gets compiled here, the project mainly runs from here
│   │  // .js files from /src gets compiled to .js files here
│   │  // other than .js files get copied as is (css, fonts etc)
│   │
│   ├───public
│   │   │
│   │   └────lasso
│   │        └────...  // lasso related bundled files are auto-generated here
│   │
│   └───... whole lib is .gitignore’d as it's essentially just a dumplicate of /src
│
├───.cache (auto-generated, lasso related, .gitignore’d)
│
└───node_modules // (.gitignore’d)

This file sets up preliminaries:

  • babel
  • sourcemap-support
  • Bluebird as the default promise library

Sets up Koa 2 and most used modules

Route handling (src/routes)

gisteam's People

Contributors

codacy-badger avatar hirako2000 avatar kaushikdeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kaushikdeb

gisteam's Issues

Add minifier

Add Minifier tool to minify:

  • JavaScript
  • JSON
  • CSS
  • XML
  • SQL

Beautifier - Ability to copy output with single click

It is going to be a big convenience if the output of the beautifier (and other modules as well) could be copied easily with single click.
When using with a large json text, it is really hard to copy over the beautified text.

Add encoder/decoder feature

Useful encoder and decoder features could be added.
Let's replace the Time link as it is not implemented anyway, with Encode.

As suggested by @kaushikdeb, URL encoding would be nice to have.

  • URL encoding
  • BASE64 encoding

Ways to go about it:

Either have

  1. Two new pages, one for encoding and one for decoding. Each can then evolve to support more encoding and decoding respectively.

or

  1. A single page with two buttons, decode or encode.

I much prefer the first approach, from a usability perspective it simplifies the interface, single button like all other pages;
Once done, perhaps move the BASE64 encoding that is currently displayed as a result of the Hash functions table.

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.