How yubeenpark/sulleongsulleong works
Project type and purpose
• This is a front-end single-page application (SPA) template built with React, TypeScript, and Vite.
• It provides a minimal dev environment with hot module replacement (HMR), ESLint rules, and two official Fast-Refresh plugins (Babel or SWC).
File structure
• Top-level:
• package.json / package-lock.json – npm dependencies and scripts
• tsconfig.json / tsconfig.node.json – TypeScript compilation settings
• vite.config.ts – Vite build and dev server configuration
• .eslintrc.cjs – ESLint rules
• public/ – static assets and index.html
• src/ – application source code (App.tsx, main.tsx, CSS and type definitions)
• No backend or database directories—pure front-end architecture.
README for additional insights
• Explains how to switch between Babel-based or SWC-based React Fast Refresh plugins.
• Recommends ESLint enhancements for production: type-aware lint rules, react plugin.
Main components
a. Developer workstation
• Node.js + npm
• IDE / code editor
• Local file system (project files)
b. Build & Dev pipeline
• Vite Dev Server
• Fast-Refresh plugin (@vitejs/plugin-react or @vitejs/plugin-react-swc)
• TypeScript compiler
• ESBuild (or SWC) bundler
• ESLint
c. Static assets
• public/index.html
d. Runtime (client)
• Web browser executing the React application
e. Production hosting
• Static file server or CDN (serves the output of vite build)
Relationships and data flows
• Developer edits source → ESLint and TS check in IDE
• On npm run dev: Vite Dev Server reads src/ + public/, runs TS → ESBuild/SWC → serves JS bundle with HMR
• Browser connects to dev server over WebSocket for HMR updates; displays React UI
• On npm run build: Vite bundles optimized static assets → output in dist/
• Production server/CDN serves the dist/ folder to end users
Architectural patterns and design principles
• Modular front-end architecture: separation between application code (src/) and public assets (public/)
• Pluggable build pipeline: Vite plugins for React, HMR, linting
• Single responsibility: each tool does one thing (TS for typing, ESLint for linting, Vite for bundling/dev server)
Essential elements
• Clear labels on every component (e.g., “@vitejs/plugin-react,” “TypeScript Compiler”)
• Arrowheads showing flow direction (dev → build → runtime)
• Blue for developer tools
• Green for build pipeline
• Orange for runtime
• Gray for hosting/infrastructure
Final advice
• Be detailed: break the build pipeline into each plugin/tool rather than lumping as “bundler.”
• HMR feedback loop between Vite and the Browser.
• Both dev and production flows side by side for clarity.