Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep

Overview

Paperwork

Paperwork is an open-source, self-hosted alternative to services like Evernote®, Microsoft OneNote® or Google Keep®

<iframe src="https://player.vimeo.com/video/401737579" width="640" height="480" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>

Mission

We at Paperwork believe that your private data should be yours and no other person or corporation should be able to access or even benefit from it. Hence it is our goal to build software that enables everyone to store and manage their documents in a cloud that's theirs alone – whether it's a computer scientist working with confidential data, a critical journalist, a freedom-of-speech activist or just your grandparents. Our goal is to be your privacy focused, open-source alternative to Evernote®, Microsoft OneNote® and Google Keep® for capturing ideas and managing documents.

Current State

Paperwork currently is under development. In order to get Paperwork in its current state running, you have to have an understanding for how Docker and DNS works and know the basic concepts of HTTP proxying. Also, experience with Traefik and Minio might come in handy.

If you don't have that, then the current state of Paperwork probably isn't for you. To make it clear: This software is not usable at this moment. It's being worked on to be made usable in the near future. In its current state, Paperwork v2 is targeted to developers that would like to get their hands dirty and contribute to the project.

Live Demo

A live demo of the current Paperwork status is available at:

https://www.demo.paperwork.cloud

This instance won't persist data on the server side, but it does store it inside your browser session. The instance is being destroyed every night at 3am UTC. Therefor all accounts are only valid for maximum one day. Please do not use this instance to store actual data/sensitive information!

If you try the live demo on a regular basis please make sure to clear your local browser cache.

This demo instance is sponsored by twostairs.

Quickstart

This repository is structuring and unifying all required components for Paperwork. It its purpose is to provide an example of how you could host Paperwork yourself.

$ git clone [email protected]:paperwork/paperwork.git

Docker Stack

In order to easily get Paperwork running as a Docker stack, utilising whichever orchestrator you'd like, this repository comes with a handy Makefile. Let's have a look at it:

$ make help

Configuration

Before deploying the Docker stack, you need to configure the environment properly. You can use the existing .env.example files as a template for that:

$ cd env/
$ ls -1 | while read ef; do echo $ef | sed 's/\.example$//g' | xargs -I{} cp {}.example {}; done

With these files, the Docker stack is configured to use www.paperwork.local (for the web UI) and api.paperwork.local (for the API services) by default. Hence you will need to add these to the 127.0.0.1 entry in your /etc/hosts file:

127.0.0.1   localhost paperwork.local api.paperwork.local www.paperwork.local

If you'd want to use a different domain and different hostnames for web and API, make sure to change the values inside env/env.env and env/web.env. For using this stack in a live deployment, you might also want to change passwords, JWT secrets and Erlang cookies across the .env files.

Deployment

