Production-oriented Go web application for ingesting CPU benchmark results, storing them in BadgerDB, searching them from an in-memory index, and rendering a server-side HTML dashboard.
## Features
-`POST /api/submit` accepts either `application/json` or `multipart/form-data`.
-`GET /api/search` performs case-insensitive token matching against submitter/general fields and CPU brand strings.
-`GET /` renders the latest submissions with search and pagination.
- BadgerDB stores each submission under a reverse-timestamp key so native iteration returns newest records first.
- A startup-loaded in-memory search index prevents full DB deserialization for every query.
- Graceful shutdown closes the HTTP server and BadgerDB cleanly to avoid lock issues.
## Data Model
Each stored submission contains:
-`submissionID`: server-generated UUID
-`submitter`: defaults to `Anonymous` if omitted
-`submittedAt`: server-side storage timestamp
- Benchmark payload fields:
-`config`
-`cpuInfo`
-`startedAt`
-`duration`
-`totalOps`
-`mOpsPerSec`
-`score`
-`coreResults`
The parser also accepts optional CPU metadata found in your local sample JSON files such as `isHybrid`, `has3DVCache`, `supportedFeatures`, and `cores`.
- The UI uses Go templates plus Tailwind CSS via CDN.
- Search is token-based and case-insensitive rather than edit-distance based.
- Unknown JSON fields are ignored, so benchmark clients can evolve without immediately breaking ingestion.
- If you stop the service abruptly and leave a lock behind, restart after the process exits cleanly or remove the old lock file only when you know no other instance is using the DB.