Skip to content

Commit 87e1cbf

Browse files
Add missing README information to centralized repo docs
Audited all 16 repo READMEs against their centralized docs pages and added missing content: - pdf-signature: frontend setup, backend configuration table, build/run commands - cryptify: backend configuration table with all config options, build/run commands including running the built binary - postguard: unaudited warning, prerequisites (Rust 1.90+, Docker, wasm-pack), WASM build instructions, Docker Compose dev environment, PKG server setup with key generation and CLI flags, environment variables, CLI usage examples (encrypt/decrypt), Docusaurus site reference, funding section - postguard-fallback: dependency version table (Rust 1.57, NGINX 1.21, PostgreSQL 12, Mailhog 1.0), IRMA/irmaseal documentation links - postguard-website: Docker stopping commands, docker-compose build Resolves feedback on #8. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ea1bb6d commit 87e1cbf

5 files changed

Lines changed: 188 additions & 11 deletions

File tree

docs/repos/cryptify.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,38 @@ When developing locally, change the `baseurl` constant in `FileProvider.ts` to `
4242

4343
#### Backend
4444

45-
Requires Rust:
45+
Requires Rust.
46+
47+
##### Configuration
48+
49+
The backend needs a configuration file. See `conf/` for examples (`config.toml` for production, `config.dev.toml` for development).
50+
51+
| Option | Description |
52+
|---|---|
53+
| `server_url` | Public URL of the service |
54+
| `address` | Bind address (e.g. `0.0.0.0`) |
55+
| `data_dir` | Directory for file storage |
56+
| `email_from` | Sender address for email notifications |
57+
| `smtp_url` | SMTP server hostname |
58+
| `smtp_port` | SMTP server port |
59+
| `smtp_tls` | Enable TLS for SMTP (default: `false`) |
60+
| `smtp_username` | SMTP username (optional) |
61+
| `smtp_password` | SMTP password (optional) |
62+
| `allowed_origins` | CORS allowed origins (regex) |
63+
| `pkg_url` | PostGuard PKG server URL |
64+
65+
##### Building and running
4666

4767
```bash
4868
# Development (with auto-reload)
49-
env ROCKET_ENV=development ROCKET_CONFIG=conf/Rocket.toml cargo watch -x run
69+
env ROCKET_ENV=development ROCKET_CONFIG=conf/config.dev.toml cargo watch -x run
5070

5171
# Production build
5272
env ROCKET_ENV=production cargo build --release
53-
```
5473

55-
The backend needs a `ROCKET_CONFIG` environment variable pointing to the configuration file. See the example in `conf/`.
74+
# Run the built binary
75+
env ROCKET_CONFIG=conf/config.toml ./target/release/cryptify-backend
76+
```
5677

5778
### Electron Packaging
5879

