Skip to content

Commit e51fe44

Browse files
committed
docs(readme,claude): refresh for shadcn migration + research updates
README.md - Tech stack table: drop framer-motion row; add Design system, Icons, Toasts, Fonts, Format rows reflecting the shadcn / radix-ui / lucide / sonner / Google Sans + Inter / Prettier+@IanVS stack. - New "Design system" feature subsection covering shadcn/ui (radix-nova), the OKLCH theme bridge, the site/ composition layer, primitive ecosystem, and Google Sans typography. - Tooling section: mention shadcn CLI, @ianvs/prettier-plugin-sort-imports, Vite native tsconfig paths. - Project structure tree: surface ui/, site/, content/research/. - Research authoring example: add `comingSoon` field + a paragraph on conditional author/affiliation superscripts and the listing-page Overview/News/Areas sections + SectionHeading. - Vercel install command: include `corepack prepare yarn@4.14.1 --activate` and explain why the explicit prepare step is needed. CLAUDE.md - Theme System fonts paragraph rewritten — Google Sans is the default, loaded via Google Fonts CSS, with the system-ui / Roboto / Inter fallback chain. Notes the CSP `font-src` requirement and the legacy `font-primary` mirror. - Research-specific components section restructured into Detail-page / Listing-page / Shared groupings; surfaces ResearchOverview, ResearchNews, ResearchAreas, ComingSoonImage, SectionHeading and the pt-6 md:pt-10 top padding on both research routes. - Conventions: research-authoring bullet adds `comingSoon: true` description; new bullet documenting the conditional sup behavior (single-author/single-affiliation collapses cleanly; markers carry `cursor-help` + native `title` tooltips when shown). Content fix - mesh-decimation-benchmark venue name: CS700 was "Research Methodology in Computer Science", not "Computer Geometry, Course Project". Updated the entry and the README example to match.
1 parent 67c7846 commit e51fe44

4 files changed

Lines changed: 38 additions & 11 deletions

File tree

CLAUDE.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ All blog, portfolio, and research entries are MDX files on disk — there's no C
4949
- `Mermaid` — renders ` ```mermaid ` blocks; mermaid + stylis are transpiled and pre-bundled (see `transpilePackages` and `experimental.optimizePackageImports` in `next.config.js`).
5050
- `ContentImage` — explicit component for ImageKit-hosted images. The default `img` MDX mapping was intentionally removed so external images / SVGs in MDX don't break; use `<ContentImage>` (or a raw `<img>`) explicitly.
5151
- `MDXLink`, `Blockquote`, `Table`, `Headings` — styled overrides.
52-
6. **Research-specific components** live in `src/components/content/research/`: `HeadingResearch` (status chip, title, structured authors + affiliations, venue, action-button row, hr), `ResearchTeaser` (full-bleed figure + caption, lives outside `prose` so it can breathe), `ResearchAbstract` (purple-accented `not-prose` card), `ResearchBibTeX` (anchored at `#bibtex`, copy-to-clipboard, mirrors `Pre.tsx` chrome), `ResearchItem` + `ResearchSections` (listing card + section grouping). The detail page composition is in `src/app/research/[slug]/page.tsx`.
52+
6. **Research-specific components** live in `src/components/content/research/`:
53+
- **Detail-page**: `HeadingResearch` (status chip, title, structured authors + affiliations, venue, action-button row, hr — author/affiliation `<sup>` markers are conditional + carry `title` tooltips, see Conventions), `ResearchTeaser` (full-bleed figure + caption, lives outside `prose` so it can breathe), `ResearchAbstract` (purple-accented `not-prose` card), `ResearchBibTeX` (anchored at `#bibtex`, copy-to-clipboard, mirrors `Pre.tsx` chrome).
54+
- **Listing-page**: `ResearchOverview` (intro paragraph), `ResearchNews` (date-column timeline; entries live in the `NEWS` array inside the file), `ResearchAreas` (colored chip row), `ResearchItem` + `ResearchSections` (listing card + section grouping). `ComingSoonImage` is a pastel-gradient placeholder used in place of the listing thumbnail when an entry has `comingSoon: true`.
55+
- **Shared**: `SectionHeading` is the bordered `text-lg md:text-xl font-bold text-black dark:text-white` h2 used by every section on the listing page (Overview / News / Research Areas / Sections groupers). Use it for any new sections to keep the rhythm consistent.
56+
- The detail page composition is in `src/app/research/[slug]/page.tsx`. The listing page is in `src/app/research/page.tsx` — both pass `pt-6 md:pt-10` to `AppLayoutPage` to give the first section breathing room from the sticky header.
5357
7. **SEO** is generated per-page in `src/app/blog/[slug]/page.tsx` and the portfolio / research equivalents: `generateMetadata` builds Next.js Metadata (OG, Twitter, canonical, `modifiedTime`), and the page itself injects a single `@graph` JSON-LD block:
5458
- Blog: `BlogPosting` + `WebPage` + `BreadcrumbList`
5559
- Portfolio: `SoftwareSourceCode` + `WebPage` + `BreadcrumbList`
@@ -86,7 +90,7 @@ Two layers feed Tailwind v4:
8690

