How marianaaa05/portafolio-astro works
Main Components
• Astro Framework & Build Process: Represent how Astro compiles .astro and .md files in the src/pages directory into routes and then bundles everything for production. Include the role of astro.config.mjs and package.json (which defines dependencies and scripts for commands such as npm run dev, build, etc.).
• Static Assets & Public Folder: Show the public/ directory that holds static files like images (e.g., favicon.svg) or any other assets that do not require processing.
• Source Code Structure:
• Pages: The src/pages folder which maps file names to routes (e.g., index.astro).
• Layouts: The src/layouts directory, exemplified by Layout.astro, which acts as the overall template for page rendering.
• Data Files: The src/cv.json file may house structured data (presumably content) used by the site.
Relationships and Interactions
• How data from cv.json might be injected into components as props or context during rendering.
Architectural Patterns and Design Principles
• Component-based Architecture in which UI pieces are modularized. The clear separation between pages, layouts, and components follows modern UI development practices.
• Static Site Generation (SSG) model: Astro uses its configuration and the project’s file structure to automatically generate routes.
• If applicable, note any design patterns like separation of concerns (layout vs. content vs. components).
Relevant Technologies and Tools
• Astro as the core framework and build tool.
• Usage of .astro files (a mix of HTML, JavaScript/TypeScript, and framework-like components).
• npm for dependency management and using package.json for scripts.
• TypeScript hints (e.g., tsconfig.json and the env.d.ts file) which suggest type-checking.
• Version control with .gitignore and the use of .vscode configuration for development.