https://github.com/evilsocket/joe
The Swiss Army knife for backend engineers.
https://github.com/evilsocket/joe
Last synced: 5 months ago
JSON representation
The Swiss Army knife for backend engineers.
- Host: GitHub
- URL: https://github.com/evilsocket/joe
- Owner: evilsocket
- Created: 2019-11-06T18:47:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T14:59:47.000Z (almost 5 years ago)
- Last Synced: 2024-12-30T21:41:53.184Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 95
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://en.wikipedia.org/wiki/Object-relational_mapping): 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
```sh
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:
```conf
# 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`):
```sh
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](https://github.com/evilsocket/pwngrid-queries-joe). Once
you have your `/etc/joe/queries` folder with your queries, you can:
Generate markdown documentation:
```sh
joe -doc /path/to/document.md
```
Start the joe server:
```sh
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](https://twitter.com/evilsocket) and it is released under the GPL3 license.