feat: add sqlite catalog web app

This commit is contained in:
Keith Solomon
2026-05-17 14:05:25 -05:00
parent 140c16891f
commit fe0678fac2
22 changed files with 1452 additions and 12 deletions
+17
View File
@@ -11,6 +11,7 @@ nlc run
nlc run --from 2026-05-01 --to 2026-05-16
nlc run --last 30d
nlc run --enrich-only
nlc serve
```
## Setup
@@ -22,6 +23,8 @@ nlc run --enrich-only
- `~/.nlc/gmail-credentials.json`
- `~/.nlc/sheets-credentials.json`
5. Run `node dist/index.js run --dry-run` before live writes.
6. Run `node dist/index.js run` to import into SQLite.
7. Run `node dist/index.js serve` and open <http://127.0.0.1:3000>.
Tokens are persisted locally under `~/.nlc` and must not be committed.
@@ -81,9 +84,23 @@ Start from [config.example.yaml](config.example.yaml). The important choices are
- `gmail.folder`: the single Gmail label/folder to process.
- `output.excel.enabled`: writes a local `.xlsx` file.
- `output.sheets_api.enabled`: enables Google Sheets integration when credentials and spreadsheet ID are configured.
- `database.enabled`: writes SQLite catalog data during `nlc run`; defaults to `true`.
- `database.path`: SQLite database path; defaults to `./data/newsletter-catalog.sqlite`.
- `links.tracking_params`: query parameters stripped during URL normalization.
- `categories.llm`: optional BYOK categorization provider.
## SQLite and Web App
SQLite is the default catalog store. `nlc run` writes imported links, sponsors, dead links, and run history to the configured database even when spreadsheet outputs are disabled.
Start the local read-only web app with:
```bash
nlc serve --host 127.0.0.1 --port 3000
```
The first web UI is intentionally functional: dashboard, links, sponsored links, dead links, and runs.
## Build and Distribution
The build uses `tsup` for the JavaScript bundle and `@yao-pkg/pkg` for the standalone executable: