feat: add sqlite catalog web app
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user