How cardonaandres/portfolio works
Main Components
• Frontend / Client Application: The entire codebase under the “src” folder represents the client-side application. The entry point is in index.html which loads src/main.jsx.
• App and Page Components: App.jsx acts as a root-level component. The “src/pages” directory (e.g., Home.jsx) and various component folders (common, heroSection, homeComponents, workSection) encapsulate the UI views and reusable elements.
• State & Context: The “src/context/LanguageContext.jsx” suggests a centralized state provider for handling language or localization across the app.
• Custom Hooks: Under “src/hooks” you have custom functionality like useContactForm, useProcessSteps, and useProjects that encapsulate business or interactive logic.
• Assets: The “src/assets” folder holds CSS, images, and JavaScript resources that style and enhance the visual presentation.
• Configuration & Build Tools: Files such as vite.config.js, tailwind.config.js, postcss.config.js, and eslint.config.js denote the build process and coding style rules, while the “vercel.json” is used for deployment configuration.
Relationships and Interactions
• The static file “index.html” bootstraps the application – it loads main.jsx.
• main.jsx initializes the React application by loading App.jsx which manages routing (via pages like Home.jsx) and global state.
• Components in App.jsx and its children are organized modularly (e.g., a Header or Navbar from homeComponents and hero sections from heroSection).
• The LanguageContext provides a state layer throughout the component tree, ensuring a consistent multi-language experience.
• Custom hooks encapsulate data fetching or form handling that may interact with external APIs (if any) or simply manage local state.
• Styling and assets from “src/assets” integrate with UI components to form the visual layout.
Important Architectural Patterns & Design Principles
• Component-based Architecture: Clear separation of UI logic into reusable components such as NavItem, ProjectCard, etc.
• Separation of Concerns: The project separates view (components and pages), assets (CSS/JS/imgs), and application logic (context and hooks).
• Configuration-driven Build and Deployment: Utilizing Vite for fast development way, Tailwind CSS for styling, with additional tools like ESLint for code quality and Vercel for deployment.
Relevant Technologies and Frameworks
• React as the UI library (implied by App.jsx, .jsx file extensions, and functional component organization).
• Vite as the build tool and development server.
• Tailwind CSS (alongside postcss) for styling.
• Possibly ESLint for linting and code quality (with eslint.config.js).
• Vercel for deployment, indicated by vercel.json.
• Custom React hooks and Context API for managing state and interactions.