|
1 | | -# PostGuard Website |
| 1 | +# <p align="center"><img src="./img/pg_logo.svg" height="128px" alt="PostGuard" /></p> |
2 | 2 |
|
3 | | -The PostGuard web frontend for encrypting and sending files using [Yivi](https://yivi.app)-based identity attributes. Built with SvelteKit. |
| 3 | +> For full documentation, visit [docs.postguard.eu](https://docs.postguard.eu/repos/postguard-website). |
4 | 4 |
|
5 | | -## Quick Start with Docker Compose (Recommended) |
| 5 | +SvelteKit web frontend for encrypting and sending files using [Yivi](https://yivi.app) identity attributes. This is the main PostGuard web application where users can encrypt files and send them to recipients. |
6 | 6 |
|
7 | | -The easiest way to get started is using Docker Compose, which sets up everything you need: |
| 7 | +## Development |
8 | 8 |
|
9 | | -### Development Environment (with hot reload) |
| 9 | +Docker Compose is the recommended way to get started: |
10 | 10 |
|
11 | 11 | ```bash |
12 | | -# Start all services (cryptify, mailcrab, and postguard) |
13 | 12 | git submodule update --init --recursive |
14 | 13 | docker-compose up |
15 | | - |
16 | | -# Connect phone with USB debugging enabled, Yivi app in developer mode, then: |
17 | | -adb reverse tcp:8088 tcp:8088 |
18 | | - |
19 | | -# Postguard website at http://localhost:8080 |
20 | | -# Mailcrab UI at http://localhost:1080 |
21 | | - |
22 | | - |
23 | | -# Also launches IRMA server, Cryptify fileshare server and PKG server |
24 | 14 | ``` |
25 | 15 |
|
26 | | -Your code changes will automatically reload! The source code is mounted as a volume. |
| 16 | +The website is available at http://localhost:8080. |
27 | 17 |
|
28 | | -### Production Environment |
| 18 | +To run without Docker: |
29 | 19 |
|
30 | 20 | ```bash |
31 | | -# Build and start all services from prebuild images |
32 | | -docker-compose -f docker-compose.prod.yml up |
33 | | - |
34 | | -# Access the app at http://localhost |
| 21 | +npm install |
| 22 | +npm run dev |
35 | 23 | ``` |
36 | 24 |
|
37 | | -### Stopping Services |
38 | | - |
39 | | -```bash |
40 | | -# Development |
41 | | -docker-compose down |
| 25 | +### Environment variables |
42 | 26 |
|
43 | | -# Production |
44 | | -docker-compose -f docker-compose.prod.yml down |
45 | | -``` |
| 27 | +| Variable | Description | Default | |
| 28 | +| --- | --- | --- | |
| 29 | +| `VITE_FILEHOST_URL` | Filehosting service URL (Cryptify) | `http://localhost:8000` | |
| 30 | +| `VITE_PKG_URL` | PKG service URL | `http://localhost:8087` | |
| 31 | +| `VITE_MAX_UPLOAD_SIZE` | Maximum file upload size in bytes | - | |
| 32 | +| `VITE_UPLOAD_CHUNK_SIZE` | Upload chunk size in bytes | - | |
| 33 | +| `VITE_FILEREAD_CHUNK_SIZE` | File read chunk size in bytes | - | |
46 | 34 |
|
47 | | -## Mobile Debugging |
| 35 | +## Releasing |
48 | 36 |
|
49 | | -To test on a physical Android device over USB (make sure Yivi is in [developer mode](https://docs.yivi.app/yivi-app/#developer-mode) ) |
50 | | - |
51 | | -```bash |
52 | | -adb reverse tcp:8088 tcp:8088 # to scan QR codes / irma server |
53 | | -adb reverse tcp:8080 tcp:8080 # to visit the mobile postguard site |
54 | | -``` |
55 | | - |
56 | | -## Building |
57 | | -Building is done automatically through Github Actions. Building manually can be done through docker-compose. Building only the Postguard website can be done with npm/yarn. |
58 | | - |
59 | | -```bash |
60 | | -docker-compose build |
61 | | -npm run build |
62 | | -``` |
| 37 | +Releases are automated with [release-please](https://github.com/googleapis/release-please). Merging to `main` triggers a release PR, and merging that PR publishes Docker images to GHCR. |
63 | 38 |
|
64 | | -## Environment Variables |
65 | | -- `VITE_FILEHOST_URL` - Filehosting service URL, uses Cryptify (default: `http://localhost:8000`) |
66 | | -- `VITE_PKG_URL` - PKG service URL (default: `http://localhost:8087`) |
67 | | -- `VITE_MAX_UPLOAD_SIZE` - Maximum file upload size in bytes |
68 | | -- `VITE_UPLOAD_CHUNK_SIZE` - Upload chunk size in bytes |
69 | | -- `VITE_FILEREAD_CHUNK_SIZE` - File read chunk size in bytes |
| 39 | +## License |
70 | 40 |
|
| 41 | +MIT |
0 commit comments