Git Product home page Git Product logo

tornote's Introduction

Tornote

Build Status Test Status Docker Image Go Doc License: Apache

Self-destructing notes written on Go with Stanford JS Crypto Library for client-side encryption/decryption.

Latest stable version deployed on https://tornote.herokuapp.com/

Security aspects

  • AES-256 encryption used with 27 bytes secret key (randomly generated on client).

  • All private data including secret not leaving a web-browser without encryption.

  • Server stored only anonymous encrypted data (without any reference to author or reader).

  • Note decrypted on the client-side via the SJCL and immediately deleted on server after reading.

If you have ideas to improve the our safety/security so far as possible please post the issue.

Settings

Configuration settings can be set with .env file or environment.

DATABASE_URL - Data source name (DSN) for PostgreSQL database.

SECRET_KEY - Server secret used for CSRF protection.

HTTPS_ONLY - HTTPS only traffic allowed (disabled by default).

Getting started

Deploy to Heroku cloud:

Deploy to Heroku

Build and run locally with Docker:

git clone https://github.com/osminogin/tornote
docker build -t tornote .
docker run -p 8000:8000 -e DATABASE_URL=... -e SECRET_KEY=... tornote

ChangeLog

CHANGELOG.md

License

See COPYING

tornote's People

Contributors

osminogin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tornote's Issues

Feature suggestion

Hello again,

wanted to just post a few feature options for you to consider.

  1. Expiration options - (hour, day, week, two weeks). In case the URL is not used, the note will self-destruct after the specified time.
    This would be handy in case for example if one creates a note and then by accident goes and creates another one. Unless you have copied the previous URL there is no way to get to it (unless you go to the DB and delete it). Maybe there is but I haven'�t figured it out.

  2. Copy button - when the generated URL is shown it is already highlighted and you can just copy it using the keyboard. Maybe there could be a copy button option as well for users that prefer is that way. Also, mobile platform (iOS) doesn't even generate an URL that it is preselected, so a manual selection is needed for that example.

  3. Warning before showing the note - maybe there could be a mechanism that will warn the user that upon confirmation the note will be destroyed, just in case that there was a mistake opening the URL in the 1st place.

Also, I have noticed that the message is flagged as read (and I get 404 error in these cases) if you copy it inside an app that supports URL detection (like SLACK or Rocket.Chat). Unless the URL is copied there as a CODE, the URL will result in 404 (already read and deleted). Not really sure if I made my self clear on this last one but essentially any app that can detect URL and try and resolve them (to pull down a thumbnail, or description of the site) will trigger READ message.

Tnx again for this platform!

Feature request: variable for domain

It would be nice to add a new variable to set the domain or message that is displayed at the top of the page instead of the creators web domain.

Special chars are breaking note content

While using Tornote, I realized that some special chars are breaking a note.

Something like:
image

Will result in:
image

As you can see the use of the char < in the middle of a word breaks the rest of the message MySuperPassword is gone.

Do you have any thoughts ?

Won't start in docker

Hello,

I have build this app in a docker image with 0 errors but when starting it I get the following output:

panic: open templates/index.html: no such file or directory


goroutine 1 [running]:

github.com/osminogin/tornote.(*server).Init(0xc000211890)

	/go/src/app/server.go:151 +0x57a

main.main()

	/go/src/app/cmd/tornote/main.go:57 +0x35b

Any help on the matter?

Tnx!

Roll binary only in docker

Not so seasoned in Go, but is there a way to roll just the binary to then drop into an empty docker container? Or is the binary dependent on libraries for sqlite?

I've tried doing this, but the binary fails to execute when launching in an empty container without golang installed.

install: deps
	@echo "--> Build and install binary"
	CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -tags netgo -ldflags $(GOLDFLAGS) ./...  -o tornote tornote/main.go

Dockerfile is broken

In the dockerfile:

Step 10/14 : RUN sqlite3 db.sqlite3 <db.scheme
 ---> Running in 07221251c434
/bin/sh: 1: cannot open db.scheme: No such file

should be

RUN sqlite3 db.sqlite3 <db.schema

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.