https://github.com/joshterrill/hushnote
:speak_no_evil: a privnote-like service with a REST API that lets you send one-time-use messages via unique url's
https://github.com/joshterrill/hushnote
encryption pgp privacy
Last synced: 3 months ago
JSON representation
:speak_no_evil: a privnote-like service with a REST API that lets you send one-time-use messages via unique url's
- Host: GitHub
- URL: https://github.com/joshterrill/hushnote
- Owner: joshterrill
- License: mit
- Created: 2017-08-02T07:43:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T14:17:03.000Z (almost 3 years ago)
- Last Synced: 2023-08-02T23:23:16.268Z (almost 3 years ago)
- Topics: encryption, pgp, privacy
- Language: JavaScript
- Homepage: https://hush.dangerous.dev
- Size: 413 KB
- Stars: 26
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hushnote
A small privnote-like application written in Node/Express on the server and vanilla javascript on the client. It allows you to send *client-side encrypted* one-time-use messages to someone via unique URL's that are generated on the server - once someone views the note, it is decrypted on the *client*, then destroyed.
*If you wish to take advantage of the client-side encryption/decryption, feel free to use the web UI hosted at: https://hush.dangerous.dev - if you want to implement the API in your own applications, endpoints prefixed with /api are still sever-side encrypted.*
There is also a public API that you can use if you would like to integrate it into your own applications.
Public URL: https://hush.dangerous.dev
## API Endpoints
### POST `/api/create/`
```
Headers: Content/Type = application/json
Body: {"note": "this is a test message"}
------------------------------------------
Success Response:
{
"url": "https://hush.dangerous.dev/api/read/40312d32/160586e0",
"error": null
}
```
### GET `/api/read/:key/:pass`
```
Success Response:
{
"note": "this is a test message",
"message": "Note has been destroyed."
}
Note Not Found Response:
{
"note": null,
"message": "Could not find note, perhaps it has already been destroyed?"
}
Incorrect Pass Response:
{
"note": null,
"message": "Incorrect URL parameters. Note has been destroyed."
}
```
## Spinning up your own instance
1. Check out the project by cloning it `git clone https://github.com/joshterrill/hushnote` and then `cd hushnote/`
2. Install dependencies by typing `npm install`
3. Create an `.env` file from a copy of `.env.example` by running `cp .env.example .env`
4. Add your mongodb connection string and other required variables to the `.env` file. If you wish to have a clean-up job delete any stale notes after a certain amount of days, flip the `.env` variable `DELETE_STALE_MESSSAGES` to `true` and define the `DELETE_STALE_MESSAGES_DAYS` variable top equal how many days you want to keep on hand at any given time. If this is set to true, the home page will have some text on it that shows when stale messages will be deleted.
5. Type `npm start` to run