Skip to content

solaoi/tuna-mayonnaise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license GitHub release (latest by date) CodeQL Codacy Badge GitHub go.mod Go version (subdirectory of monorepo) go deps scan nodejs deps scan Open in Visual Studio Code

Read this in other languages: English, 日本語.

TUNA-Mayonnaise generates and serves JSON/HTML with the node-based editor.

Table of Contents

CLICK

Why

There are many web frameworks in the world, and you must be using one or several of them for your web development.
In any of these frameworks, you may have found many patterns and are getting tired of writing the same process.

If you are a very good engineer, you want to write all the patterns in one configuration file.
However, both YAML and JSON are a bit inadequate to express the patterns of today's web development.

So, why don't we use a visual programming UI to express each pattern by connecting settings with lines? The result of such an attempt is TUNA-Mayonnaise, the most famous ingredient in rice balls.

Get Started

Install

TUNA-Mayonnaise only supports amd64.

For MacOS (Homebrew)

# Install
brew install solaoi/tap/tuna
# Update
brew upgrade tuna

For Others (Binary Releases)

you can download a binary release here.

# Install with wget or curl
## set the latest version on releases.
VERSION=v0.0.29
## set the OS you use.
OS=linux
## case you use wget
wget https://github.com/solaoi/tuna-mayonnaise/releases/download/$VERSION/tuna_${OS}_amd64.tar.gz
## case you use curl
curl -LO  https://github.com/solaoi/tuna-mayonnaise/releases/download/$VERSION/tuna_${OS}_amd64.tar.gz
## extract
tar xvf ./tuna_${OS}_amd64.tar.gz
## move it to a location in your $PATH, such as /usr/local/bin.
mv ./tuna /usr/local/bin/

# Update
tuna update

Usage

1. Launch a tool on your browser

tuna tool command launches a browser like below.

this tool generate a configuration( tuna-mayonnaise.json ) with Save menu.

Tool Sample

* this sample does not support the Save menu, but we could Download a configuration edited.

2. Serve your JSON/HTML

tuna api command serves your JSON/HTML on http://localhost:8080 .

this command use a configuration( tuna-mayonnaise.json ) on current directory.

Features

Template Engine

When you generate your HTML, you could use Template Engines below.

  • Pug
  • Handlebars

API

You could request WEB APIs and use responses.

Database

This tool supports databases below.

  • MySQL
  • PostgreSQL
  • SQLite3

You could access the data in JSON format.

e.g.)

If there is a table like below,

id name
1 foo
2 bar

You get the response like below.

[
  {"id":1, "name":"foo"},
  {"id":2, "name":"bar"}
]

Connection Options

TLS / SSL

Monitoring

  1. TUNA-Mayonnaise exposes Prometheus metrics at /metrics endpoint.
    List of metrics includes two stats.
  • basic http stats collected via Echo Prometheus library.
  • TUNA-Mayonnaise API Component stats with status, method, url.
  1. TUNA-Mayonnaise exposes health endpoint at /health .

  2. TUNA-Mayonnaise Logging with Labeled Tab-separated Values ( LTSV ) format.

Dependencies

TUNA-Mayonnaise stands on the shoulder of many great open source libraries, in lexical order:

BACKEND Dependencies

Dependency License
github.com/aymerick/raymond MIT License
github.com/blang/semver MIT License
github.com/christopherhein/go-version Apache License 2.0
github.com/common-nighthawk/go-figure MIT License
github.com/eknkc/pug MIT License
github.com/fatih/color MIT License
github.com/go-sql-driver/mysql MPL-2.0 License
github.com/iancoleman/orderedmap MIT License
github.com/kpango/gache MIT License
github.com/labstack/echo MIT License
github.com/labstack/echo-contrib MIT License
github.com/lib/pq MIT License
github.com/mattn/go-sqlite3 MIT License
github.com/mohae/deepcopy MIT License
github.com/prometheus/client_golang Apache License 2.0
github.com/rhysd/go-github-selfupdate MIT License
github.com/rodaine/table MIT License
github.com/spf13/cobra Apache License 2.0

FRONTEND Dependencies

Dependency License
@monaco-editor/react MIT License
file-saver MIT License
handlebars MIT License
js-sql-parser MIT License
pug MIT License
react MIT License
react-dom MIT License
react-modal MIT License
react-hot-toast MIT License
regenerator-runtime MIT License
rete MIT License
rete-area-plugin ISC
rete-auto-arrange-plugin MIT License
rete-connection-path-plugin MIT License
rete-connection-plugin MIT License
rete-connection-reroute-plugin MIT License
rete-context-menu-plugin MIT License
rete-history-plugin MIT License
rete-minimap-plugin MIT License
rete-react-render-plugin ISC
use-interval MIT License

FRONTEND DEV Dependencies

Dependency License
@types/pug MIT License
@types/react MIT License
@types/react-dom MIT License
@types/react-modal MIT License
@vitejs/plugin-react MIT License
eslint MIT License
eslint-config-airbnb MIT License
eslint-config-prettier MIT License
eslint-plugin-import MIT License
eslint-plugin-jsx-a11y MIT License
eslint-plugin-react MIT License
eslint-plugin-react-hooks MIT License
husky MIT License
lint-staged MIT License
prettier MIT License
rollup-plugin-visualizer MIT License
stylelint MIT License
stylelint-config-prettier MIT License
stylelint-config-recommended MIT License
stylelint-order MIT License
stylelint-prettier MIT License
typescript Apache License 2.0
vite MIT License
vite-plugin-externals MIT License