README: trim to brief front page + retake themed screenshots (#106)
- Cut Admin walkthrough and API curl block to one-liners pointing at docs - Keep Configuration table, features, Get Started, doc links - Retake all screenshots against current UI, one theme each: /new midnight, /history pastel-lavender, paste view pastel-peach, /mine pastel-cloud; remove superseded stale previews
@@ -40,8 +40,8 @@ The SQLite database lives in the `/data` volume inside the container.
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
|  |  |
|
|  |  |
|
||||||
|  | |
|
|  |  |
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@@ -53,31 +53,19 @@ The SQLite database lives in the `/data` volume inside the container.
|
|||||||
| `PALETTE_MAX_ITEM` | `26214400` | Max can item size in bytes (25 MB) |
|
| `PALETTE_MAX_ITEM` | `26214400` | Max can item size in bytes (25 MB) |
|
||||||
| `PALETTE_ADMIN_KEY` | generated | Admin key; if unset a 32-char hex key is generated and persisted to `<db-dir>/admin-key` (0600) |
|
| `PALETTE_ADMIN_KEY` | generated | Admin key; if unset a 32-char hex key is generated and persisted to `<db-dir>/admin-key` (0600) |
|
||||||
|
|
||||||
### Admin
|
An `/admin` page exists for runtime settings, protected by a key set at
|
||||||
|
install (`PALETTE_ADMIN_KEY` env var) and resettable locally — see
|
||||||
`GET /admin` serves the admin page. Enter the admin key there — it is stored in
|
[docs/API.md](docs/API.md) and [docs/design/](docs/design/) for details.
|
||||||
`sessionStorage` (never a cookie) and sent as the `X-Admin-Key` header on
|
|
||||||
`GET`/`POST /admin/api/settings`.
|
|
||||||
|
|
||||||
The admin API reads/sets: rate-limit burst, rate-limit refill per minute, max
|
|
||||||
content bytes, default expiry, custom URL reservation days, and the burn
|
|
||||||
viewer window (minutes). All admin access attempts are logged.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./palette --reset-admin-key # regenerate the admin key and print it
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
Create a paste with one call:
|
Full REST API: [docs/API.md](docs/API.md). One example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8080/api/pastes \
|
curl -X POST http://localhost:8080/api/pastes -d '{"content":"hello"}'
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"content": "print(hello)", "language": "python", "expires_in": "168h"}'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Full API docs: [docs/API.md](docs/API.md). Design docs: [docs/design/](docs/design/) (currently: [client-side E2E encryption](docs/design/e2e-encryption.md), issue #39).
|
Design docs: [docs/design/](docs/design/).
|
||||||
|
|
||||||
## Performance Notes
|
## Performance Notes
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 40 KiB |