How winston-edwin-chiong/personal-website works
Main Components
• Next.js Framework: At the center of the architecture, the Next.js framework manages routing, server rendering, and optimizations.
• App Directory (src/app): This folder holds the main pages of the application. Note there are several sub‑directories like “projects”, “song”, and “story” each containing their own “page.tsx”. These represent distinct routes and functional areas.
• Components Directory (src/components): Contains reusable UI components such as header, footer, theme toggle, and a theme provider. These components are used across different pages.
• Assets (src/assets): Holds static assets like images that the application can reference.
• Library Utilities (src/lib): Contains helper functions (e.g., utils.ts) used across the app.
• Configuration Files: Files like next.config.ts, tsconfig.json, eslint.config.mjs, and postcss.config.mjs indicate project-level configuration—for routing, type checking, linting, and styling.
Relationships and Interactions
• User Interaction flows into routes defined under the “app” directory. For example, accessing /projects, /song, or /story will load corresponding pages.
• Static assets in the “assets” directory are imported by components or pages for UI rendering.
• The “lib” folder provides utility functions that can be used anywhere in the app, so represent this as a shared library that many components or pages may refer to.
• The Next.js configuration and build files (next.config.ts, tsconfig.json, etc.) are not runtime components but drive how the system is built, optimized, and executed. They can be mentioned in a “Configuration” block.
Architectural Patterns and Design Principles
• The application leverages the file‑system based routing of Next.js.
• Components are organized for reusability: a clear separation between the UI layout (header, footer, theme toggle) and the page contents.
• The separation of concerns is evident from the structure: pages for routing, components for UI elements, and lib for utilities.
• It adopts modern React (and possibly TypeScript) best practices given the .tsx file usage and configuration files.