How jorgemacias-12/portfolio works
Project Type and Purpose
• This is a personal portfolio site designed to showcase projects, skills, and the developer’s web development approach.
• It’s built using Astro as the static site generator, with React components for interactivity, TypeScript for type safety, and Tailwind CSS (along with Material UI) for styling.
• The project includes CI/CD using GitHub Actions to build and deploy the site to GitHub Pages.
Main Components
a. Frontend and Presentation Layer:
• Astro: The static site generator that assembles the pages.
• React Components: All UI components (e.g., Header, Card, Carrousel, etc.) that provide interactive parts within the Astro pages.
• Layouts: The overall page structure provided by Layout.astro.
• Styling: Tailwind CSS for utility-based styling and Material UI components.
b. State Management:
• Nanostores: Present in the /src/stores directory for handling state changes across the UI.
c. Internationalization:
• i18n: Modules that manage language support and locale data (/src/i18n and /src/locales).
d. Build and Deployment Pipeline:
• GitHub Actions: The CI/CD pipeline that triggers on Git tags.
• Build Process: Checkout, environment configuration (using dotenv), site building via Astro, and finally deployment to GitHub Pages.
e. Configuration & Environment:
• Environment files and config (from .env.example and various config files) managing sensitive data and build parameters.
Relationships and Interactions
• The Astro engine compiles the componentized pages (using the layouts and React components) into a static build.
• React components interact with the Nanostores-based state management for reactivity.
• The styling layer (Tailwind CSS and Material UI) directly styles the components.
• The build process (initiated via GitHub Actions) takes the source code (including all directories under /src and public assets) and outputs a deployable site.
• The deployed site is hosted on GitHub Pages, making the application accessible over the web.
• Environment variables (handled by dotenv) are injected during the build process for any configuration required.
Architectural Patterns and Design Principles
• Component-Driven Design: The separation of UI elements into self-contained components.
• Static Site Generation: Pre-rendered pages enhance performance and security.
• CI/CD Automation: Using GitHub Actions streamlines updates and deployments.
• Internationalization: Philosophy for supporting multiple languages in UI.
• Separation of Concerns: Clearly defined layers (presentation, state management, configuration) add to maintainability.
Elements
• Clearly Labeled Components:
• “Astro Engine”, “React Components”, “Layouts”, “State Management (Nanostores)”, “Internationalization”, “CI/CD (GitHub Actions)”, “Deployment (GitHub Pages)”, and “Configuration Management (dotenv, config files)”.
• Distinct Visual Encodings: