From 3f4cde7ab5c8b79681046a085c4bb471ab91c608 Mon Sep 17 00:00:00 2001 From: Sean Date: Sat, 24 Jan 2026 00:09:11 -0800 Subject: [PATCH 1/2] feat(api): rename /config to /setup for config download Closes #47 Co-Authored-By: Claude Opus 4.5 --- api/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/app.ts b/api/src/app.ts index 637c6bc..b57bdf1 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -23,7 +23,7 @@ app.get('/health', (c) => { // Mount route apps app.route('/api-keys', apiKeysApp); app.route('/calibration', calibrationApp); -app.route('/config', configApp); +app.route('/setup', configApp); app.route('/crashes', crashesApp); app.route('/patterns', patternsApp); From 750b8ed4cd16c13d8e3d00ce65444739dfc60a53 Mon Sep 17 00:00:00 2001 From: Sean Date: Sat, 24 Jan 2026 00:11:24 -0800 Subject: [PATCH 2/2] docs: add self-hosting setup documentation Co-Authored-By: Claude Opus 4.5 --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c43f35..0f12d38 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,47 @@ pnpm install pnpm dev ``` -See [API Documentation](https://ctd.ezmode.games/docs) for endpoints. +### API Endpoints + +| Endpoint | Description | +|----------|-------------| +| `POST /crashes` | Submit a crash report | +| `GET /crashes/{id}` | Get crash report details | +| `POST /api-keys` | Create an API key | +| `GET /api-keys` | List your API keys | +| `GET /setup?key=` | Download ctd.toml config | +| `GET /patterns` | List crash patterns | +| `GET /patterns/{id}` | Pattern details with mod correlations | +| `GET /calibration/metrics` | Prediction calibration metrics | +| `GET /docs` | Interactive API documentation | + +### User Setup + +Users need a `ctd.toml` config file with your server URL and their API key. + +**Option 1: Download via API** +```bash +curl "https://your-server.com/setup?key=ctd_yourkey" -o ctd.toml +``` + +**Option 2: Manual creation** +```toml +# ctd.toml +[api] +url = "https://your-server.com" +api_key = "ctd_yourkey" +``` + +**Installation paths:** +| Game | Path | +|------|------| +| Skyrim SE | `Data/SKSE/Plugins/ctd.toml` | +| Fallout 4 | `Data/F4SE/Plugins/ctd.toml` | +| Fallout 3 | `Data/FOSE/Plugins/ctd.toml` | +| Fallout: New Vegas | `Data/NVSE/Plugins/ctd.toml` | +| Cyberpunk 2077 | `red4ext/plugins/ctd/ctd.toml` | + +See [API Documentation](https://ctd.ezmode.games/docs) for full endpoint details. ## License