Skip to content
The Swiss Army knife for backend engineers.
Go Shell Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api fix: fixed svg content type Nov 10, 2019
cmd/joe misc: small fix or general refactoring i did not bother commenting Nov 9, 2019
doc fix: GET /api/v1/queries/ only returns queries that the user can access Nov 9, 2019
models
.gitignore new: added authentication Nov 7, 2019
Makefile
README.md misc: small fix or general refactoring i did not bother commenting Nov 9, 2019
go.mod
go.sum new: added support for postgres Nov 9, 2019
joe.service
release.sh new: release script Nov 9, 2019

README.md

Joe

Joe is a tool to automatically build a REST API, its documentation and charts around SQL queries and their resulting data.

In a way it is an anti-ORM: its purpose is to help backend engineers versioning , annotating, exposing and charting the queries that can't be implemented or aren't worth implementing in the backend main business logic and that they would normally keep on .txt or .sql files.

How to Install

go get -u github.com/evilsocket/joe/cmd/joe

Example

First create an /etc/joe/joe.conf configuration file with the access credentials for the database:

# CHANGE THIS: use a complex secret for the JWT token generation
API_SECRET=02zygnJs5e0bBLJjaHCinWTjfRdheTYO

DB_HOST=joe-mysql
DB_DRIVER=mysql
DB_USER=joe
DB_PASSWORD=joe
DB_NAME=joe
DB_PORT=3306

Then create the admin user (this command will generate the file /etc/joe/users/admin.yml):

sudo mkdir -p /etc/joe/users
sudo joe -new-user admin -token-ttl 6 # JWT tokens for this user expire after 6 hours

For query and chart examples you can check this repository. Once you have your /etc/joe/queries folder with your queries, you can:

Generate markdown documentation:

joe -doc /path/to/document.md

Start the joe server:

joe -conf /etc/joe/joe.conf -data /etc/joe/queries -users /etc/joe/users

Why the name Joe?

The software is a very generic middleware that doesn't have a very specific business logic but adapts to the queries and the data, so one of the most generic and short names looked like a good idea. You can also think about "Joe" as that coworker you can always ask to run a query on the backend for you.

License

joe is made with ♥ by @evilsocket and it is released under the GPL3 license.

You can’t perform that action at this time.