How miiyama/nextjs works
Project Type & Purpose
• This is a front-end design system built on React/Next.js to accelerate creation of landing/marketing pages.
• There is a local server (Next.js) and a documentation site (Storybook), plus build/deploy via Netlify and CI (GitHub Actions).
File Structure
• Top-level config: Babel, ESLint, Prettier, Tailwind, tsconfig, Netlify, GitHub Workflows.
• /public: static assets.
• /src:
• /content: page-specific content definitions (hero, content blocks).
• /library/components: Atomic-Design hierarchy.
• /library/layout & navigation: layout primitives (ColumnLayout, Meta, Navbar).
• /pages: Next.js entry points (_app.tsx, _document.tsx, index.js).
• /styles: global CSS.
• /storybook: component documentation and preview setup.
• Build scripts: figma.js (token sync), generate-stories, react-docgen.
Extract Key Insights from README
• Stack: React, Next.js, Material-UI, TailwindCSS, Node.js (for build scripts).
• Features: theme tokens, 8px grid, modular header/footer slots, Storybook docs.
• Roadmap: CMS integration, legacy browser support.
Main Components & Their Relationships
a. Next.js App
• Pages (_app, _document, index)
• Renders components from /library using content from /content
• Wraps in ThemeProvider (tokens) and global CSS
b. Design System Library
• Tokens layer → Atoms → Molecules → Organisms → PageBuilder
• Layout & Navigation primitives
c. Storybook
• Imports same library to render & document each component
d. Build & Token Sync
• figma.js syncs design tokens from Figma → updates /library/tokens
• generate-stories & react-docgen auto-generate stories/config
e. CI/CD & Deployment
• GitHub Actions triggers on push → runs lint/tests → deploy to Netlify
• Netlify serves compiled Next.js app (SSG/SSR) and Storybook (if configured)
Architectural Patterns & Principles
• Atomic Design hierarchy for UI reusability
• Theming via tokens for client-specific customization
• Next.js conventions for SSR/SSG, custom _app & _document
• Separation of concerns: content vs. presentation
• CI pipeline enforcing linting, testing, deploying
Final Checklist
• Clear component names: Next.js App, Storybook, Figma Sync, CI/CD, Netlify.