How toss/frontend-fundamentals works
Project Type and Purpose
• This is a static documentation site (“Frontend Fundamentals”) built with VitePress. Its goal is to provide guidelines and best practices for frontend developers (bundling, code quality, etc.). Users browse a statically generated site; contributors submit via GitHub Discussions.
Main Components
a. Content Layer
• Markdown files under fundamentals/bundling and fundamentals/code-quality (and localized versions)
• Assets under public/ and images/
b. Theme & Presentation Layer
• Custom Vue components and styles in .vitepress/theme/ directories
• Composables/hooks under .vitepress/theme/hooks
c. Build & Dev Tooling
• VitePress (configured in .vitepress/config.mts)
• Yarn v4 with Plug’n’Play (.yarn/, .yarnrc.yml)
• TypeScript config (tsconfig.json) and Prettier (.prettierrc)
d. API Integration
• api/github.js for GitHub Discussions calls (Giscus comment integration)
e. CI/CD & Hosting
• GitHub repository with PR/discussion templates (.github/)
• Deployed to Vercel (via vercel.json) as a fully static site
Component Relationships & Data Flow
• Developer → GitHub (pushes code, opens PR)
• GitHub Actions or Vercel Hook → Yarn install & vitepress build
• Build output (static HTML/CSS/JS) → Vercel CDN
• Browser ←– HTTP GET to Vercel CDN → static site
• Static site (Vue) loads, then Giscus widget uses api/github.js to fetch/post comments to GitHub Discussions
• Local dev: yarn dev → VitePress dev server with HMR
Architectural Patterns & Design Principles
• Static Site Generation (SSG) for performance and simplicity
• Component-based theming using Vue for layout, navigation, comments
• Markdown-as-source-of-truth for content, with multi-language support
• Yarn Plug’n’Play for fast, deterministic installs
• Separation of concerns: content vs. theme vs. build scripts vs. deployment config
Essential Details to Capture
• Markdown content directories and localization structure
• .vitepress theme overrides and custom hooks
• Yarn PnP setup and lockfile integrity
• API script role in enabling comments/discussion integration
• Vercel configuration for static deployment
• How changes propagate from commit → build → live site