Skip to content

tinfoilhash/verify

Repository files navigation

tinfoil hash / verify

verify the integrity of a file with the largest decentralized web of trust. built using lit and vite.

development

vite is used to develop and build the site. see their docs for specifics not covered here.

prerequisites

  1. a compatible version of node.js (see engines.node in package.json). nvm is the recommended installation method:

    nvm install
  2. a nostr relay. any will work, but a good option for local development and testing is built into nak:

    nak serve

dependencies

install dependencies with npm:

npm install

config

configuration is done through environment variables. see vite's guide for full details.

.env.development is under version control to quickly bootstrap your development environment.

start

start the development server:

npm run dev

code style & linting

prettier is setup to enforce a consistent code style. it's recommended to add an integration to your editor that automatically formats on save.

eslint is setup with the "recommended" rules to enforce a level of code quality. it's also recommended to add an integration to your editor that automatically formats on save.

stylelint is setup with the standard config to enforce css rules. it's also recommended to add an integration to your editor that automatically formats on save.

to run all via the command line:

npm run lint

deployment

release

when the development branch is ready for release, release it! is used to orchestrate the release process:

npm run release

once the release process is complete, merge the development branch into the main branch, which should always reflect the latest release.

build

to generate a production build via the command line:

npm run build

this creates a dist directory with the files to be deployed.

docker

a Dockerfile is included that builds and serves the site:

  1. make sure you have docker installed and running. docker desktop is an easy way to get started on your own machine.

  2. build an image named verify from the Dockerfile:

    docker build --tag verify .

    this generates a production build of the site using .env.production. docker-static-website is used to serve the site.

  3. start a new container using the image, which serves the site on port 3000:

    docker run --interactive --tty --rm --init --publish 3000:3000 verify

if you're just looking to build the site, but not serve it, you can change the docker build command to export the dist directory from the docker image to your host machine:

docker build --target=export --output=dist --tag verify .

About

verify the integrity of a file with the largest decentralized web of trust

Resources

License

Stars

Watchers

Forks

Contributors