How alanvww/100-days-of-design-engineering works
Project Overview and Type
• This is a Next.js frontend application that documents a design engineering journey (“100 Days of Design Engineering”) using modern web technologies (React, Next.js, WebGL).
• The repository primarily serves as a showcase of various UI demonstrations and interactive components, where each “day” is represented by content files (in markdown) and supporting assets (images/videos inside public/assets).
• Although there are some API endpoints (for feedback and project data), the core focus is on the UI composition and frontend rendering.
File Structure Components
• Frontend Application (src/app):
• Contains page layouts (layout.tsx), the homepage (page.tsx), and dynamic routes for days (src/app/days/[slug] with its pages, loading indicators, and opengraph image generation).
• There are also admin-specific pages under src/app/admin and API handlers (in src/app/api) for processing feedback and project routes.
• Components (src/components and src/components/ui):
• These directories showcase the reusable UI elements, such as navigation bars, footers, buttons, cards, sliders, and more.
• The UI components in src/components/ui are used to construct the visual and interactive parts of the site.
• Elements (src/elements):
• Includes custom interactive and design-centric elements such as draggable grids, text editors, animated components, and wrappers for specialized functionality.
• Content (src/content):
• Consists of Markdown files for each “day”, forming the narrative and instructive content. This underpins the project’s purpose as a design showcase.
• Library and Utility Files (src/lib & src/types):
• Provide utilities for markdown processing, type definitions, and supabase integration – supporting functions for rendering and interactivity on the frontend.
• Public Assets (public/assets):
• Contains static resources (images, videos, JSON files) supporting the visual components and content pages.
• Main Components to Include:
a. Browser Client: Represents the user’s browser making HTTP requests.
b. Next.js Frontend Application:
• UI Components Layer: A distinct block containing the imported components from src/components/ui and other shared components (like Navbar, Footer, etc.). Emphasize that these handle the rendering of interactive design showcase elements.
• Page Components Layer: Illustrate dynamic routing and page generation (e.g., src/app/days/[slug]/page.tsx) that consumes content from Markdown files.
c. API & Backend Endpoints (Optional Light Reference):
• API endpoints (API for feedback and project routes) which serve as supplemental support for data submission and retrieval, though these are not the primary focus.
d. Data and Content Management:
• Content Repository: Include a component for Markdown files (src/content) that provides text and contextual content.
e. Assets & Static Resources:
• Public Folder: Include a block for the public assets (images, videos, JSON) that support UI demonstrations.
f. Utility & Library Layer:
• Utilities providing markdown support, database types, and supabase interactions.
• Relationships and Interactions:
• Within the frontend block, illustrate the relationship between the Layout, Page Components, and UI Components layers. For instance, show that the layout page loads consistent elements (header/footer) and then dynamically renders the page content.
• Optionally, link API endpoints to the UI components that might trigger or display data from the feedback or project routes.
• Architectural Patterns:
• Component-based architecture typical with React/Next.js.
• Dynamic routing approach, where each “day” corresponds to a dynamic route with its own content and media.
• The separation of concerns is clear—UI components for display, elements for specialized effects, and content for narrative documentation.
• Technologies & Frameworks:
• Next.js for SSR and dynamic routing.
• React for the component-based UI.
• TypeScript for type safety.
• WebGL for some of the interactive or animated UI elements.
• Bun for package management.