verify the integrity of a file with the largest decentralized web of trust. built using lit and vite.
vite is used to develop and build the site. see their docs for specifics not covered here.
-
a compatible version of node.js (see
engines.nodeinpackage.json). nvm is the recommended installation method:nvm install
-
a nostr relay. any will work, but a good option for local development and testing is built into nak:
nak serve
install dependencies with npm:
npm installconfiguration 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 the development server:
npm run devprettier 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 lintwhen the development branch is ready for release,
release it! is used to orchestrate
the release process:
npm run releaseonce the release process is complete, merge the development branch into the
main branch, which should always reflect the latest release.
to generate a production build via the command line:
npm run buildthis creates a dist directory with the files to be deployed.
a Dockerfile is included that builds and serves the site:
-
make sure you have docker installed and running. docker desktop is an easy way to get started on your own machine.
-
build an image named
verifyfrom theDockerfile:docker build --tag verify .this generates a production build of the site using
.env.production. docker-static-website is used to serve the site. -
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 .