atvouch#
atvouch is a proof of concept atproto app to let developers vouch for each others' skill.
how#
- two separate tap instances: atvouch needs a separate tap to be aware of all the prs being made in the world. can't use a singular tap because its just for atvouch records (so if someone never interacted with atvouch their pulls wont be tracked).
- elixir and go for the appview/backend
- bun for the frontend
setup frontend#
# prefer local-frontend if you want to do changes there
make local-frontend
# prod build (may need to edit OAUTH_BASE_URL for your usecase)
make frontend
# atvouch.dev (prod) is on wisp.place, deploy like this:
cd frontend/
wispctl deploy -p dist/ -s atvouch.dev
setup appview#
less recommended. this may just not work for you,
i rely more on test suite cd appview && mix test for development
and for prod i have my own personal scripts. i am effectively translating
those scripts into english for this readme.
first tap for atvouch records:
mkdir tap_atvouch
export TAP_DATABASE_URL=sqlite:///data/tap.db
export TAP_BIND=127.0.0.1:2480
export TAP_LOG_LEVEL=info
export TAP_FULL_NETWORK=false
export TAP_SIGNAL_COLLECTION=dev.atvouch.graph.vouch
export TAP_COLLECTION_FILTERS=dev.atvouch.graph.vouch,dev.atvouch.bot.membership
export TAP_FIREHOSE_PARALLELISM=4
export TAP_RESYNC_PARALLELISM=5
export TAP_DISABLE_ACKS=false
path/to/tap
then a second tap for tangled pull records:
mkdir tap_tangled
export TAP_DATABASE_URL=sqlite:///data/tap.db
export TAP_BIND=127.0.0.1:2481
export TAP_LOG_LEVEL=info
export TAP_FULL_NETWORK=false
export TAP_SIGNAL_COLLECTION=sh.tangled.repo.pull
export TAP_COLLECTION_FILTERS=sh.tangled.repo.pull
export TAP_FIREHOSE_PARALLELISM=4
export TAP_RESYNC_PARALLELISM=5
export TAP_DISABLE_ACKS=false
path/to/tap
build and run appview's auth component:
cd appview/auth
go build -o atvouch-auth
# on a server
export ATVOUCH_ENDPOINT=https://api.atvouch.dev
./atvouch-auth
then build and run appview itself:
export PORT=6154
export MIX_ENV=prod
export ATVOUCH_DID=did:web:api.atvouch.dev
export ATVOUCH_ENDPOINT=https://api.atvouch.dev
export ATVOUCH_METRICS_TOKEN=abcdef # sync this with a prometheus to do bearer auth
export ATVOUCH_DB_PATH="data/atvouch_prod.db"
export TAP_URI="ws://localhost:2480/channel"
export TAP_PASSWORD="123"
export TAP_TANGLED_URI="ws://localhost:2481/channel"
export TAP_TANGLED_PASSWORD="123"
# these currently must be the credentials for the bsky account. tangled requires
# a full oauth flow and contact with its appview to create pull requrest comments
export TANGLED_BOT_HANDLE="atvouch.dev"
export TANGLED_BOT_PASSWORD="...."
cd appview
# download deps
mix deps.get
# migrate db
mix ecto.create
mix ecto.migrate
# run server
iex -S mix run
configuring nginx and tls is left as an exercise to the operator