Personal portfolio for Cris Benge β AI Researcher, builder, and technology leader. This project contains a well-crafted static site built with Astro 5, Tailwind CSS v4, and TypeScript in strict mode built with GitHub.IO deployment in mind.
This isn't just a portfolio β it's a reference implementation of modern static site architecture. Built with Astro 5's content collections, Tailwind CSS v4's new CSS-based configuration, and TypeScript in strict mode throughout. Every component is tested, every color meets WCAG AA contrast ratios, and the entire CI pipeline enforces quality gates before deployment.
| Feature | Description | |
|---|---|---|
| π | Content Collections | 6 Zod-validated collections: projects, publications, patents, education, certifications, awards |
| π | Dark Mode | System-aware with manual toggle, FOUC prevention via inline script |
| π± | Responsive Design | Mobile-first approach with fluid typography using clamp() |
| βΏ | Accessible | WCAG AA compliant, keyboard navigable, reduced motion support |
| π§ͺ | 90%+ Coverage | Unit tests with Vitest, E2E with Playwright across 3 browsers |
| π | Lighthouse 100s | Performance, Accessibility, Best Practices, SEO |
| π | Security Scanning | npm audit + Semgrep SAST in CI pipeline |
| π€ | Self-Hosted Fonts | Privacy-respecting, performance-optimized via @fontsource |
| Category | Technology | Why |
|---|---|---|
| Framework | Astro 5.x | Static generation, content collections, zero JS by default |
| Styling | Tailwind CSS v4 | CSS-native @theme config via @tailwindcss/vite |
| Language | TypeScript | Strict mode, no any types allowed |
| Unit Testing | Vitest | Co-located tests, AstroContainer API |
| E2E Testing | Playwright | Chromium, Firefox, WebKit coverage |
| Linting | gts | Google TypeScript Style for consistency |
| CI/CD | GitHub Actions | Multi-stage pipeline with quality gates |
| Hosting | GitHub Pages | Automated deployment on merge to master |
src/
βββ components/ # Astro components with co-located *.test.ts files
βββ content/ # Content collections (Zod-validated schemas)
β βββ projects/ # Portfolio projects (Markdown)
β βββ publications/ # Academic papers (Markdown)
β βββ patents/ # Patent filings (Markdown)
β βββ education/ # Degrees (YAML)
β βββ certifications/ # Professional certs (YAML)
β βββ awards/ # Competition wins (YAML)
βββ layouts/ # BaseLayout with dark mode, SEO, analytics
βββ styles/ # Tailwind v4 design system (@theme tokens)
βββ utils/ # Utilities (cn.ts for class merging)
βββ types/ # TypeScript type definitions
e2e/ # Playwright E2E tests
test/fixtures/ # Mock data for unit tests
| Collection | Type | Description |
|---|---|---|
projects |
Content (MD) | Portfolio projects with categories: leader, builder, winner, research |
publications |
Content (MD) | Academic papers with authors, venue, abstract |
patents |
Content (MD) | Patent filings with status tracking |
education |
Data (YAML) | Degrees and institutions |
certifications |
Data (YAML) | Professional certifications by category |
awards |
Data (YAML) | Competition and professional awards |
The design system lives in src/styles/global.css using Tailwind v4's CSS-native configuration:
@theme {
/* Semantic color tokens */
--color-bg: #ffffff;
--color-bg-dark: #0a0a0a;
--color-accent: #2563eb;
--color-accent-dark: #3b82f6;
/* Typography */
--font-display: 'Space Grotesk', system-ui, sans-serif;
--font-sans: 'Inter', system-ui, sans-serif;
--font-mono: 'JetBrains Mono', monospace;
/* Transitions */
--transition-fast: 150ms;
--transition-medium: 300ms;
}Custom utilities: .focus-ring for accessible focus states, .text-display-lg for responsive headlines, .prose for long-form content.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Unit Tests (Vitest) β E2E Tests (Playwright) β
βββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β β’ Co-located with components β β’ Cross-browser coverage β
β β’ AstroContainer API β β’ Chromium, Firefox, WebKitβ
β β’ 90% coverage threshold β β’ Accessibility assertions β
β β’ Fast, isolated β β’ Visual regression ready β
βββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
Component Testing Pattern:
import { experimental_AstroContainer as AstroContainer } from 'astro/container';
const container = await AstroContainer.create();
const result = await container.renderToString(Hero, {
props: { title: 'Hello World' }
});
expect(result).toContain('Hello World');ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Security β β Lint & β β Build & β β E2E & β
β npm audit βββββΆβ Type Check βββββΆβ Unit Tests βββββΆβ Lighthouse βββββΆ Deploy
β Semgrep β β gts β β Vitest β β Playwright β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
- TypeScript strict mode β No
anytypes, strict null checks - Google TypeScript Style β Consistent formatting via gts
- Pre-commit hooks β Lint, format check, security scan before every commit
- Branch protection β All CI checks must pass before merge
| Performance | Accessibility | Best Practices | SEO |
|---|---|---|---|
| π― 100 | π― 100 | π― 100 | π― 100 |
| Feature | Implementation |
|---|---|
| Color Contrast | WCAG AA compliant β all ratios documented in design system |
| Keyboard Navigation | Visible .focus-ring on all interactive elements |
| Touch Targets | 44px minimum for buttons and links |
| Reduced Motion | @media (prefers-reduced-motion) disables all animations |
| Semantic HTML | Proper heading hierarchy, landmarks, ARIA where needed |
| Dark Mode | Respects prefers-color-scheme, with manual override |
| Optimization | Impact |
|---|---|
| Zero JS by default | Only ThemeToggle component hydrates client-side |
| Self-hosted fonts | @fontsource eliminates third-party requests |
| Static generation | No server runtime, pure HTML/CSS/JS |
| Image optimization | Astro Image component with lazy loading |
| Font subsetting | Only required weights loaded |
# Clone the repository
git clone https://github.com/cbenge509/cbenge509.github.io.git
cd cbenge509.github.io
# Install dependencies
npm install
# Start development server (http://localhost:4321)
npm run dev
# Run unit tests
npm test
# Run E2E tests (all browsers)
npm run test:e2e
# Build for production
npm run build
# Preview production build
npm run previewMIT License β feel free to use this as inspiration for your own portfolio.
Built with Astro Β· Styled with Tailwind CSS Β· Deployed on GitHub Pages