Launching the Paperwork can be done by make-ing the deploy` target:

$ make deploy

The Makefile then takes care of initialising Swarm, in case you haven't done that already, creating the encrypted network (papernet or, if you use it from outside the stack, paperwork_papernet) and deploying the Paperwork stack on top of it.

In order to stop/remove the whole stack, simply use the undeploy target:

$ make undeploy

Note: This won't make your Docker host leave Swarm again, in case it wasn't running in Swarm mode before deploying! If you'd like to turn off Swarm, you have to do so manually.

Orchestrator

If you'd like to use a different orchestrator for stack deployment, you can do so by setting the ORCHESTRATOR variable on deploy:

$ make deploy ORCHESTRATOR=kubernetes

For more info, check the official Docker documentation for Mac and Windows.

Usage

As soon as you've finished the setup, you should be able to access your Paperwork deployment through this URL and you should be greeted with the login/registration:

Welcome to Paperwork

In order to use Paperwork, you will need to register a new account.

Development

In case you want to actively start developing on Paperwork, feel free to check out this branch and get involved with what's there already to get an idea of where Paperwork is heading. Also head to the current issues to see what needs to be done and suggest what could be done.

As for now, all tasks/issues are being collected inside this repository, just to keep it simple. On a long term, tasks/issues will be transferred into the related service's repository, in order to be able to reference them through git commits.

Make sure to join the official chatroom as well.

Software Architecture Overview

Paperwork Architecture

The Paperwork project consists of a handful of custom-built API services, which take care of everything related to their specific domain: Configurations, users, notes & attachments. Underneath those, there are various infrastructure services which are either implemented by the Paperwork project (service-gatekeeper) or simply awesome third-party open-source projects that's being made use of (e.g. Minio and Traefik).

The API services provide the core logic that processes domain specific data and persists it on the service's own database. Each API service has its own database that no other services accesses directly. Instead, services communicate with each other through internal HTTP endpoints. The gatekeeper service abstracts the authorisation layer from each individual service by checking and decoding the JWT bearer, so that every service that runs behind service-gatekeeper can be sure that access was validated and session information is forwarded and accessible via HTTP headers. JWT crafting is currently done in service-users. Hence, service-gatekeeper and service-users need to share the same JWT secret. Implementation in this area is kept simple for now but will change with the introduction of OAuth 2.

While the API services are not exchangeable, infrastructure services usually are. For example Traefik could be replaced with NGINX, Minio with a real Amazon S3 storage and even gatekeeper could more or less easily be replaced with Kong or a similar API gateway in future. API services on the other hand are tightly integrated with the business logic and their own databases. Also, because they exchange information with each other through internal endpoints, they depend on each other and (partially) on their peer's data structures. For example the notes service performs an internal request towards the users service when a note is being requested, in order to include user information (first name, last name, etc) for every access definition within that note. This aggregation of data is not necessary form a back-end point of view and is only done in order to make things more comfortable for the UI layer. While, from a separation-of-concerns-perspective this might not be an ideal setup, it reduces complexity for now and allows the project to iterate quite quickly.

On top of the infrastructure and API services there is the UI layer that was just mentioned, which currently consists of the Paperwork Web UI. The web UI is a PWA built on Angular that talks to the API services through the gatekeeper service. It's aimed to provide 100% offline use capabilities, so that it can be worked with in scenarios in which there's no connectivity to the API.

Info: 99% of development happens inside the individual service repositories! This repository only contains the one-click-deployment and the local development environment helper!

Repositories

Here are the main repositories of Paperwork:

  • paperwork: This is the repository you're currently looking at, containing the one-click-deployment and high-level documentation.
  • paperwork.ex: This is the Elixir SDK for building Paperwork services. Every Elixir-based service includes this as a dependency.
  • service-gatekeeper: This is the gatekeeper service that reverse-proxies requests to individual services and takes care of JWT validation/decoding. This service was written in Rust.
  • service-configs: This is the configurations service built in Elixir. It stores configurations and provides internal endpoints for other services to access them.
  • service-users: This is the users service built in Elixir. It stores accounts and profile information and provides internal endpoints for other services as well as external endpoints for user registration, login and profile management.
  • service-notes: This is the notes service built in Elixir. It stores all users' notes and provides external CRUD endpoints.
  • service-storages: This is the storages service built in Elixir. It stores all users' attachments and provides external CRUD endpoints.
  • service-journals: This is the journals service built in Elixir. It stores events that are related to database changes and provides external CRUD endpoints.
  • web: This is the Angular-based web front-end for Paperwork.

Local development environment

This repository not only features a one-click Docker Stack deployment, but also a local development environment which should work on any Linux/Unix platform.

Using the local development environment

In order to launch the local development environment, simply use the same make command you use for running local development instances of Paperwork service: make local-run-develop

$ cd paperwork/
$ make local-run-develop

The local development environment will start up with a short info on what's needed in order for it to function correctly. Please read the instructions provided there and follow them carefully. You will need to have some dependencies (e.g. Docker, Caddy) installed in order for the local development environment to function.

Also make sure to have the following TCP ports free on your system while using the local development environment:

Optionally, if you plan to run any of the following services, you'll need to make sure to have their local development environment ports free as well:

Check this video (38MB) in order to see how easy it is to get your local development up and running with make local-run-develop.

Here's the flow for launching everything that's required for development:

Terminal 1:

$ cd paperwork/
$ make local-run-develop

(follow the instructions given)

Terminal 2:

$ cd service-gatekeeper/
$ make local-run-develop

Terminal 3 and following:

$ cd service-.../
$ make local-run-develop

You should be good to go at this point. The Elixir services use code hot-reloading so you shouldn't need to kill the running process and re-launch it through make local-run-develop for every change you make. However, there are changes that won't get activated through hot-reloading. In that case, simply Ctrl+C and make local-run-develop again for that specific service.

Using the local database

The local development environment brings its own database. It's a vanilla MongoDB container that's being launched on its official port 27017. You can use the mongo shell or a GUI like Robo 3T to connect to it by via localhost:27017.

Every service uses this database to store its data. Each service uses its own collection inside this database. Services will never access other services' collections directly. If service A needs to have some of service B's data changed, it requests service B to do so through internal endpoints. This type of communication is cached and abstracted using paperwork.ex.

Supporting Paperwork

The best way to help this project is by contributing to the code. However, if that should not be possible to you, but you'd still like to help, the Paperwork project gladly accepts support in form of Bitcoins and Ether. Please use the following addresses to direct your donations:

  • Ethereum: 0x8Ea80Ab7eD3e925BdF1975F5afEb6bcA23C6581a 0x8Ea80Ab7eD3e925BdF1975F5afEb6bcA23C6581a
  • Bitcoin: 3DzwbsXp53VhANzF3jF2ch28Qnv1BeX1jk 3DzwbsXp53VhANzF3jF2ch28Qnv1BeX1jk

CAUTION: Do not send any donations to anywhere else but those addresses. Unfortunately we had situations in which random people (that were not affiliated with this project in any kind) posted PayPal addresses inside GitHub issues in order to scam money.

Links

Footnote

This branch contains the second iteration of Paperwork, which is a complete rewrite. Not only is it based on another framework - it is based on a completely different technology stack. It is in its very early development phase and not yet usable.

If you were looking for the Laravel-based version 1 of Paperwork, please check out this branch. Version 1 is not in active development anymore!

<script> (function(f, a, t, h, o, m){ a[h]=a[h]||function(){ (a[h].q=a[h].q||[]).push(arguments) }; o=f.createElement('script'), m=f.getElementsByTagName('script')[0]; o.async=1; o.src=t; o.id='fathom-script'; m.parentNode.insertBefore(o,m) })(document, window, 'https://cdn.usefathom.com/tracker.js', 'fathom'); fathom('set', 'siteId', 'EOJSAIDR'); fathom('trackPageview'); </script>
Comments
  • Paperwork is not recognizing https connection and serves content via http

    Paperwork is not recognizing https connection and serves content via http

    I have running paperwork behind a nginx webserver who redirects to the paperwork server. Everything is running via https managed by that nginx server.

    I have only one issue: paperwork requests all css and js includes used via http which causes error message when loading the application. E.g. "Firefox has blocked insecure content" etc.

    All CSS includes in the head are like this:

    All JS includes at the end are like this:

    I tried to figure out how to force https here but have no solution so far. Any ideas?

    Thanks JJ

    bug report 
    opened by JamborJan 65
  • Installation problem

    Installation problem

    Hi,

    I am running an ubuntu 14.04 server with apache. Installation of paperwork goes fine and I launch the app by reaching https://IP/paperwork/frontend/public. (I cannot change the docroot because I have other webapps in /var/www/html)

    User registration goes fine too but after I am not able to create notebooks. When the "create" button is pushed nothing happens. Also, image on login screen and logo on top left corner while in the app don't display. When I try right click see image I have a Page not found error and it show the url requested was "https://IP/image/..." instead of "https://IP/paperwork/frontend/public/images/...".

    What can I do to fix it ?

    Thanks

    EDIT: By setting Apache docroot to public/ folder everything goes fine in the app (images, notebooks etc..). I still need to add index.php at the end of url. But I can't work like this because of my other apps.

    feature request question 
    opened by Lich4r 34
  • Migrate to Laravel 5

    Migrate to Laravel 5

    This isn't something that needs to be done now, nor tomorrow, nor in a month - it's more of a backlog task that needs to be done someday, when Laravel 5 became available and got mature enough to be used in production.

    feature request 
    opened by mrusme 33
  • How do I start it on a Virtual machine?

    How do I start it on a Virtual machine?

    Hi, everyone, first of all, I have a server with Proxmox and I have installed in a virtual machine Ubuntu Server 18.04, docker, docker composer and the latest version of PaperWork 2 software according to the instructions.

    It seems that it's installed correctly, but I don't know how to start it because it is a virtual machine and it is on the address 192.168.1.XXX, not localhost. I can not see where the error is.

    Can somebody help me?

    Thanks in advance.

    question 
    opened by moblesmarti 30
  • Configuration has not been set correctly. Please try again.

    Configuration has not been set correctly. Please try again.

    I'm in setup.php setp 1. When I click Next button, the web page shown a red error said 'Configuration has not been set correctly. Please try again.'. Chrome console shown an error said 'Failed to load resource: the server responded with a status of 404 (Not Found)' and 'jquery.js:9664 GET http://192.168.1.3/setup/setup.php 404 (Not Found)'.

    send    @   jquery.js:9664
    ajax    @   jquery.js:9215
    (anonymous function)    @   setup.php:412
    dispatch    @   jquery.js:4670
    r.handle    @   jquery.js:4338
    

    The Next button function:

    $("#next_btn, #next_btn_mobile").click(function() {
        if(currentStep == 4) {
            data = "";
            var checkboxes = $("#config_form input[type='checkbox']");
            for(var i = 0; i < checkboxes.length; i++) { 
                data += checkboxes[i].name + "=";
                if(checkboxes[i].checked) { 
                    data += "true&"
                }else{
                    data += "false&"
                }
            }
            $.ajax({
                type: "POST",
                url: "setup/setConfig",
                data: data
            }).success(function() {
                nextStep((currentStep + 1));
            }).error(function() {
                $("#config_not_set").show();
            });
        }else if(currentStep < 7) {
            nextStep((currentStep + 1));
        }
    });
    

    I debuged it, found that though I'm in setp 1, currentStep was 4. It executed ajax post, and ended in error, so finally $("#config_not_set").show(); executed.

    opened by bu2zhouzhu 30
  • Paperwork behind Nginx Reverse-Proxy?

    Paperwork behind Nginx Reverse-Proxy?

    Hi guys.

    So yeah, a few weeks ago I revisted this project, and I am very happy with it. I've moved over my stuff from Evernote to Paperwork, and configured paperwork to proxy through my Nginx reverse proxy, and now I'm having issues.

    paperwork.domain.local is my server name that paperwork is running on. domain.com is my public facing domain, and I have my Nginx reverse-proxy setup using that already with other services. For example, cloud.domain.com reverse proxies to owncloud.domain.local, and it works great. notes.domain.com is what's used for my Paperwork setup.

    With the same setup, I can get to the login screen for paperwork. Once I type in my creds, I hit Sign in and get redirected from https://notes.domain.com/login, to http://paperwork.domain.local/login, which obviously isn't accessible outside my network.

    Is Paperwork hard coded to do, or something? I have 9 other services with the same config in Nginx, and they all work just fine. Paperwork redirects in a strange way.

    Thanks!

    question pending feedback 1 
    opened by DeviantEng 30
  • Installation failed : incomplete interface, inefficients buttons

    Installation failed : incomplete interface, inefficients buttons

    Hi ! I try to install Paperwork on my vps. I installed all dependancies but here the problem : I install gulp with sudo npm install -g gulp but there is an error at unsupported.js:28 : console error('a bug known to break npm (...) SyntaxError: Unexpected token ILLEGAL

    Composer and NPM are installed and i verified versions.

    An idea ?

    pending feedback 1 
    opened by crostif 29
  • Upgrade problem

    Upgrade problem

    throughout the year I had no problem with updates. My last update (php artisan paperwork:update) was 2016-11-21. Now, I try update and get error:

    paperwork_4

    Last update kill config file ?

    bug report 
    opened by jacek-1210 27
  • Installation help

    Installation help

    Hi there. I'm VERY interested in this project, and am trying to get it set up on CentOS 7 (which will be documented and posted to my site). However I'm having a problem getting this set up correctly.

    CentOS 7 PHP 5.6 mariaDB Apache

    I have paperwork downloaded at /var/www/html/paperwork, and have run php composer.phar install, which completes without error. I set up the database with the default (db/user/pass all paperwork), and then run php artisan migrate. Everything seems to install without error, apache and mariadb are running, and when I browse to http://server.domain/paperwork, it just shows the directory listing. I don't see any php or html files in the project root, so I'm not sure what page it's supposed to load?

    Can you provide some assistance here?

    Thanks! 1

    opened by DeviantEng 25
  • Problem with # after upgrade

    Problem with # after upgrade

    After last upgrade, when I push paperwork logo or "library" button (I will go to the start page), I get link "paperwork_link.com/#" not "paperwork_link.com/" & I must allways manually delete "#"

    opened by jacek-1210 24
  • Export function

    Export function

    Hey!

    are there any plans for implementing an export function in nearer future? Since I see me updating quite frequently, I want to backup my notes outside of the server environment.

    best regards!

    feature request 
    opened by ghost 24
  • Create Paperwork app on Cloudflare

    Create Paperwork app on Cloudflare

    It would be great if you can release an app on cloudflare workers https://developers.cloudflare.com/workers/tutorials

    which can be embedded into any CMS/Pages etc

    opened by davidjeba 0
  • Wizard problem at step 4

    Wizard problem at step 4

    Describe the bug The setup wizard procedure stops at step 4 and does not proceed towards the request for the first access credentials.

    To Reproduce Steps to reproduce the behavior:

    1. .../paperwork/frontend/public
    2. Click on "NEXT"
    3. verify the dependence if ok (and it's ok)
    4. Click on "NEXT"
    5. MySQL login credentials are required; input them and Click "Check Credentials";
    6. click on "NEXT"
    7. The "Customized ypur paperwork" page: there is no need to change anything
    8. Click on "NEXT"
    9. nothing happens

    Expected behavior the wizard should ask for the first credentials but the page does not appear and therefore it is impossible to proceed and complete the setup

    Desktop (please complete the following information):

    • OS: Windows 10
    • Browser chrome, firefox, edge

    Additional context We tried to change the counter in the file / app / storage / config / setup by inserting the number "5" or the number "6" instead of "4" but there is no effect. If you enter the "7" the next page "login" does not work (blank page)

    bug report 1 
    opened by gddblo 0
  • Http failure after timeout

    Http failure after timeout

    Describe the bug after a while of inactivity the http failure response message appear

    To Reproduce login wait a while get error and system not usable deleting cookies and browser cache doesn't help

    Expected behavior manage the logout session

    Screenshots image

    2 component: users area: front-end 
    opened by garanews 0
  • Delete button on all note list not working

    Delete button on all note list not working

    Describe the bug Delete button on all note list doesn't delete note, need to select single note and use the other delete button

    To Reproduce Steps to reproduce the behavior: create note go back on note list select note and press delete button refresh page and note is still there

    instead if open note and use the delete button there, it works.

    Expected behavior Delete button not all note page working

    Screenshots image image

    2 component: notes area: front-end 
    opened by garanews 0
  • Sharing note between users not working

    Sharing note between users not working

    Describe the bug Sharing a note between users is not working

    To Reproduce Steps to reproduce the behavior: create note press share, select the other user on the other user the note is not appearing (I waited 30mins)

    Expected behavior the note must be available on the other user

    Screenshots

    image

    image

    2 component: notes area: front-end 
    opened by garanews 0
  • Edit button duplicate text

    Edit button duplicate text

    Describe the bug every time pressing edit button, all text is being duplicated

    To Reproduce press new note write something in title,tag,text press edit many times as you want

    Expected behavior Nothing

    Screenshots image

    image

    Desktop (please complete the following information): Chrome 81.0.4044.122 Edge 44.19041.1.0

    bug report 2 component: notes area: front-end 
    opened by garanews 0
Releases(snapshot-3751d936)
Owner
Paperwork
OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep
Paperwork
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022
A versatile PHP Library for Google PageSpeed Insights

PhpInsights An easy-to-use API Wrapper for Googles PageSpeed Insights. The JSON response is mapped to objects for an headache-free usage. Installation

Daniel Sentker 110 Dec 28, 2022
A Laravel package to retrieve pageviews and other data from Google Analytics

Retrieve data from Google Analytics Using this package you can easily retrieve data from Google Analytics. Here are a few examples of the provided met

Spatie 2.8k Jan 7, 2023
PHP package to manage google-api interactions

Google-api-client PHP package to manage google-api interactions Supports: Google Drive API Google Spreadsheet API Installation composer require obrio-

OBRIO 3 Apr 28, 2022
Adds a specific header to every response to disable Google's usage of your site in it's FLoC tracking method.

Go Unfloc Yourself Description A bundle for Symfony 5 that adds a Permissions-Policy header in all the responses to prevent the use of new Google's "F

(infinite) loophp 3 Feb 25, 2022
🌐 Free Google Translate API PHP Package. Translates totally free of charge.

Google Translate PHP Free Google Translate API PHP Package. Translates totally free of charge. Installation Basic Usage Advanced Usage Language Detect

Levan Velijanashvili 1.5k Dec 31, 2022
Google PHP API Client Services

Google PHP API Client Services

Google APIs 1.1k Dec 22, 2022
Google Drive Api Wrapper by PHP

GoogleDrive Api Wrapper usage at first you need to create oauth client on google cloud platform. so go to the your google console dashboard and create

Arash Abedi 2 Mar 24, 2022
An elegant wrapper around Google Vision API

STILL UNDER DEVELOPMENT - DO NOT USE IN PRODUCTION Requires PHP 8.0+ For feedback, please contact me. This package provides an elegant wrapper around

Ahmad Mayahi 24 Nov 20, 2022
Google VerifiedSMS Laravel Package

Google VerifiedSMS Laravel Package This is a laravel package developed for google business communication api and verified SMS API. Before we commence

Saju G 2 Nov 22, 2021
🌏 Discover Random Destinations & Cities explored by people on Google Street View.

Random Street View on Steroids ?? Welcome to the streetviewhub.com codebase. Here lies all the code with all the awesomeness and ?? s. Have some ideas

Akash 22 Dec 16, 2022
Simple Google Tts Api Class

Simple Google Tts Api Class

Ömer Faruk Demirel 2 Dec 2, 2022
It's a PHP Application to simplify working with Google Sheets SDK for php.

About GoogleSheetsPHP It's a PHP Application to simplify working with Google Sheets SDK for php. Note: i used Slim 3 to construct the application but

Sami Alateya 5 Dec 20, 2022
Google Translator Api Wrapper For Php Developers.

Google Translator Api Wrapper For Php Developers.

Roldex Stark 2 Oct 12, 2022
Google Cloud Profiler for PHP

Google Cloud Profiler for PHP Idiomatic PHP client for Google Cloud Profiler. API documentation NOTE: This repository is part of Google Cloud PHP. Any

Google APIs 1 Apr 28, 2022
Attempting to create an intelligent mock of the Google API PHP Client for unit and functional testing

google-api-php-client-mock A small scale intelligent mock of the Google API PHP Client for unit and functional testing. Overview This is intended to m

SIL International 0 Jan 4, 2022
My personal note-taking application.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Ryan Chandler 3 Oct 31, 2021
Gruik ! An open-source markdown note-taking web app. [ABANDONED PROJECT]

What is Gruik ? It's a free & open-source note-taking service. A space where you can store notes, tutorials, code snippets... by writing them in markd

Adrien Pétremann 329 Dec 14, 2022
Scribbl is a fast and minimalistic note-taking app built with Laravel

Scribbl is a fast and minimalistic note-taking app built with Laravel

Cam White (Jex) 5 Nov 13, 2022
this is a semester project using Laravel, this app allow user to keep and shear their note with other users.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Vichhagar Nhin 0 Dec 24, 2021