A charted data dashboard to track metrics across the fluent network.
# install native bun
curl -fsSL https://bun.sh/install | bash
# install via homebrew
brew tap oven-sh/bun && brew install bun
git clone github:Fluent-Finance/cognition.git
cd cognition
bun install
# source .env.bootstrap
. ./bootstrap.env
bun do
bun go
bun done
# Deps -- need to run only once
bunx playwright install
# will run both sets of tests
# and watch for file changes
bun run test
# test specific suite
bun run test:unit
bun run test:integration
docker buildx build -f Dockerfile \
--ssh default \
--platform linux/arm64 \
--build-arg APP_ENV=$APP_ENV \
--build-arg APP_PORT=$PORT \
--build-arg APP_HOST=$APP_ENV \
--build-arg SERVICE_NAME=$SERVICE_NAME \
--build-arg APP_LOG_LEVEL=$LOG_LEVEL \
--tag "cognition:latest" \
.
docker run -it \
--label cognition \
--name cognition \
--env-file build.env \
-p 0.0.0.0:3333:3333/tcp \
--rm \
-t cognition:latest \
# want to stay secure even in the shell
# you can extract env values from password manager
# if using 1Password or Bitwarden, e.g. uses 1Password
export OP_CONNECT_HOST=https://vault.fluent.finance
export OP_CONNECT_TOKEN="$(cat < $HOME/.config/op/op_fluent_token)"
# only run command if using 1password local vault
op inject -i bootstrap.env > .env.bootstrap
# Not using a pw manager ?
# you will need to update the env vars
# with your data after copy
cp bootstrap.env .env.bootstrap
# Ultra Secure Method (1password)
# op run --env-file=bootstrap.env -- bun fun
# uses secure vault and 1password cli
# to read in environment variables into runtime
# secrets are not exposed even in the shell
#
# bun run --bun dev --port $PORT --host $HOST
Off Chain
On Chain