How s-hirano-ist/s-public works
Main Components
• Frontend Site (Static SSG) – This includes:
• The Astro framework entry point (astro.config.mjs) coordinating the build.
• The “src” directory containing all the UI pieces: pages (portfolio, blog, news, license, search, etc.), layouts, and components (both Astro and React-based). Components like Header, Footer, PostCard, Timeline, etc., are organized under “src/components.”
• Styling and assets under “src/styles” and the “assets” directory (as well as public assets in “public”).
• Build & Development Tools – This involves:
• Package management (pnpm, package.json, pnpm-lock.yaml).
• Build and type-checking scripts (pnpm commands like build, tsc, sync).
• Code formatting and linting suites (Prettier, ESLint, StyleLint, markdownlint).
• GitHub workflows in “.github/workflows” that handle CI, linting, dependency updates (Renovate), testing (Playwright, Lighthouse, Visual Regression).
• Deployment integration with Cloudflare Pages.
• External Services & Infrastructure – Include:
• Analytics: Google Analytics.
• Site verification: Google Search Console.
• Domain management: Onamae.com.
• License and security checks (scripts like checkLicense.sh and licensing summaries).
Relationships and Interactions
• Data Flow: Illustrate how source files in “src” and assets in “assets/public” are processed during the build process (via Astro’s SSG) into a production build (./dist).
• CI/CD Pipeline: Show how commits trigger GitHub Actions and workflows (.github/workflows) that run tests, verify code formatting, run security and dependency scans, and then deploy automatically to Cloudflare Pages.
• Integration Points: Indicate the upstream control (GitHub for source code management) and downstream services such as Google Analytics, Search Console, and the packaging/updating scripts (like generating license summaries or photo paths).
Architectural Patterns and Design Principles
• Separation of Concerns – The codebase is clearly divided: component views (UI), page templates, layouts, and utilities.
• Static Site Generation – The site is pre-built via Astro, then deployed as static files.
• Modular Components – The use of both Astro and React components within “src/components” supports reusability and composition.
• CI/CD Automation – Built-in GitHub Actions, Renovate configuration, and external checks ensure continuity between code quality and deployment.
Technologies, Frameworks, and Tools
• Astro (framework) at the center of the web generation.
• React components (located in “src/components/react”).
• TypeScript represented in tsconfig.json and TypeScript files.
• TailwindCSS and DaisyUI for styling.
• Various linters (ESLint, StyleLint, secretlint) and formatters (Prettier) which ensure code quality.
• GitHub Actions pipelines (.github/workflows) for automation.
• Cloudflare Pages for hosting/deployment.
• External integrations: Google Analytics, Search Console, and licensing/security tools.
What
• Frontend (Astro Site) with subdivisions for Pages, Components, Layouts, and Styles.
• Build Tools/Development Environment.
• CI/CD Pipeline (GitHub workflows).
• External Services (Deployment on Cloudflare Pages, Google Analytics, Search Console).
• From source code (repository) → build process → production build → deployment.
• CI integrations that loop back into the development cycle.
• Optionally, include smaller details such as:
• The script executions (e.g., generating license summaries or photo paths).
• The modularity provided by the “src” folder structure.
• How environment configurations (from .nvmrc, .npmrc, etc.) support development.
• The repository with its code and assets is built by Astro (leveraging the “src” folder).
• The build process is orchestrated and monitored by CI/CD (GitHub Actions).
• Once built, the static site is deployed to Cloudflare Pages and interacts with analytics/verification services.
• All components (pages, components, utilities) and build tools, integration scripts, and external API hooks are clearly delineated.