Skip to content

Commit df9e988

Browse files
committed
chore(treefmt): add treefmt-nix and format codebase
1 parent a3c3d9b commit df9e988

File tree

5 files changed

+246
-80
lines changed

5 files changed

+246
-80
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test with Nix
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
test:

README.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Demo Boost: [01KB19TNRVE1RVQCXVFWY68PYG](https://boostbox.noblepayne.com/boost/0
1212

1313
![Demo GIF (Jeff)](images/demo.gif)
1414

15-
______________________________________________________________________
15+
---
1616

1717
## What is BoostBox?
1818

@@ -38,7 +38,7 @@ curl -X POST https://boostbox.noblepayne.com/boost \
3838
-H "X-Api-Key: v4v4me" \
3939
-d '{
4040
"action": "boost",
41-
"split": 1,
41+
"split": 1,
4242
"value_msat": 639000,
4343
"value_msat_total": 639000,
4444
"timestamp": "2025-11-02T16:30:00Z",
@@ -165,32 +165,32 @@ Configuration is handled via environment variables.
165165

166166
### Core Configuration
167167

168-
| Variable | Required | Default | Description |
169-
| -------------------- | :------: | --------------------- | ------------------------------------------------------------------------------------------------------- |
170-
| `ENV` | No | `DEV` | The runtime environment: `DEV`, `STAGING`, or `PROD`. |
171-
| `BB_PORT` | No | `8080` | The port the webserver will listen on. |
172-
| `BB_BASE_URL` | No | `http://localhost:8080` | The public base URL of the service (e.g., `https://my-boostbox.com`). Used to construct response URLs. |
173-
| `BB_ALLOWED_KEYS` | No | `v4v4me` | Comma-separated list of API keys clients must provide in the `X-Api-Key` header to use the `POST /boost` endpoint. |
174-
| `BB_MAX_BODY` | No | `102400` | Maximum allowed size for request bodies in bytes (approximately 100KB by default). |
175-
| `BB_STORAGE` | No | `FS` | The backend for storing metadata: `FS` (filesystem) or `S3`. |
168+
| Variable | Required | Default | Description |
169+
| ----------------- | :------: | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
170+
| `ENV` | No | `DEV` | The runtime environment: `DEV`, `STAGING`, or `PROD`. |
171+
| `BB_PORT` | No | `8080` | The port the webserver will listen on. |
172+
| `BB_BASE_URL` | No | `http://localhost:8080` | The public base URL of the service (e.g., `https://my-boostbox.com`). Used to construct response URLs. |
173+
| `BB_ALLOWED_KEYS` | No | `v4v4me` | Comma-separated list of API keys clients must provide in the `X-Api-Key` header to use the `POST /boost` endpoint. |
174+
| `BB_MAX_BODY` | No | `102400` | Maximum allowed size for request bodies in bytes (approximately 100KB by default). |
175+
| `BB_STORAGE` | No | `FS` | The backend for storing metadata: `FS` (filesystem) or `S3`. |
176176

177177
### Filesystem Storage Configuration
178178

179-
| Variable | Required | Default | Description |
180-
| -------------------- | :------: | --------------------- | ------------------------------------------------------------------------------------------------------- |
181-
| `BB_FS_ROOT_PATH` | No | `boosts` | If `BB_STORAGE=FS`, the root directory where metadata files will be stored. |
179+
| Variable | Required | Default | Description |
180+
| ----------------- | :------: | -------- | --------------------------------------------------------------------------- |
181+
| `BB_FS_ROOT_PATH` | No | `boosts` | If `BB_STORAGE=FS`, the root directory where metadata files will be stored. |
182182

183183
### S3 Storage Configuration
184184

185185
To use S3 storage (AWS S3, MinIO, or compatible), set `BB_STORAGE=S3` and configure the following:
186186

187-
| Variable | Required | Default | Description |
188-
| -------------------- | :------: | --------------------- | ------------------------------------------------------------------------------------------------------- |
189-
| `BB_S3_ENDPOINT` | Yes | N/A | The S3 endpoint URL (e.g., `https://s3.amazonaws.com` or `http://localhost:9000` for MinIO). Must include protocol. |
190-
| `BB_S3_REGION` | Yes | N/A | AWS region (e.g., `us-east-1`). |
191-
| `BB_S3_ACCESS_KEY` | Yes | N/A | S3 access key ID. |
192-
| `BB_S3_SECRET_KEY` | Yes | N/A | S3 secret access key. |
193-
| `BB_S3_BUCKET` | Yes | N/A | S3 bucket name. |
187+
| Variable | Required | Default | Description |
188+
| ------------------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------- |
189+
| `BB_S3_ENDPOINT` | Yes | N/A | The S3 endpoint URL (e.g., `https://s3.amazonaws.com` or `http://localhost:9000` for MinIO). Must include protocol. |
190+
| `BB_S3_REGION` | Yes | N/A | AWS region (e.g., `us-east-1`). |
191+
| `BB_S3_ACCESS_KEY` | Yes | N/A | S3 access key ID. |
192+
| `BB_S3_SECRET_KEY` | Yes | N/A | S3 secret access key. |
193+
| `BB_S3_BUCKET` | Yes | N/A | S3 bucket name. |
194194

195195
### S3 Setup Examples
196196

@@ -228,7 +228,6 @@ Stores boostagram metadata.
228228
- **Authentication:** Requires an API key in the `X-Api-Key` header (default: `v4v4me`).
229229

230230
- **Request Body:** A JSON object with the following **required** fields:
231-
232231
- `action` (enum: `boost` or `stream`)
233232
- `split` (number, min 0.0)
234233
- `value_msat` (integer, min 1)
@@ -248,7 +247,6 @@ Stores boostagram metadata.
248247
```
249248

250249
- **Error Responses:**
251-
252250
- `400 Bad Request` - Invalid or missing required fields
253251
- `401 Unauthorized` - Missing or invalid `X-Api-Key` header
254252
- `413 Payload Too Large` - Request body exceeds `BB_MAX_BODY` limit
@@ -272,6 +270,6 @@ A simple healthcheck endpoint for monitoring.
272270

273271
A complete OpenAPI/Swagger specification can be viewed at the `/docs` endpoint of a running instance. The raw OpenAPI JSON is available at `/openapi.json`.
274272

275-
______________________________________________________________________
273+
---
276274

277275
Built with Nix and Clojure. Licensed under the MIT License.

flake.lock

Lines changed: 157 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)