Files
ai-taxonomy-literature-anal…/README.md
T
2026-10-30 20:07:53 +08:00

104 lines
7.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ATLAS
**AI Taxonomy, Literature Analysis & Survey** — a research atlas for discovering AI papers, exploring their taxonomy and reading structured analyses. The website brand is **AI-tlas**; the repository name is `ai-taxonomy-literature-analysis-survey`.
## Explore
- `/`: landing page with paper search, live collection counts and topic entry points.
- `/overview`: venue coverage, conference dates and topic counts (the former homepage).
- `/papers` and `/papers/[id]`: search/filter papers and read their analyses.
- `/landscape`: topic taxonomy, work types and research landscape.
- `/contents`: surveys and analysis groups, including tools of agents and Lean theorem proving.
- `/work-types/[slug]`, `/benchmarks/[id]`, `/conferences/[slug]`: detailed research views.
The current collection focuses on available 2026 NLP/ML venue lists. Sources include ICLR/ICML through papercopilot/paperlists and ACL-family venues through ACL Anthology. Availability depends on upstream sources; this is not a complete index of all AI research.
## Stack and storage
Next.js Pages Router, React, TypeScript and PostgreSQL (`pg`). Runtime requires `DATABASE_URL`; `lib/db.ts` uses `search_path=live`.
- **`live`**: 14 imported tables for conferences, papers, taxonomies, work types, labels, benchmarks, results and reviews. Loading builds a temporary `next` schema, verifies row counts and atomically replaces `live`. Treat these tables as replaceable imported data.
- **`analysis`**: persistent editorial content. `page_block` stores ordered typed JSONB blocks keyed by `paper/<conf>/<ext_id>` or `content/<node>`. Tool categories, paper tools and category mappings also live here. Legacy article/section/block/link tables remain for migration; current pages render page blocks. Rebuilding `live` does not replace `analysis`.
- **Repository data**: `data/labels/o*.jsonl` contains 2,678 paper labels; `data/labels/type_notes.json` contains per-type syntheses. These are still tracked import sources, not database-only content. `scripts/worktypes.json`, `scripts/taxonomy.py`, `lib/content-tree.ts` and `lib/content-defaults.ts` define vocabulary, classification rules, content navigation and initial blocks.
- **Files and media**: raw downloads, staging SQLite databases and exports are ignored by Git. Deployment caches raw sources and JSONL exports under `/opt/llm-survey/cache/`. Figure blocks store a source URL, alt text and caption, not image bytes. Charts and Mermaid are rendered by components. No image storage/upload service is implemented.
Schema definitions: `scripts/load-pg.js` (`live`) and `lib/analysis-schema.ts` (`analysis`). Use production database catalogs to verify actual deployed structure.
## Data quality
Topic assignment uses keyword scoring: title ×3, keywords ×2, abstract ×1. Agent-paper labels use titles and abstracts; other papers use rule-based labels. Scores are those stated in abstracts. Labels, summaries and inferred classifications should be checked against the original papers.
## CI/CD and daily refresh
Gitea Actions configuration: `.gitea/workflows/deploy.yml`; deployment: `scripts/deploy.sh`.
- Pushes to `main` trigger deployment, except documentation-only changes (`**/*.md`, `docs/**`).
- A job-level branch guard restricts deployment to `refs/heads/main`, including manual dispatches. Feature branches and PRs do not deploy.
- A scheduled run at **03:17 Asia/Shanghai daily** (`19:17 UTC`) requests fresh upstream data, rebuilds the data export, loads PostgreSQL when changed, builds the site and restarts/checks the service. The schedule runs from the default branch; keep that branch set to `main`.
- Manual dispatch supports `refresh_data`: false reuses cached data where possible; true downloads and rebuilds data.
- Feature-branch pushes run type checking and a production build on `ces-control` via `.gitea/workflows/validate.yml`; validation never deploys or imports data.
- The deployment runner is **`ces-control`**. Building and deployment occur there, not on a developer's local machine. Scheduler/runner availability determines whether a scheduled run actually succeeds; inspect Gitea Actions logs for results.
- Production service remains `llm-survey`, under `/opt/llm-survey`, with database `llm_survey`, environment `/etc/llm-survey/db.env`, and default port `18231`. These infrastructure identifiers are intentionally stable across the branding change.
The deployment cache reuses unchanged exports, dependencies and Next.js compilation cache. A changed export replaces `live`; persistent page blocks and tool annotations in `analysis` are retained. Back up both schemas before changing data ownership or migrations.
## Remote development and validation
Install dependencies and run `npm run typecheck` / `npm run build` only in the approved remote execution environment. For an isolated remote preview, set `DATABASE_URL` and run `npm run dev`; do not point a feature-branch deployment at the production service.
Data pipeline commands (remote runner only):
```sh
npm run data:fetch
npm run data:build
npm run data:load
```
`data:build` stages SQLite under `build/` and exports JSONL; `data:load` imports into PostgreSQL and replaces `live`. These commands change data and are not read-only validation.
## Public journal and editorial access
The public site now presents only the two initial studies at
`/contents/lean-theorem-proving` and `/contents/tools-of-agents`. `/` retains live
collection counts, and `/contents` lists those studies. Other paper, benchmark,
conference and landscape routes require an editor session. Their database rows
are preserved; this change does not delete or reimport content.
- `/editor/login`: a six-digit authenticator TOTP code (no password).
- `/editor`: editorial desk and private archive entry.
- `/editor/contents/<study>`: edit text blocks directly (JSON mode for structured content), preview a draft,
then explicitly publish. Preview resolves dynamic blocks without saving.
Publishing replaces the study's blocks immediately; this first editor has no
durable drafts or per-editor accounts. Coordinate edits to avoid overwrites.
- All content and taxonomy APIs, including GET/list endpoints, require the signed
editor cookie. Mutations require the configured Origin. API clients must sign
in through the same authenticator flow; there is no anonymous write fallback.
Configure these secrets in `/etc/llm-survey/db.env` through your server secret
management process, never in Git or CI logs:
- `EDITOR_ORIGIN`: the exact browser origin, including port (no trailing slash).
Use HTTPS for internet-facing editorial access; HTTPS enables Secure cookies.
- `EDITOR_TOTP_SECRET`: a random base32 authenticator secret (at least 32 base32
characters), enrolled privately in the editor's authenticator. TOTP uses SHA-1,
30-second periods and six digits; server time must be synchronized.
- `EDITOR_SESSION_SECRET`: at least 32 random characters for HMAC-SHA256 sessions.
Rotating this value revokes all sessions.
Sessions expire after eight hours, are HttpOnly and SameSite=Strict, and can be
ended from the desk. Login attempts are globally limited to ten per five minutes
in persistent `analysis.editor_auth`; accepted TOTP time steps cannot be reused.
Missing configuration leaves editing closed while public studies remain readable.
This is a single shared editorial identity; secret rotation is the recovery
procedure. The existing HTTP public URL can continue serving readers; configure
TLS and the editor secrets before using editorial login over the internet.
The authenticator QR is provisioned once and delivered privately in chat, never
committed. TOTP-only login is a single possession factor, as requested.
The deployment job can provision `EDITOR_TOTP_SECRET` and `EDITOR_SESSION_SECRET`
from repository Actions secrets after explicit operator authorization. It writes
them atomically to the existing environment file with mode 0600. Missing secrets
preserve the server configuration. Update `EDITOR_ORIGIN` in the deployment job
when moving editorial access to a TLS domain.