Merge branch 'feature/nixify-and-saltine'

This commit is contained in:
2024-02-16 18:30:37 -06:00
14 changed files with 239 additions and 177 deletions

51
README
View File

@ -1,8 +1,17 @@
purr
-----
STATUS: BROKEN
DETAILS: Currently unable to decrypt/unencode secrets written to the database.
This broke when converting to Nix because it was learned that the previous
crypto-simple library was out of date and needed to be replaced. Use commit
b4bbf6e5a796d6dfc44ac0a052ec4949d2394927 if you want to build a
working project.
https://purr.eversole.co
a work-in-progress web application offering customizable password generation and time-limited sharing of secrets.
a work-in-progress web application offering customizable password generation
and time-limited sharing of secrets.
TECH STACK
@ -10,23 +19,35 @@ TECH STACK
- HTMX frontend
- SQLite database
GOALS
- Generate sufficiently memorable but secure passwords for use with accounts
that don't offer better authentication methods.
- Share text secrets with others without disclosing the secret in the
message itself.
- Be really cute compared to the competition.
- Provide a minimal and clean interface for generating and sharing passwords.
- Maintain a clean and organized codebase that can be extended to include more
utilities than originally anticipated.
WHY TRUST YOU?
You shouldn't. This is free and open-source software which you can run on your
own hardware.
DEPLOYMENT
purr is intended to run in a docker container.
This repo's Stack project is configured to use a musl-based docker container for builds.
Assuming your working directory is inside of this repository:
Use Nix with flakes enabled.
1. Copy "examples/config.dhall" to ./config.dhall - configure this file appropriately.
- Use `openssl rand -hex 10` to generate an encryption key for "dbKey"
2. Copy "examples/Dockerfile" to ./Dockerfile
3. If using default database file location, run: `mkdir ./data; touch ./data/Purr.sqlite`
4. Run `chmod +x build-docker`
5. Run `./build-docker $IMAGE_NAME` to complete the initial Stack build and create the container
6. Orchestrate the container as desired
- docker run -d -v "$(pwd -P)/data/Purr.sqlite:/app/data/Purr.sqlite" \
-v "$(pwd -P)/config.dhall:/app/config.dhall" \
-p 5195:3000 purr
|- An example docker-stack.yml is provided: `docker stack deploy -c docker-stack.yml purr`
Build binary and run natively:
nix build && ./result/bin/Purr-musl
Build and add Docker image to local registry:
nix build .#purr-docker && docker load < result
DEVELOPMENT & SUPPORT