Hermes is a toolset to port forward across boundaries
Find a file
imterah d56a8eb7bf
feature: Change state management from global variables to object passing
This restructures dbcore (now the db package) and jwtcore (now the jwt
package) to use a single struct. There is now a state package, which
contains a struct with the full application state.

After this, instead of initializing the API routes directly in the main
function, the state object gets passed, and the API routes get
initialized with their accompanying code.

One fix done to reduce memory usage and increase speed is that the
validator object is now persistent across requests, instead of
recreating it each time. This should speed things up slightly, and
improve memory usage.

One additional chore done is that the database models have been moved to
be a seperate file from the DB initialization itself.
2025-03-21 12:59:51 -04:00
.devcontainer fix: Fixes more instability issues. :) 2025-01-08 09:12:48 -05:00
.forgejo/workflows fix: Fixes action workflows. 2025-01-09 08:00:37 -05:00
.vscode fix: Fixes vscode settings. 2024-12-22 11:35:57 -05:00
apiclient chore: Adds login and user creation support to the API. 2025-01-05 20:51:06 -05:00
backend feature: Change state management from global variables to object passing 2025-03-21 12:59:51 -04:00
docs feature: Add profiling documentation for backends based on BackendUtil. 2025-01-10 16:23:26 -05:00
frontend chore: Adds login and user creation support to the API. 2025-01-05 20:51:06 -05:00
routes/Hermes API fix: Fixes more instability issues. :) 2025-01-08 09:12:48 -05:00
.gitignore feature: Adds basic backend starting for sshappbackend. 2025-01-27 07:36:29 -05:00
docker-compose.yml chore: Fix sample code to remove the deprecated LOM, and add JWT secrets 2025-03-18 20:51:01 -04:00
Dockerfile feature: Adds API manifest definitions, and implement GetAllClientConnections() 2025-02-20 09:11:28 -05:00
go.mod feature: Adds basic data command support. 2025-02-16 15:02:50 -05:00
go.sum feature: Adds basic backend starting for sshappbackend. 2025-01-27 07:36:29 -05:00
init.sh chore: Adds login and user creation support to the API. 2025-01-05 20:51:06 -05:00
LICENSE chore: Change license name 2025-03-18 20:33:59 -04:00
prod-docker.env chore: Fix sample code to remove the deprecated LOM, and add JWT secrets 2025-03-18 20:51:01 -04:00
README.md chore: Fix sample code to remove the deprecated LOM, and add JWT secrets 2025-03-18 20:51:01 -04:00
shell.nix chore: Remove Node.JS from the nix shell 2025-03-18 20:36:20 -04:00

Hermes

Docker Badge Golang Badge License Badge (licensed under BSD-3-Clause)

Port forwarding across boundaries.

Local Development

Note

Using Nix is recommended for the development environment. If you're not using it, install Go. For legacy maintence tasks, install NodeJS.

  1. Firstly, check if you have a working Nix environment if you're using Nix.

  2. Secondly, Run nix-shell, or alternatively source init.sh if you're not using Nix.

API Development

  1. After that, run the backend build script: ./build.sh.

  2. Then, go into the api/ directory, and then start it up: go run . -b ../backends.dev.json

Production Deployment

Warning

Deploying using Docker Compose is the only officially supported deployment method.

  1. Copy and change the default password (or username & db name too) from the template file prod-docker.env:
sed -e "s/POSTGRES_PASSWORD=hermes/POSTGRES_PASSWORD=$(head -c 500 /dev/random | sha512sum | cut -d " " -f 1)/g" -e "s/JWT_SECRET=hermes/JWT_SECRET=$(head -c 500 /dev/random | sha512sum | cut -d " " -f 1)/g" prod-docker.env > .env
  1. Build the docker stack: docker compose --env-file .env up -d

Troubleshooting

This has been moved here.

Documentation

Go to the docs/ folder.