Files
a-report-html/docs/superpowers/specs/2026-08-16-stock-report-portal-design.md
T
2026-08-16 17:23:53 +08:00

1.7 KiB

Stock Report Portal Design

Goal

Create a deployable static website for browsing HTML stock reports generated by OpenClaw or Hermes.

Product shape

  • Home page presents report categories such as Daily Review, Intraday Projects, Sector Watch, and Stock Tracking.
  • Category pages show reports grouped by year and month, with a calendar-style date grid and a report list for the selected date.
  • Each report opens its original HTML file in the same portal shell, preserving the source report content.
  • A recent-reports area and category counts make the home page useful even before a date is selected.

Data contract

Reports live under reports/<category>/<YYYY>/<MM>/. The website reads data/reports.json, whose records contain id, category, date, title, summary, tags, and path. A small rebuild script scans HTML files and regenerates the index, so uploads can be automated without hand-editing JSON.

Technology and deployment

Use a dependency-free static site: HTML, CSS, and vanilla JavaScript. It can be uploaded to Nginx, Apache, object storage, or any static hosting service. The first version has no database, login, or server runtime requirement.

Interaction and failure behavior

The site supports category filtering, month navigation, date selection, report search, and a direct report URL. Missing or malformed index data shows a clear empty state instead of a broken page. The rebuild script ignores non-HTML files and reports malformed filenames without stopping the whole rebuild.

Future extension

The stable JSON contract leaves room for an upload webhook, authentication, full-text search, and database migration later without changing the browser-facing information architecture.