feat: add configurable data directory and file-based logging

Introduce the `WARPBOX_DATA_DIR` environment variable to define where runtime data is stored. This directory will house uploaded files, the bbolt metadata database, and application logs.

Changes include:
- Added `WARPBOX_DATA_DIR` to configuration, defaulting to `./data`.
- Implemented a custom logging package that writes JSONL logs to the data directory.
- Updated `.gitignore` and `.env.example` to support the new data directory.
- Documented the runtime data structure in `README.md`.
- Updated the frontend upload script to handle form submission and display results.
This commit is contained in:
2026-05-25 16:26:47 +03:00
parent 9b8ef16474
commit e12878887c
21 changed files with 1240 additions and 153 deletions

View File

@@ -40,6 +40,8 @@ func Logger(logger *slog.Logger) Middleware {
}
logger.Info("http request",
"source", "http",
"code", status,
"method", r.Method,
"path", r.URL.Path,
"status", status,