readme: extend, reword, add sections [skip ci]

This commit is contained in:
surtur 2023-08-08 13:14:11 +02:00
parent 08b49f5731
commit 649590f8af
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

View File

@ -25,6 +25,18 @@
</p>
### Who is this good for
it might come in handy to anybody willing to operate this application for
family, a group of friends, a university faculty or even just for themselves.
### What even is this
Password Compromise Monitoring Tool offers a frictionless way to check
credentials for potential compromise. of course, the application cannot
possibly know it all, which is why no indication of compromise does not
necessarily amount to no compromise.
### How to try this out
with [`podman`](https://podman.io/) and [`just`](https://github.com/casey/just)
@ -97,24 +109,40 @@ config](exampleConfig.dhall).
If you're new to Dhall, its [documentation](https://docs.dhall-lang.org/) page
is a good resource to start at.
### Run modes
there are toggles that affect how the application behaves, and they can both be
supplied either as environment variables prefixed with `PCMT_` or in the
configuration file:
* `LiveMode`
* `DevelMode`
live mode makes the application load all assets from persistent storage, i.e.
it **no** assets embedded at build time are used (so make sure to supply your
own).
devel mode is mainly useful in development or when debugging. it makes the
application reload the templates at every request and automatically increases
log levels.
### 🔨 Building from sources
pre-requisites:
* [`just`](https://github.com/casey/just)
* [`just`](https://github.com/casey/just) (for convenience)
* [`npm`](https://docs.npmjs.com/cli/v9/)
* [`go1.20`](https://go.dev/)
* `git`
the application consists of *frontend* and *backend*. the *frontend* is
basically a **generated** TailwindCSS stylesheet and it is not shipped as part
of the development process. as such, it needs to be built from sources, same as
the backend.
of the development process. as such, it needs to be built from sources just the
same as the backend.
**step 0:** clone this repository with `git`
then build the *frontend* using `just tw` or `just frontend`
**step 1:** build the *frontend* using `just tw` or `just frontend`
next, build the Go application using:
**step 2:** finally, build the Go application using:
```sh
# debugging version.
just build
@ -123,16 +151,18 @@ just build
just buildrelease
```
alternatively, build both *frontend* and *backend* in release modes using:
`just prod`. the order of the steps is important as the application embeds the
generated stylesheet.
**step 1-alt:** build both *frontend* and *backend* in release modes using:
`just prod`.
the order of the steps is important as the application embeds the generated
stylesheet.
if you plan to run the application in `LiveMode`, the stylesheet can be
supplied when running the application; however, the binary will lack the way to
fall back to the embedded asset so bear that in mind.
if you're curious, you can open the [`justfile`](justfile) to see the details
of the build targets like `tw` and `buildrelease` used above.
of the build targets (such as `tw` and `buildrelease`) used above.
### LICENSE