A modern, highly performant, and scalable portfolio web application built with React, TypeScript, and Vite.
This project was recently refactored to implement a strict Hexagonal Architecture (Feature-Sliced), ensuring a robust separation of concerns, maintainability, and enterprise-level codebase quality.
This project enforces a clean architectural boundary separating the UI from the business logic and external services. The src/ directory is divided into 4 strict layers:
Contains pure business logic and interfaces. It has absolute zero knowledge of React or external libraries.
- Pure utility functions (like age calculation).
- Interfaces and Data Models (
Project.ts,Github.ts).
Handles all external communications, APIs, and data sources.
- GitHub API Integration: Isolated data-fetching logic (
githubApi.ts). - Static Data: Project listings and hardcoded records.
The bridge between Infrastructure and UI.
- Custom Hooks (
useGitHubLanguages.ts). - Orchestrates state management, loading states, and error handling.
Responsible only for rendering data and catching user events. No business or fetch logic is allowed here.
- Built using the Container / Presentational pattern.
- Strict path aliases configured (
@/...imports) to avoid fragile relative paths.
- Hexagonal Architecture: Future-proof, highly decoupled codebase.
- Dynamic Theming: Seamless Dark and Light mode toggling logic.
- Live GitHub Integration: Dynamically fetches and parses the programming languages used in the listed projects directly from GitHub's REST API.
- Container/Presentational Pattern:
RepoLanguageshandles the state subscription, whileGitHubLanguagesBarstrictly draws the visual bars. - Google Analytics 4 (GA4): Intelligent interaction tracking mapped to custom events inside the application.
- EmailJS Integration: Working contact form without needing a dedicated backend.
- Framer Motion Animations: Smooth, viewport-triggered scroll animations.
Core:
- React 18
- TypeScript (Strict Mode)
- Vite (SWC Compiler)
Styling & UI:
- React Bootstrap
- Vanilla CSS with custom utility classes (
styles.css) - Framer Motion (Animations)
- React Icons
Integrations:
- Axios (HTTP Client)
- React GA4 (Analytics)
- EmailJS Browser (Contact Form)
src/
├── domain/ # 🧠 Layer 1: Core Domain Rules & Models
├── infrastructure/ # 🔌 Layer 2: Apis and Data Adapters
├── application/ # 🔗 Layer 3: Application Hooks & State
└── ui/ # 🎨 Layer 4: React Components, Styles, Theme
To avoid messy relative imports (e.g., ../../../domain), this project uses fully configured absolute paths mapping directly to the architectural layers:
import { Type } from "@/domain/..."
import { Service } from "@/infrastructure/..."
import { Hook } from "@/application/..."
import { Component } from "@/ui/..."To run this project locally, follow these steps:
Make sure you have Node.js installed (v18+ recommended).
-
Clone the repository:
git clone https://github.com/end1996/PortfolioReact.git cd PortfolioReact -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Build for production:
npm run build
Enmanuel Nava
FullStack Developer | Software Engineering Student
If you find this architectural setup useful, feel free to use it as a reference for your own React projects!