8791
Net result: `bg-primary` (shadcn) and `bg-primary-500` (legacy) render the same color; both surfaces remain valid during the transition. When adding new code, prefer the semantic tokens. Don't write `dark:` overrides for shadcn classes — `--background` etc. switch automatically via `.dark`.
8892

89-
Fonts: `--font-sans` resolves to `var(--font-inter)` (Next/font Google) with the local `@font-face` Inter as a fallback. The legacy `font-primary` utility still maps to Inter via `tailwind.config.js`.
93+
Fonts: `--font-sans` resolves to `'Google Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`. Google Sans is loaded via Google Fonts CSS (`<link>` in `layout.tsx` head, with `preconnect` to `fonts.gstatic.com``font-src` in `next.config.js` CSP must include it). Local Inter `@font-face` stays in `globals.css` as a deeper fallback so the page never FOUCs. `tailwind.config.js` `fontFamily.primary` mirrors the same stack so the legacy `font-primary` utility picks up Google Sans too.
9094

9195
## Two Build Modes
9296

@@ -123,7 +127,8 @@ ISR endpoint at `GET /api/revalidate?secret=<SECRET>&slug=/blog/<slug>`. Secret
123127
- Commits go through `commitizen` with `cz-conventional-changelog` — run `yarn commit` for the prompt. `lint-staged` runs Prettier on staged `js/jsx/ts/tsx/mdx/md/css` files.
124128
- Frontmatter `published` for blog and research is `MM/DD/YYYY` (portfolio uses `date`). `featured: true` surfaces an entry on the home page. Optional `updated: "MM/DD/YYYY"` overrides `published` as the freshness signal — it flows into `dateModified` (BlogPosting / ScholarlyArticle JSON-LD), `<meta property="article:modified_time">`, and the sitemap `lastmod`. Set it whenever you make a substantive content edit; leave it off for typo fixes.
125129
- Authoring convention: open every blog post with a 60–120 word TL;DR paragraph immediately under the H1. LLM crawlers (ChatGPT, Perplexity, AI Overviews) draw ~44% of their citations from the first 30% of an article, so front-loading the answer compounds visibility.
126-
- **Research authoring**: use the YAML folded scalar (`abstract: >-`) — block scalar (`|`) preserves newlines and the abstract renders with broken lines. Authors use a structured array; `affiliations` indices are 1-based and reference the entry's `affiliations` array. `section` drives listing-page grouping (`top-tier` / `conferences` / `journals` / `workshops` / `others`). `new: true` renders a NEW badge inline with the title on the listing card. Authors matching `SITE_AUTHOR.name` are auto-bolded across `HeadingResearch` and `ResearchItem`.
130+
- **Research authoring**: use the YAML folded scalar (`abstract: >-`) — block scalar (`|`) preserves newlines and the abstract renders with broken lines. Authors use a structured array; `affiliations` indices are 1-based and reference the entry's `affiliations` array. `section` drives listing-page grouping (`top-tier` / `conferences` / `journals` / `workshops` / `others`). `new: true` renders a NEW badge inline with the title on the listing card. `comingSoon: true` swaps the listing thumbnail for the `ComingSoonImage` pastel placeholder (no thumbnail/teaser required). Authors matching `SITE_AUTHOR.name` are auto-bolded across `HeadingResearch` and `ResearchItem`.
131+
- **Author / affiliation superscripts** in `HeadingResearch` are conditional: `*` (corresponding author) only renders when there are 2+ authors AND at least one is `corresponding: true`; `¹ ² ³` (affiliation indices) only render when there are 2+ affiliations. The affiliation legend below the author line drops its leading `<sup>` under the same rule. Single-author / single-affiliation entries collapse to clean text — no orphan markers. When markers do render, each `<sup>` has `cursor-help` and a native `title` tooltip explaining what it means (resolves to the affiliation's full name for index sups, "Corresponding author" for the asterisk). A "\*Corresponding author" caption appears below the affiliation line when the asterisk is shown.
127132

128133
## Indexing Helper
129134

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ Use it as your portfolio. Fork it as a template. Read the source as a reference
7070
- **Topic archive pages** auto-generated from frontmatter `topics`.
7171
- **RSS** at `/rss.xml` (summaries) and `/rss-full.xml` (full content) with `<link rel="alternate">` discovery in `<head>`.
7272

73+
### Design system
74+
75+
- **shadcn/ui** (radix-nova style) as the single primitive layer. Components live under `src/components/ui/` and are managed by the shadcn CLI (`npx shadcn@latest add <name>`); rerun with `--diff` to merge upstream updates without losing local edits.
76+
- **Theme bridge** in `src/styles/globals.css` `@theme inline` — shadcn semantic tokens (`--primary`, `--background`, `--foreground`, `--muted`, `--border`, `--ring`) map onto the legacy blue-primary / neutral-theme palette in OKLCH so legacy classes (`bg-primary-500`, `text-theme-700`) and shadcn classes (`bg-primary`, `text-foreground`) render identically across light/dark.
77+
- **Site composition components** under `src/components/site/` (Header, Footer, Nav, Hero, Searchbar, BackToTop, MobileNav, ThemeMenu, link/image wrappers, AppLayoutPage) — bespoke pieces that compose shadcn primitives + project state.
78+
- **Single primitive ecosystem**`radix-ui` (shadcn's base), `lucide-react` (icons inside shadcn), `sonner` (toasts), `tw-animate-css` (animations), `class-variance-authority` (variants), `tailwind-merge` (className merging).
79+
- **Typography** — Google Sans loaded from Google Fonts with a system-font fallback chain (`system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, …`). Local Inter `@font-face` is kept as a deeper fallback so the page never FOUCs.
80+
7381
### Performance
7482

7583
- **Core Web Vitals attribution** for CLS, LCP, **INP**, FCP, TTFB via Vercel Speed Insights.
@@ -80,13 +88,15 @@ Use it as your portfolio. Fork it as a template. Read the source as a reference
8088

8189
### Tooling
8290

83-
- **TypeScript** strict-mode, `@/*` path aliases.
91+
- **TypeScript** strict-mode, `@/*` path alias.
8492
- **ESLint flat config** (`eslint.config.mjs`, replacing the deprecated `next lint`).
85-
- **Vitest** suite (48 tests, ~1.7s) covering schema generators, sorters, content readers.
93+
- **Prettier** with `@ianvs/prettier-plugin-sort-imports` (actively maintained successor to `@trivago`) + `prettier-plugin-tailwindcss`.
94+
- **shadcn CLI** for primitive sync — `npx shadcn@latest add`, `--diff`, `--dry-run`.
95+
- **Vitest** suite (48 tests, ~1.7s) covering schema generators, sorters, content readers. Vite resolves `@/*` paths via the native `resolve.tsconfigPaths: true` (no plugin).
8696
- **JSON-LD validator** (`yarn validate:json-ld`) walks the build output and verifies every `<script type="application/ld+json">` block.
8797
- **Alt-text auditor** (`yarn audit:alt-text`) flags weak `alt` attributes in MDX.
8898
- **GitHub Actions CI**: type-check + lint + test + build + JSON-LD validation on every push/PR.
89-
- **Yarn 4** via Corepack, with a `vercel.json` `installCommand` so deploy hosts honour the lockfile.
99+
- **Yarn 4** via Corepack, with a `vercel.json` `installCommand` (`corepack enable && corepack prepare yarn@4.14.1 --activate && yarn install --immutable`) so deploy hosts actually run Yarn 4 and honour the lockfile.
90100

91101
---
92102

@@ -97,9 +107,12 @@ Use it as your portfolio. Fork it as a template. Read the source as a reference
97107
| Framework | Next.js 16 (App Router) + React 19 |
98108
| Language | TypeScript |
99109
| Styling | Tailwind CSS v4 (with `@tailwindcss/typography`) |
110+
| Design system | shadcn/ui (radix-nova) on `radix-ui` |
111+
| Icons | `lucide-react` (shadcn) + `react-icons` (legacy site components) |
112+
| Toasts | `sonner` |
113+
| Fonts | Google Sans (Google Fonts) + Inter (local @font-face fallback) |
100114
| Content | MDX (`next-mdx-remote/rsc`) + `gray-matter` |
101115
| Markdown plugins | remark-gfm, remark-math, rehype-prism-plus, rehype-slug, rehype-katex |
102-
| Animation | framer-motion |
103116
| Comments | Giscus (deferred) |
104117
| Diagrams | Mermaid (lazy) |
105118
| Math | KaTeX |
@@ -111,6 +124,7 @@ Use it as your portfolio. Fork it as a template. Read the source as a reference
111124
| PWA | @ducanh2912/next-pwa (Workbox 7) |
112125
| Testing | Vitest + happy-dom + @testing-library/react |
113126
| Lint | ESLint 9 (flat config) + eslint-config-next |
127+
| Format | Prettier 3 + `@ianvs/prettier-plugin-sort-imports` |
114128
| Package manager | Yarn 4 (Corepack) |
115129
| Hosting | Vercel (primary) + static export for any CDN |
116130

@@ -177,7 +191,10 @@ src/
177191
│ ├── rss.xml/route.ts # RSS summary feed
178192
│ └── rss-full.xml/route.ts # RSS full-content feed
179193
├── components/ # UI + content components
194+
│ ├── ui/ # shadcn/ui primitives (managed by `npx shadcn@latest add`)
195+
│ ├── site/ # Bespoke composition components (Header, Footer, Nav, AppLayoutPage, Hero, Searchbar, BackToTop, …)
180196
│ ├── content/mdx/ # MDX overrides (Pre, Code, ContentImage, TLDR, FAQ, HowTo, …)
197+
│ ├── content/research/ # Research-page sections (HeadingResearch, ResearchOverview, ResearchNews, ResearchAreas, ResearchSections, ComingSoonImage, SectionHeading, …)
181198
│ └── SEO/Breadcrumbs.tsx
182199
├── data/
183200
│ ├── blog/*.mdx # Blog posts (slug = filename)
@@ -325,13 +342,14 @@ affiliations:
325342
location: 'Fairfax, Virginia, USA'
326343
url: 'https://www.gmu.edu'
327344
venue:
328-
name: 'CS700 — Computer Geometry, Course Project'
345+
name: 'CS700 — Research Methodology in Computer Science, Course Project'
329346
short: 'GMU CS700'
330347
year: 2025
331348
status: 'tech-report' # preprint | under-review | accepted | published | workshop | tech-report
332349
published: '12/08/2025'
333350
featured: true # surfaces on the home page
334351
new: true # renders a "NEW" badge inline with the title on the listing card
352+
comingSoon: true # OPTIONAL: renders a "Coming soon!" pastel placeholder in place of the listing thumbnail (for conditionally accepted / pre-publication entries that don't have a teaser yet)
335353
section: 'others' # top-tier | conferences | journals | workshops | others
336354
topics: ['3D Graphics', 'Mesh Simplification']
337355
keywords: ['mesh decimation', 'QEM', 'vertex clustering']
@@ -357,6 +375,10 @@ bibtex: |
357375

358376
The detail page renders the structured fields in the hero (status chip from `venue.status`, authors with affiliation superscripts, venue line, action-button row driven by `links` and `bibtex`). Authors matching `SITE_AUTHOR.name` are bolded. The `bibtex` field renders as a copy-to-clipboard code block anchored at `#bibtex`.
359377

378+
**Author / affiliation superscripts are conditional**: `*` (corresponding author) only renders when there are 2+ authors and at least one is `corresponding: true`; `¹ ² ³` (affiliation indices) only render when there are 2+ affiliations. Single-author / single-affiliation entries skip both — no orphan markers. When the markers do show, they carry hover tooltips (native `title` + `cursor-help`) that resolve to the actual affiliation names so the meaning is clear without scrolling.
379+
380+
The research listing page (`/research`) renders an Overview paragraph, a date-column News timeline, and a colored chip row of Research Areas above the section-grouped listings. Section headings across the page (Overview / News / Research Areas / Top-Tier Venues / Conferences / Journals / Workshops / Others) share a single `<SectionHeading>` component (`text-lg md:text-xl`, `font-bold`, `text-black dark:text-white`, bordered bottom).
381+
360382
### Special MDX components
361383

362384
```mdx
@@ -420,7 +442,7 @@ y = \sigma(Wx + b)
420442

421443
### Vercel (recommended)
422444

423-
Zero-config — Vercel detects Next.js and uses the `installCommand` from `vercel.json` (`corepack enable && yarn install --immutable`) so Yarn 4 is honoured. Set `NEXT_PUBLIC_SITE_URL` to your production domain in the Vercel project settings.
445+
Zero-config — Vercel detects Next.js and uses the `installCommand` from `vercel.json` (`corepack enable && corepack prepare yarn@4.14.1 --activate && yarn install --immutable`) so Yarn 4 actually runs (the explicit `corepack prepare` step is required because `corepack enable` alone doesn't reliably switch the active yarn binary on Vercel's image — without it, Vercel falls back to Yarn 1.22 and silently rewrites the lockfile). Set `NEXT_PUBLIC_SITE_URL` to your production domain in the Vercel project settings.
424446

425447
### Static export
426448

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import './.next/types/routes.d.ts'
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

src/data/research/mesh-decimation-benchmark.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ affiliations:
2626
location: 'Fairfax, Virginia, USA'
2727
url: 'https://www.gmu.edu'
2828
venue:
29-
name: 'CS700 — Computer Geometry, Course Project'
29+
name: 'CS700 — Research Methodology in Computer Science, Course Project'
3030
short: 'GMU CS700'
3131
year: 2025
3232
status: 'tech-report'

0 commit comments

Comments
 (0)