This is the simplest possible service for leaving one-time notes.
- Generate link that will be available only for one view (and QR code for it)
- Links protected with reCAPTCHA, so brute-force is not possible (reCAPTCHA js file is included on a separate pre-show page and never on the same page where you enter or reveal secret)
- Optional E2E encryption. Secret encrypted in the browser and is sent to the server encrypted.
- Simplistic uncluttered responsive UI with full mobile support
Crypt can be compiled into a single binary, all batteries included:
- Embedded DB (boltdb)
- All static files are compiled to binary
Trying to keep dependencies to bare minimum, only use:
- google uuid library
- boltdb for storing secrets
- QR code library for qr code generation
Frontend follows the same ideology:
- No JS frameworks. The only JS file is responsible for E2E encryption and autoresizing textarea
- Everything is rendered server-side (with native Go module). Works without JS perfectly via forms (long forgotten technology), except for reCAPTCHA.
- Pure CSS is only 3-rd party dependency for grid and styling forms, inputs, etc.
Would be nice to have those features:
- Customizable expiration for links
- Customizable amount of possible views for links
You need to have go and make tools installed:
- Clone this repository
- Run
make
-config
— path to configuration file
Possible contents of a configuration file is listed below:
{
"port": "which port should be used to start server, default: 8080",
"domain": "domain that this server is binded to, need this to generate correct link, required",
"db_location": "location of the db file on disk, default: crypt.db",
"client_key": "ReCAPTCHA site key, required",
"secret_key": "ReCAPTCHA secret key, required"
}
-prefix
— prefix for env variables name, default: crypt
You can override any option with env variable, even those that are required. So, you can totally skip config file and use only env vars.
To do that you have to set env varibale with name {prefix}\_{option}
.
Option name should be spelled uppercase without any symbols.
For example, to override secret key you have to set {prefix}\_SECRETKEY
variable.