Code Monkey home page Code Monkey logo

mininote's Introduction

MiniNote

GitHub package.json version GitHub code size in bytes GitHub last commit


A simple, self-hosted, encrypted Markdown note-taking app built with Vue 3, and Express. Check out the hosted demo!

⚠️ Breaking Changes

With the release of version 1.0.0, encryption was introduced. However, due to this non-trivial change, this release is not backwards-compatible with previous versions. Attempting to run version 1.0.0 with a database created with an earlier version will cause the application to crash.

Currently, no automated migration is provided, sorry. To migrate to 1.0.0, you will need to run two parallel instances and manually copy your notes.

βš™οΈ Requirements

  • NodeJS >= 16.14.0 LTS

⌨️ How to run?

πŸ’‘ Since version 1.0.0, TLS encryption is mandatory for hosts other than localhost, as required for window.crypto.subtle (see #73).

When either only using MiniNote locally or running it behind a reverse proxy, which terminates TLS instead, you can leave out the HTTPS / TLS part of the setup.

# 1. Clone the repo
$ git clone https://github.com/muety/mininote

# 2. Install backend dependencies
$ yarn

# 3. Install frontend dependencies and build
$ cd webapp && yarn && yarn build && cd ..

# 4. Obtain or create a TLS certifiate
# See https://www.linode.com/docs/guides/create-a-self-signed-tls-certificate/
# Skip for localhost or with reverse proxy

# 4. Set environment variables for TLS cert and key
# Skip for localhost or with reverse proxy
$ export HTTPS_CERT='path/to/your/mininote.crt'
$ export HTTPS_KEY='path/to/your/mininote.key'

# Run
$ yarn start

🐳 How to run with Docker?

# 1. Obtain or create TLS certificate (see above)

# 2. Create a persistent volume
$ docker volume create mininote-data

# 3. Run the container
$ docker run \
    -d \
    -p 3000:3000 \
    -v mininote-data:/app/data \
    -v path/to/your/mininote.crt:/etc/mininote.crt:ro \
    -v path/to/your/mininote.key:/etc/mininote.key:ro \
    -e HTTPS_CERT=/etc/mininote.crt \
    -e HTTPS_KEY=/etc/mininote.key \
    --name mininote \
    ghcr.io/muety/mininote:latest

πŸ”’ Encryption

MiniNote features encryption, i.e. every note's title and content are encrypted on the client-side (i.e. in your browser) using symmetric AES-GCM provided by the Web Crypto API. However, a notebook's password is used to derive the encryption key. That is, encryption is only as strong as your password. Moreover, although notes are sent to the server encryptedly, this cannot be considered true end-to-end encryption, since the server technically has a chance to log your password the moment you create a new notebook in the first place. MiniNote aims for a decent level of security, but does not claim to be NSA-proof.

πŸ§‘β€πŸ’» Contributing

Feel free to contribute! All contributions that add value to the project are welcome. However, please be aware that you are not done after having opened a PR. In order to keep quality high, it is expected that you implement change requests and react to comments within an adequate time, until your code is merged. Otherwise your PRs will be closed after a while, sorry!

πŸ““ License

MIT @ Ferdinand MΓΌtsch

mininote's People

Contributors

andlehma avatar btbtravis avatar chopinsky avatar dependabot[bot] avatar jamessral avatar litesoul avatar madsroskar avatar muety avatar oantoro avatar paperlambda avatar sirmossi avatar vinmaster avatar ywpark1 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mininote's Issues

Importing bootstrap.css failed on build

ERROR in ./src/main.js
Module not found: Error: Can't resolve 'bootstrap/dist/css/bootstrap.css' in '/home/daniel/node/mininote/mininote-frontend/src'
 @ ./src/main.js 7:0-42

npm run build in /mininote-frontend generates the error above.

System: Ubuntu LTS
node -v: v9.8.0
npm -v: 5.6.0

Why is password a requirement for notebooks?

As the contents of the notebooks are stored in a plain .json-file on my computer, what is the point of creating a password for them? And why is it required?

(If I could add a label, I'd add a question label :D )

Make editor collapsible

Make the Markdown editor horizontally collapsible to have a wider rendered view, especially on small screens.

Make notebooks be accessible via URL

Introduce very basic routing, so that a notebook recipes could be directly accessed (and therefore browser-bookmarked) via https://notes.myserver.ex/recipes.

Full screen / window Markdown mode

Hi,

Would it be possible to have a full screen, distraction free mode? I see that the splitter collapses the markdown to show a full window HTML preview, but it would be brilliant if the splitter can collapse the other way to let us write full window.

Usage *without* encryption

From what I saw, saving notes unencrypted isn't possible with the current code and there's no "switch" to configure it to behave that way. A way to configure, i.e. turn encryption on/off, would be nice.

I know this sounds like a step back, but I personally think the risk of forgetting a password is far worse than the risk of the local admin being able to read the notes in cleartext. With the current setup, you need to fully trust the administrator (and environment the app is running) anyway.

(I think being able to use something like Mailvelope or WebPG together with mininote, or encrypting the database as whole (i.e. to be able to store it in more unsafe locations securely) would make more sense.)

End-to-end encryption

Mustn't be crazily secure, simply use symmetric encryption with a notebook's password as key.

Add support for HTTPS

I quickly tested this application and it works great! I didn't notice any information concerning HTTPS support? Is it planned? Thanks!

Add Notebook controller for Router

Hi,

I would like to add the controller for the Notebook, so that we can easily handle the http requests and router.

We can also add more routes with controllers later on.

Delete Notebook

Version: 1.0.2
S.O: Docker

I can create notebooks, and enter in it, but I canΒ΄t delete after.

Fix styling bugs

There are several styling bugs which have not been there in an earlier version. The screenshot show a comparison between a mininote instance hosted on my private server that was installed several months ago and an instance that was installed today. The first screenshot shows the way it should look like, the second one how it currently looks like.

It might be due to version changes in the frontend's dependencies or something else. Please feel free to help me find out and fix this πŸ™‚

Right

image

Wrong

image

Right

image

Wrong

image

Yarn run fail

I've tried to install mininote with yarn but it give me this error:
Schermata del 2021-01-09 18-37-09

Some info about my config:
SO: CentOS Stream 8
NodeJS: 14.15.4
Yarn: 1.22.5

Logo design

Hi, I'm a logo designer I just saw your project and if you want I can design a logo for your project. So, what do you say?

Dockerize

Create Dockerfile for building mininote as a Docker image with exposed port and ability to mount a volume.

Support Node >= 8.10 (UnhandledPromiseRejectionWarning)

Listening at http://localhost:3000
(node:21948) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/home/lisbeth/Documents/mininote/mininote-frontend/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:21948) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21948) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Full-text search

Come up with concept and demo implementation for full-text search. Software options include:

  • Meili
  • Bleve (not standalone?)
  • Solr (heavyweight / hard to configure?)

Any thoughts on this?

Alert when leaving page with unsaved changes

It would be nice to have an alert when a user tries to close a tab / navigates to another site while there are unsaved changes, as shown in the screenshot below. There has to be a native browser API to do so (maybe window.onbeforeunload?).

image

Get rid of server-side authentication

Since we have "end-to-end" encryption now, we might actually get around all server-side authentication and therefore the current security risk of having to trust the server admin to not use modified code that initially logs your password (see here).

Currently, a note will only be returned by the server, if the user passes a correct password. Instead, we could simply return every note, since only a user with the right decryption key can make sense of it.

Only problem: this would be perfectly reasonable with "proper", bullet-proof encryption. Since we're using a user-generated password for encryption, though, it will potentially make things more prone to brute-force attacks where users are using too simple passwords.

Any thoughts?

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.