docs/repos/pdf-signature.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
[GitHub](https://github.com/encryption4all/pdf-signature) · Rust + TypeScript · PDF Signing
44

5-
PDF signing and signature verification utility. Used within the PostGuard ecosystem for signing PDF documents with identity-based signatures.
5+
PDF signing and signature verification utility. Used within the PostGuard ecosystem for signing PDF documents with identity-based signatures. This is a fork of [Cryptify](/repos/cryptify) with the same architecture.
66

77
## Architecture
88

99
The repository is structured similarly to [Cryptify](/repos/cryptify), with a Rust backend and TypeScript frontend:
1010

11-
- **Backend** (`cryptify-back-end/`): Rust service handling PDF operations
11+
- **Backend** (`cryptify-back-end/`): Rust (Rocket) service handling PDF operations, file storage, and email notifications
1212
- **Frontend** (`cryptify-front-end/`): TypeScript web interface
1313

1414
## Development
@@ -23,9 +23,59 @@ docker-compose -f docker-compose.dev.yml up
2323
docker-compose up
2424
```
2525

26-
### Manual Setup
26+
### Frontend (manual)
2727

28-
See the Cryptify development instructions for the general pattern. The backend requires Rust and the frontend requires Node.js.
28+
Requires Node.js and Rust.
29+
30+
```bash
31+
cd cryptify-front-end
32+
npm install
33+
npm run start # development server
34+
npm run build # production build
35+
```
36+
37+
When developing locally, change the `baseurl` constant in `FileProvider.ts` to `http://localhost:3000` so the frontend uses the local backend.
38+
39+
Cryptify/pdf-signature can also be packaged as a desktop app:
40+
41+
```bash
42+
cd cryptify-front-end
43+
npm run dist-electron
44+
```
45+
46+
### Backend (manual)
47+
48+
The backend needs a configuration file. See `conf/` for examples.
49+
50+
#### Configuration
51+
52+
The configuration file (`conf/config.toml` or `conf/config.dev.toml`) controls:
53+
54+
| Option | Description |
55+
|---|---|
56+
| `server_url` | Public URL of the service |
57+
| `address` | Bind address (e.g. `0.0.0.0`) |
58+
| `data_dir` | Directory for file storage |
59+
| `email_from` | Sender address for email notifications |
60+
| `smtp_url` | SMTP server hostname |
61+
| `smtp_port` | SMTP server port |
62+
| `smtp_credentials` | SMTP username and password (optional) |
63+
| `allowed_origins` | CORS allowed origins (regex) |
64+
| `pkg_url` | PostGuard PKG server URL |
65+
66+
#### Building and running
67+
68+
```bash
69+
# Build
70+
env ROCKET_ENV=development cargo build
71+
env ROCKET_ENV=production cargo build --release
72+
73+
# Run (pass the config file path)
74+
env ROCKET_CONFIG=conf/config.dev.toml ./target/debug/cryptify-backend
75+
76+
# Development with auto-reload
77+
env ROCKET_ENV=development ROCKET_CONFIG=conf/config.dev.toml cargo watch -x run
78+
```
2979

3080
## Releasing
3181

docs/repos/postguard-fallback.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Both the backend and frontend are written in Rust:
1313

1414
Supporting services: NGINX (reverse proxy), PostgreSQL (database), Mailhog (email testing).
1515

16+
For background on the IRMA/Yivi protocol, see the [IRMA documentation](https://irma.app/docs/what-is-irma/). The PostGuard encryption protocol is described in the [irmaseal design document](https://github.com/Wassasin/irmaseal/blob/master/docs/design.md).
17+
1618
## Development
1719

1820
### Docker (recommended)
@@ -30,6 +32,17 @@ docker-compose up
3032

3133
The application is available at `http://tguard.localhost`.
3234

35+
### Dependencies
36+
37+
The Docker setup includes all required software. For manual development, the following versions are used:
38+
39+
| Dependency | Version |
40+
|---|---|
41+
| Rust | 1.57+ |
42+
| NGINX | 1.21 |
43+
| PostgreSQL | 12 |
44+
| Mailhog | 1.0 |
45+
3346
### Manual Setup
3447

3548
Requires:

docs/repos/postguard-website.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ docker-compose -f docker-compose.prod.yml up
3030
# Access at http://localhost
3131
```
3232

33+
### Stopping Services
34+
35+
```bash
36+
docker-compose down # development
37+
docker-compose -f docker-compose.prod.yml down # production
38+
```
39+
40+
### Building with Docker
41+
42+
```bash
43+
docker-compose build
44+
```
45+
3346
### Manual (without Docker)
3447

3548
```bash

docs/repos/postguard.md

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
[GitHub](https://github.com/encryption4all/postguard) · Rust · Core library and services
44

5+
::: warning
6+
This implementation has not been audited. Use at your own risk.
7+
:::
8+
59
The main PostGuard repository. It contains the core encryption library, the Private Key Generator (PKG) server, WebAssembly bindings for browsers, a command-line client, and FFI bindings for native language integration.
610

711
## Workspace Structure
@@ -10,7 +14,7 @@ The repository is a Rust workspace with five crates:
1014

1115
| Crate | Description |
1216
|---|---|
13-
| `pg-core` | Core library: metadata management, binary serialization, streaming encryption (with a WebCrypto-backed WASM backend under the `web` and `stream` features) |
17+
| `pg-core` | Core library: metadata management, binary serialization, streaming encryption. Supports a native Rust backend (`rust` feature) and a WebCrypto-backed WASM backend (`web` + `stream` features). |
1418
| `pg-pkg` | HTTP API server (Actix-web) that runs a Private Key Generator instance |
1519
| `pg-wasm` | WebAssembly bindings via `wasm-pack`, used by the JavaScript SDK |
1620
| `pg-cli` | Command-line tool for encrypting and decrypting files |
@@ -36,12 +40,27 @@ A typical session:
3640

3741
### Prerequisites
3842

39-
- [Rust](https://www.rust-lang.org/tools/install) (stable)
43+
- [Rust](https://www.rust-lang.org/tools/install) 1.90+ (stable)
44+
- [Docker & Docker Compose](https://docs.docker.com/) for the development environment (PostgreSQL + Yivi server)
45+
- [wasm-pack](https://rustwasm.github.io/wasm-pack/) (only for building the WASM bindings)
4046

4147
### Building
4248

4349
```bash
50+
# Full workspace
4451
cargo build --release
52+
53+
# Individual crates
54+
cargo build --release -p pg-core
55+
cargo build --release --bin pg-cli
56+
cargo build --release --bin pg-pkg
57+
```
58+
59+
### WASM Bindings
60+
61+
```bash
62+
cd pg-wasm
63+
wasm-pack build --release -d pkg/ --out-name index --scope e4a --target bundler
4564
```
4665

4766
### Testing
@@ -58,12 +77,65 @@ wasm-pack test --release --headless --chrome ./pg-wasm
5877
wasm-pack test --release --headless --firefox ./pg-wasm
5978
```
6079

80+
### Development Environment
81+
82+
Docker Compose starts PostgreSQL and a Yivi (IRMA) server:
83+
84+
```bash
85+
docker-compose up
86+
```
87+
6188
### Running the PKG Server
6289

6390
```bash
64-
cargo run -p pg-pkg --release
91+
# Generate master key pair (run once)
92+
cargo run --release --bin pg-pkg gen
93+
94+
# Start the server
95+
cargo run --release --bin pg-pkg server \
96+
-t <irma_server_token> \
97+
-i <irma_server_url> \
98+
-d <postgres_connection_string>
99+
```
100+
101+
When using Docker Compose for local development:
102+
103+
```bash
104+
cargo run --release --bin pg-pkg server \
105+
-d postgres://devuser:devpassword@localhost/devdb \
106+
-t <irma_token> \
107+
-i http://localhost:8088
65108
```
66109

110+
#### PKG Environment Variables
111+
112+
| Variable | Description |
113+
|---|---|
114+
| `IRMA_SERVER` | Yivi/IRMA server URL (default: `https://is.yivi.app`) |
115+
| `DATABASE_URL` | PostgreSQL connection string |
116+
| `RUST_LOG` | Log level (`debug`, `info`, `warn`, `error`) |
117+
118+
### Using the CLI
119+
120+
#### Encrypt a file
121+
122+
```bash
123+
cargo run --bin pg-cli enc \
124+
-i '{"recipient@example.com": [{"t": "pbdf.sidn-pbdf.email.email", "v": "recipient@example.com"}]}' \
125+
--pub-sign-id '[{"t": "pbdf.gemeente.personalData.fullname"}]' \
126+
myfile.txt
127+
```
128+
129+
This starts a Yivi session (displays a QR code) to obtain signing keys, then encrypts `myfile.txt` into `myfile.txt.enc`.
130+
131+
#### Decrypt a file
132+
133+
```bash
134+
cargo run --bin pg-cli dec myfile.txt.enc
135+
```
136+
137+
The CLI shows the recipient policies in the header, prompts you to select your identity, and starts a Yivi session to obtain your decryption key.
138+
67139
## Releasing
68140

69141
This repository uses [Release-plz](https://release-plz.ieni.dev/) for automated versioning and releases. When changes are merged to `main`, Release-plz creates a release PR. Merging that PR triggers:
@@ -81,3 +153,11 @@ This repository uses [Release-plz](https://release-plz.ieni.dev/) for automated
81153
| `build.yml` | Push/PR | Formatting checks, tests for all workspace members |
82154
| `delivery.yml` | Push to main | Release-plz, Docker build, FFI compilation, npm publish |
83155
| `docs.yml` | Push to main | Deploys API docs to GitHub Pages |
156+
157+
## Docusaurus Site
158+
159+
The repository contains a [Docusaurus](https://docusaurus.io/) documentation site in the `website/` directory, deployed to [encryption4all.github.io/postguard](https://encryption4all.github.io/postguard/). It covers the architecture, encryption/decryption flow, Yivi integration, PKG server API, and WASM bindings in detail. The content from that site has been consolidated into this centralized documentation.
160+
161+
## Funding
162+
163+
Development of PostGuard was initially funded by the [Next Generation Internet initiative (NGI0)](https://nlnet.nl/NGI0/) and [NLnet](https://nlnet.nl/). The project is currently funded by a 4-year project from [NWO](https://www.nwo.nl/) under the name "Encryption 4 All".

0 commit comments

Comments
 (0)