|
| 1 | +# Versions-Skills Website |
| 2 | + |
| 3 | +The marketing & documentation site for [versions-skills](https://github.com/scagogogo/versions-skills) — an AI-native version-number toolkit (Skills + MCP + Go SDK + CLI). |
| 4 | + |
| 5 | +Deployed at **https://scagogogo.github.io/versions-skills/** via GitHub Pages (build artifacts committed under `dist/` and published by a GitHub Action). |
| 6 | + |
| 7 | +## Stack |
| 8 | + |
| 9 | +- **React 19** + **TypeScript 6** + **Vite 8** (Rolldown bundler) |
| 10 | +- **Ant Design 6** component library |
| 11 | +- **react-router-dom 7** (single-page, `basename="/versions-skills"`) |
| 12 | +- **oxlint** for linting |
| 13 | +- Flat in-house design system (blue-gray palette) — see `src/index.css` |
| 14 | + |
| 15 | +## Project Structure |
| 16 | + |
| 17 | +``` |
| 18 | +website/ |
| 19 | +├── src/ |
| 20 | +│ ├── App.tsx # Router, single HomePage route |
| 21 | +│ ├── main.tsx # Entry point |
| 22 | +│ ├── index.css # Design tokens + shared classes (.section-title, .flat-card …) |
| 23 | +│ ├── pages/ |
| 24 | +│ │ └── HomePage.tsx # Section composition |
| 25 | +│ └── components/ |
| 26 | +│ ├── SiteHeader.tsx # Sticky nav + GitHub button |
| 27 | +│ ├── HeroSection.tsx # Hero banner |
| 28 | +│ ├── FeaturesSection.tsx # 12 core capabilities grid |
| 29 | +│ ├── AlgorithmsSection.tsx # ★ Algorithm deep-dive (parse / compare / suffix weight / constraints / range / sort+group) |
| 30 | +│ ├── ArchitectureSection.tsx # 4-layer architecture diagram + 13 skills |
| 31 | +│ ├── AccessSection.tsx # 4 access methods (Skills / SDK / CLI / MCP) |
| 32 | +│ ├── CasesSection.tsx # Use cases |
| 33 | +│ ├── TutorialsSection.tsx |
| 34 | +│ ├── AiIntegrationSection.tsx # Per-agent MCP config (Claude Code / Codex / Cursor / Windsurf / Cline / VS Code) |
| 35 | +│ ├── QuickStartSection.tsx |
| 36 | +│ └── SiteFooter.tsx |
| 37 | +├── public/ |
| 38 | +│ └── favicon.svg |
| 39 | +├── index.html |
| 40 | +└── vite.config.ts # base: '/versions-skills/' |
| 41 | +``` |
| 42 | + |
| 43 | +The page is composed of vertical sections, each with an `id` used as a hash anchor by the header nav: `#features`, `#algorithms`, `#access`, `#cases`, `#tutorials`, `#ai-integration`, `#quickstart`. |
| 44 | + |
| 45 | +## Development |
| 46 | + |
| 47 | +```bash |
| 48 | +# from the website/ directory |
| 49 | +npm install # first time only |
| 50 | +npm run dev # Vite dev server with HMR → http://localhost:5173 |
| 51 | +npm run build # type-check (tsc -b) + production build → dist/ |
| 52 | +npm run preview # serve the production build locally |
| 53 | +npm run lint # oxlint |
| 54 | +``` |
| 55 | + |
| 56 | +> The dev server runs at a root path, but the production build uses `base: '/versions-skills/'` so assets resolve under the GitHub Pages subpath. Internal links go through `react-router` with `basename="/versions-skills"`. |
| 57 | +
|
| 58 | +## Editing Content |
| 59 | + |
| 60 | +All copy lives in the section components under `src/components/` — there is no CMS. To change wording, edit the relevant `*Section.tsx` and its data arrays (e.g. `features`, `aiClients`, `suffixWeights`). The algorithm tables in `AlgorithmsSection.tsx` mirror the Go source in the repo root (`parser.go`, `version.go`, `suffix_weight.go`, `constraint.go`, `version_range.go`, `sort.go`) — keep them in sync when the Go semantics change. |
| 61 | + |
| 62 | +## Design Notes |
| 63 | + |
| 64 | +- **Flat design** — no shadows, no gradients; `1px solid #e2e8f0` borders, `4px` radius. |
| 65 | +- Palette is CSS custom properties in `src/index.css` (`--c-primary` … `--c-gray-900`). |
| 66 | +- Code blocks use the dark slate theme (`background: #1e293b; color: #e2e8f0`). |
| 67 | +- Shared classes: `.section-title` (32px / 700), `.section-subtitle` (16px / gray-500), `.flat-card` (hover lifts border to gray-300). |
| 68 | + |
| 69 | +## CI / Deployment |
| 70 | + |
| 71 | +Pushing to `main` triggers the Pages workflow, which runs `npm run build` and uploads `dist/`. See `.github/workflows/` in the repo root. |
0 commit comments