Skip to content

Commit e41ae38

Browse files
author
privapps
committed
Squashed commit of the following:
commit 282768b8726ba36db64b7406c6fccdf43633423a Author: privapps <privapps> Date: Thu Apr 17 18:15:13 2025 -0700 update gh action; more text changes commit 5b94a39ce4f49a9a3b27686e8bb1fc4b1e222da5 Author: privapps <privapps> Date: Thu Apr 17 17:43:11 2025 -0700 update gh action; readme and etc commit ae8b5803d65a3b0c824fc13d8b06886538a5fda3 Author: privapps <privapps> Date: Thu Apr 17 03:56:14 2025 -0700 add more highlights commit f30dd3aab0da5537bf88c643504a11fe483a71c8 Author: privapps <privapps> Date: Thu Apr 17 02:43:32 2025 -0700 add inline data commit f64a62fe648fed461055b69a93b1dede3c47a104 Author: privapps <privapps> Date: Wed Apr 16 17:00:41 2025 -0700 full functional commit 1e2f9d0759b4b7a30829139bd7e9dce30265eeb1 Author: privapps <privapps> Date: Wed Apr 16 10:40:39 2025 -0700 ommit commit 141bbf088cd975a91c6bbbe16dc2800794d25056 Author: privapps <privapps> Date: Wed Apr 16 09:47:47 2025 -0700 workable; need improvement commit 4065721431426bfc5b484f4e296e770855181926 Author: privapps <privapps> Date: Wed Apr 16 09:17:45 2025 -0700 wip. usable
1 parent c90a108 commit e41ae38

22 files changed

+17894
-14786
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
1-
name: Node.js Tags
1+
name: Node.js Tags
22

33
on:
44
push:
55
tags:
66
- '**'
77
jobs:
88
build:
9-
109
runs-on: ubuntu-latest
11-
12-
strategy:
13-
matrix:
14-
node-version: [20.x]
15-
1610
steps:
17-
- uses: actions/checkout@v2
18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v2
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
2013
with:
21-
node-version: ${{ matrix.node-version }}
22-
cache: 'npm'
14+
node-version: '22'
2315
- run: |
24-
npm install -g @angular/cli@16.2.12 && npm ci --legacy-peer-deps
25-
ng build --aot --build-optimizer --configuration production --base-href=/notebook/index.html
26-
cp -R dist/notebook-privapps notebook
27-
cd notebook && sed -i.bak "s|/notebook/index.html|/index.html|g" index.html && rm *.bak
28-
cd ..
16+
npm install -g @angular/cli@19.2.8 && npm ci
17+
ng build --aot --build-optimizer --configuration production --base-href=/index.html
18+
cp -R dist/notebook-privapps/browser notebook
2919
tar cjf notebook.tar.gz notebook
3020
- name: Release
3121
uses: softprops/action-gh-release@v1

.github/workflows/dev.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

README.md

Lines changed: 76 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,109 @@
11
# Privapp :: Notebook
22

3-
## A Simple End to End Encrypted Notebook / Website & Builder
4-
Privacy is a right, an irrevocable entitlement held by all human beings from the moment of birth. However, the boundary has been crossed systematically over and over again, not to mention about a large population is still living under heavily monitoring and censorship.
3+
## A Simple End-to-End Encrypted Notebook / Website & Builder
54

6-
This application is an End to End encrypted notebook that can only be viewed, edit, or shared by the permitted user. Unless the `E2E key` or your device is compromised, no one can view the content.
5+
Privacy is a fundamental right, an irrevocable entitlement held by all human beings from the moment of birth. However, this boundary has been crossed systematically over and over again, and a large population still lives under heavy monitoring and censorship.
76

8-
## Use cases
9-
* Use it as a personal private notebook. For example your daily, family secrects and etc.
10-
* Personal lock box. You can put your private information such as passport number and etc.
11-
* Share your notes to some of your friends with limited time.
12-
* Many more that are not listed here.
7+
This application is an end-to-end encrypted notebook that can only be viewed, edited, or shared by authorized users. Unless the `E2E key` or your device is compromised, no one can view the content.
138

14-
## App demo
15-
[![](https://privapps.github.io/notebook_m.jpg)](https://d.tube/#!/v/n0teb00k.privapps/QmXY3YD71CpFnQEMVa64aDeLUgGiEfKAqNMomyqahiEund)
16-
17-
## Tip
18-
- There is a `View All` utton, which show all pages together. You can use browser's search there to find the information you need
19-
- If you want to make a link to another notebook, sometimes the browser won't refresh due to the routing did not change. You can add another ```/``` in front of ```/index.html``` to work around that.
20-
21-
## How it Work
22-
* You create or modify the notebook at your browser from the local computer. Then you can choose to save it as a file, or publish to the web.
23-
* If you save to a file, you can choose as plain text or enrypted. If you choose to publish to the web,
24-
* `E2E key` is used for end-to-end encrypting or decrypting the content. If you don't set that, it would be used as a regular notebook. Note, even if there is no `E2E key`, from the server-side, the system administrator, network monitor are still not able to decrypt the content, because the encryption and decryption is happening at your **browser**. And we strongly suggest to set password for better protection.
25-
* This notebook is fully integrated / compatible with [privatebin](https://privatebin.info/). You can save the data at privatebin, then decrypt and view it from this app.
9+
## Use Cases
10+
* Use it as a personal private notebook. For example, for daily notes, family secrets, etc.
11+
* Personal lockbox. You can store private information such as passport numbers, etc.
12+
* Share your notes with some of your friends for a limited time.
13+
* Many more possibilities not listed here.
2614

27-
#### Use file as storage
28-
You can read or write a notebook and then save or load from a local file
29-
* `E2E key` is strongly recommended as it gives a better protection
30-
* Once you load the content, you can modify the note or save it with a different `E2E key`
15+
## App Demo
16+
[![](https://privapps.github.io/notebook_m.jpg)](https://d.tube/#!/v/n0teb00k.privapps/QmXY3YD71CpFnQEMVa64aDeLUgGiEfKAqNMomyqahiEund)
3117

32-
#### Use it from the web
33-
* When creating it, you can write a notebook start from scratch or load it from a pre-saved file
34-
* There are two ways you can share the notebook
35-
1. If this app is configured with privatebin, you can directly save it from the app. Then the shareable URL would appear at the top right of your screen.
36-
2. You can also gather the note data and publish it to a public available privatebin. This app can load from the public URL, and translate it into another URL that you can share. Here is a list of public avaliable privatebin: https://github.com/PrivateBin/PrivateBin/wiki/PrivateBin-Instances-Directory
18+
## Tips
19+
- There is a `View All` button, which shows all pages together. You can use your browser's search feature there to find the information you need.
20+
- If you want to make a link to another notebook, sometimes the browser won't refresh due to routing issues. You can add another `/` in front of `/index.html` to work around that.
3721

38-
## Sample notes
22+
## How It Works
23+
* You create or modify the notebook in your browser on your local computer. Then you can choose to save it as a file or publish it to the web.
24+
* If you save to a file, you can choose plain text or encrypted. If you choose to publish to the web:
25+
* The `E2E key` is used for end-to-end encryption or decryption of the content. If you don't set that, it would function as a regular notebook. Note that even without an `E2E key`, the system administrator or network monitor cannot decrypt the content because encryption and decryption occur in your **browser**. We strongly recommend setting a password for better protection.
26+
* This notebook is fully integrated and compatible with [PrivateBin](https://privatebin.info/). You can save the data in PrivateBin and then decrypt and view it from this app.
3927

40-
- Here is a [Peppa pigs' simple trivial questions](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___peppa&symmetric,Hj84nE4pQW4iBXhXhGf3wNeHqtYzGsupFFZHYgDDffjw) without a password. And you need the answers from the simple one to open [Peppa pig's Advanced trivial questions](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___peppa2&symmetric,7rrxctQBPgKwfUuU5XrQLteScRpZvPX2jQ6pbRcsASGt)
41-
- 中文问答 [00后不懂的事情](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___00&symmetric,5PQae51qE2E7e8KwqQERYkWYTcUntdWqH4Qn4LMKRj6d). 你必须答出来之前的题目才能够看 [巧问妙答和笑话](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___002&symmetric,253ZfcKR1KW3RZh35vYMybD1W4GoFHnh898L4ZbRUFDd)
42-
- Of course, you can always [create a brand new notebook](https://privapps.github.io/notebook/index.html#/notes/0/&new)
28+
### Using Files as Storage
29+
You can read or write a notebook and then save or load from a local file.
30+
* The `E2E key` is strongly recommended as it provides better protection.
31+
* Once you load the content, you can modify the note or save it with a different `E2E key`.
4332

44-
## Demo sites
45-
Here are a few notebook sites public avaliable. They are mainly for demo purpose.
33+
### Using It from the Web
34+
* When creating it, you can start writing a notebook from scratch or load it from a pre-saved file.
35+
* There are two ways to share the notebook:
36+
1. If this app is configured with PrivateBin, you can directly save it from the app. Then the shareable URL will appear at the top right of your screen.
37+
2. You can also gather the note data and publish it to a publicly available PrivateBin. This app can load from the public URL and translate it into another URL that you can share. Here is a list of publicly available PrivateBins: https://github.com/PrivateBin/PrivateBin/wiki/PrivateBin-Instances-Directory
4638

47-
#### No backend
48-
https://privapps.github.io/notebook/
39+
## Sample Notes
40+
* Here is a [Peppa Pig's simple trivial questions](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___peppa&symmetric,Hj84nE4pQW4iBXhXhGf3wNeHqtYzGsupFFZHYgDDffjw) without a password. And you need the answers from the simple one to open [Peppa Pig's Advanced trivial questions](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___peppa2&symmetric,7rrxctQBPgKwfUuU5XrQLteScRpZvPX2jQ6pbRcsASGt).
41+
* 中文问答 [00后不懂的事情](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___00&symmetric,5PQae51qE2E7e8KwqQERYkWYTcUntdWqH4Qn4LMKRj6d). 你必须答出来之前的题目才能够看 [巧问妙答和笑话](https://privapps.github.io/notebook/index.html#/notes/0/type,remote&url,data___002&symmetric,253ZfcKR1KW3RZh35vYMybD1W4GoFHnh898L4ZbRUFDd).
42+
* Of course, you can always [create a brand new notebook](https://privapps.github.io/notebook/index.html#/notes/0/&new).
4943

50-
The above one has no backend, which relays the notes to remote third party privatebin sites.
44+
## Demo Sites
45+
Here are a few notebook sites publicly available. They are mainly for demo purposes.
5146

52-
#### Privatebin in the same host
53-
https://notebooks-privapps.mybluemix.net/
47+
#### No Backend
48+
https://privapps.github.io/notebook/
5449

55-
This one is similar as you host privately as a docker, within kubernetes or in cloud foundry. Note, this site is for demostration purpose, if the node died or recycled, data would be wiped out.
50+
There are two types of **No Backend**:
51+
1. Relays the notes to remote third-party PrivateBin sites. If the third-party storage dies or recycles, data will be wiped out.
52+
2. All your data is in your URL.
5653

5754
## Docker
58-
59-
You can also find docker images at https://hub.docker.com/u/privapps
55+
You can also find Docker images at https://hub.docker.com/u/privapps
6056

6157
See build details at https://github.com/privapps/notebook-docker-nginx-fpm-alpine-privatebin
6258

63-
## Feedbacks and suggestions
64-
We would love to hear your opinions. Please let us know from [Feedback From](https://public.biaomail.us.to/stdv.php?id=MTQ=)
59+
## Feedbacks and Suggestions
60+
We would love to hear your opinions. Please let us know via our [Feedback Form](https://public.biaomail.us.to/stdv.php?id=MTQ=).
6561

6662
## Configuration
67-
The configuration is at `assets/config.json`
68-
69-
## Server side / Editable
70-
You can use privatebin as backend. In addition, there is a custom build backend, that you can edit existing notebook, which make it like a wiki / blog. See details at
63+
The configuration is located at `assets/config.json`.
7164

65+
## Server Side / Editable
66+
You can use PrivateBin as a backend. Additionally, there is a custom-built backend that allows editing existing notebooks, making it like a wiki/blog. See details at:
7267
https://github.com/privapps/notebook-docker-nginx-fpm-alpine-privatebin/
73-
## Developer guide
7468

69+
## Developer Guide
7570
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.1.
7671

77-
1. in the root folder, do
78-
```npm ci```
79-
2. launch the privatebin docker, note here is using the port 9080
80-
``` docker run -d --restart="always" --read-only -p 9080:8080 -v c:/temp/php:/app privatebin/nginx-fpm-alpine ```
81-
3. check the following two files, one is for angular proxy and the other one is the configuration of the apps
82-
```
83-
\proxy.conf.json
84-
\src\assets\config.json
85-
```
86-
4. start developing the app as a regular angular one
87-
``` ng s --proxy-config proxy.conf.json ```
88-
5. release
89-
```ng build --aot --configuration production ```
72+
1. In the root folder, do:
73+
```npm ci```
74+
2. Launch the PrivateBin Docker container (note: using port 9080):
75+
```docker run -d --restart="always" --read-only -p 9080:8080 -v c:/temp/php:/app privatebin/nginx-fpm-alpine```
76+
3. Check the following two files, one for Angular proxy and the other for the app configuration:
77+
```
78+
\proxy.conf.json
79+
\src\assets\config.json
80+
```
81+
4. Start developing the app as a regular Angular one:
82+
```ng s --proxy-config proxy.conf.json```
83+
5. Release:
84+
```ng build --aot --configuration production```
9085

9186
### Note
92-
To accomplish copy the URL and share to other people, some charecter are replaced in the address bar after ```#```:
93-
- ```/``` is replaced by ```___```
94-
- ```=``` is replaced by ```,```
95-
- ```?``` is replaced by ```---```
87+
To accomplish copying the URL and sharing it with others, some characters are replaced in the address bar after `#`:
88+
* `/` is replaced by `___`
89+
* `=` is replaced by `,`
90+
* `?` is replaced by `---`
91+
92+
If you have an encrypted file on your machine and don't want to or can't launch a web server, you can do:
93+
```bash
94+
inlinedata=$(cat "<encrypted_file>" | base64 -i - | sed 's'/\//./g')
95+
# URL should be
96+
# <prefix>#/notes/0/type,inline&symmetric,<key>&base64,<inlinedata>
97+
```
9698
97-
## Wish list
98-
- [ ] Multi-languages menu and help doc
99-
- [x] Implement editiable backend, so existing notebook can be modified
100-
- [ ] Change ngx-md to ngx-markdown
99+
## Wish List
100+
- [x] Implement editable backend, so existing notebooks can be modified
101+
- [x] All your data in your URL
102+
- [x] Code highlight
103+
- [ ] Mermaid URL
101104
102-
## Please donate:
105+
## Please Donate:
103106
```
104107
bitcoin:bc1qmyewq7mh03a3sd5zgvvg3y5sqgm5un3e7eayhq?time=1614371109
105108
```
106-
Thanks for helping the maintainance and further development of the apps. Please stand up to protect privacy, promote the freedom of speach and fight against censorship.
109+
Thank you for helping with the maintenance and further development of the app. Please stand up to protect privacy, promote freedom of speech, and fight against censorship.

angular.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
"prefix": "app",
1616
"architect": {
1717
"build": {
18-
"builder": "@angular-devkit/build-angular:browser",
18+
"builder": "@angular-devkit/build-angular:application",
1919
"options": {
20-
"outputPath": "dist/notebook-privapps",
20+
"outputPath": {
21+
"base": "dist/notebook-privapps"
22+
},
2123
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
24+
"polyfills": [
25+
"src/polyfills.ts"
26+
],
2427
"tsConfig": "tsconfig.app.json",
2528
"assets": [
2629
"src/favicon.ico",
@@ -36,12 +39,11 @@
3639
"ext/base-x-3.0.7.js",
3740
"ext/privatebin-1.3.4.js"
3841
],
39-
"vendorChunk": true,
4042
"extractLicenses": false,
41-
"buildOptimizer": false,
4243
"sourceMap": true,
4344
"optimization": false,
44-
"namedChunks": true
45+
"namedChunks": true,
46+
"browser": "src/main.ts"
4547
},
4648
"configurations": {
4749
"production": {
@@ -54,8 +56,6 @@
5456
"sourceMap": false,
5557
"namedChunks": false,
5658
"extractLicenses": true,
57-
"vendorChunk": false,
58-
"buildOptimizer": true,
5959
"budgets": [{
6060
"type": "initial",
6161
"maximumWarning": "1mb",
@@ -74,18 +74,18 @@
7474
"serve": {
7575
"builder": "@angular-devkit/build-angular:dev-server",
7676
"options": {
77-
"browserTarget": "notebook-privapps:build"
77+
"buildTarget": "notebook-privapps:build"
7878
},
7979
"configurations": {
8080
"production": {
81-
"browserTarget": "notebook-privapps:build:production"
81+
"buildTarget": "notebook-privapps:build:production"
8282
}
8383
}
8484
},
8585
"extract-i18n": {
8686
"builder": "@angular-devkit/build-angular:extract-i18n",
8787
"options": {
88-
"browserTarget": "notebook-privapps:build"
88+
"buildTarget": "notebook-privapps:build"
8989
}
9090
},
9191
"test": {

0 commit comments

Comments
 (0)