How juanjosenavarro97/landing-infojobs works
Main Components
• Landing Page Application: Represent the entire Astro-based static site.
• Pages: At least one primary page component (src/pages/index.astro) that uses the components and layouts.
• Libraries & Helpers: Show helper modules in src/lib (like get-ij-studies.ts, query.ts, mocks.ts) which could be responsible for data fetching or assembling data for the landing page.
• External Services: Highlight the connection to the InfoJobs API (using the API token from environment variables) as indicated in the README under “Variables de entorno”. This external service is a crucial part of the project’s functionality.
• Public Assets: Represent static assets such as images, fonts, and other media available in the public directory.
• Configuration & Build: Include configuration files (astro.config.mjs, tailwind.config.mjs, tsconfig.json, package.json) used in building and deploying the project.
• Flow from the Landing Page Application (entry point) to the Page Component that utilizes the Layout.
• From the Layout, route to several Components (e.g., Header, HeroSearch, Footer).
• That UI components call or use shared modules/helpers from the src/lib directory.
• Developer/environment modules (e.g., environment variables from .env) feeding into the data-fetching modules.
Architectural Patterns and Principles
• Component-Based Architecture: Show how the modular UI components are organized and reused across the landing page.
• Separation of Concerns: Separate presentation (components, layouts, pages) from business/data logic (lib functions fetching data from API).
• External Integration: Emphasize the integration point with the external InfoJobs API, which is controlled using environment configurations.
• Static-Site Generation: Since Astro is used, note that the site is pre-rendered and optimized for performance.