How eliascoca85/my-portfolio works
Project type & purpose (from file tree + README)
This is a Next.js (App Router) single-page portfolio-style web application (no explicit backend service in the repo). Evidence:
• src/app/ with layout.js + page.js → Next.js App Router structure.
• A set of UI sections/components: hero.js, QuienSoy.js, habilidades.js, portafolio.js, contacto.js, nav.js.
• One custom hook: hooks/useResponsive.js.
• Static assets under public/ (e.g., public/images).
• No src/app/api/* routes, no database layer, no server folder → likely static / SSR site with client-side interactions only.
So the “system” is primarily: Browser ⇄ Next.js runtime (Node/Vercel) → static assets, plus build tooling.
Runtime / app structure
• src/app/page.js: the root page (likely composes the portfolio sections).
• src/app/layout.js: the root layout (wrapping HTML structure, global providers, fonts via next/font).
• src/app/components/*: presentation components/sections.
• src/app/hooks/useResponsive.js: shared behavior for responsive layout decisions.
Build/config/deploy
• next.config.mjs and next.config.optimized.mjs: app configuration (and an “optimized” variant) → show as “Build/Runtime Configuration”.
• eslint.config.mjs, postcss.config.mjs, jsconfig.json: dev/build tooling.
• OPTIMIZACION.md: hints there is an intentional optimization story (could affect bundling, images, config choices).
• README suggests typical Next dev server and likely Vercel deployment.
Architectural pattern: component-composed UI within a single Next.js app, with a small “shared hook” layer and global layout.
Client / User Agent
• Browser (Desktop/Mobile)
• Optional: “Viewport/Responsive constraints” (ties to useResponsive)
Next.js Application (App Router)
Inside this, explicitly decompose:
• Root Route: / → src/app/page.js
• Root Layout: src/app/layout.js
• nav.js
• hero.js
• QuienSoy.js
• habilidades.js
• portafolio.js
• contacto.js
• Hooks / Shared Logic
• useResponsive.js
• Styling
• globals.css
Static Assets
• public/images/* (and any other public/* content)
• Served as static files by Next/Vercel CDN
Build & Tooling (non-runtime but important
• Node.js build pipeline (next build)
• Config:
• next.config.mjs
• next.config.optimized.mjs (show as alternate config profile)
• postcss.config.mjs
• eslint.config.mjs
• Package manager / scripts (package.json)
Hosting/Delivery Platform
• Vercel (as suggested by README) or generic “Node hosting + CDN”
• CDN for static assets
• Server runtime for SSR (if used) / routing
External services (only if present in code)
From the tree/README, none are explicit. If contacto.js submits to an external email service (not visible here), you’d add it later after verifying code.
HTTP request flow
• Browser → Hosting Platform (Vercel)
• Hosting Platform → Next.js App Router
• Next.js returns HTML (SSR) or a static response (SSG) + JS bundles
• Browser fetches static assets:
• Browser → CDN/static hosting → public/images/*, CSS, JS chunks
In-app composition flow (important here)
• layout.js wraps page.js
• page.js composes the section components:
• page.js → nav.js, hero.js, QuienSoy.js, habilidades.js, portafolio.js, contacto.js
• Components that rely on responsive behavior:
Build/deploy flow
• Developer machine (npm scripts) → next build
• next build reads next.config.mjs (or optimized variant) → produces .next/ output (not in tree but implied)
• CI/CD → Vercel deploy → CDN + runtime
Important architectural patterns/principles to highlight
• App Router + Layout/Page model (src/app/layout.js, src/app/page.js)
• Component-based UI composition (sections as components)
• Shared hook for responsive logic (useResponsive.js) as the “behavior reuse” layer
• Static assets served from public/ (separate from JS bundle)
• Build-time optimization via Next.js + next/font (from README) and the existence of next.config.optimized.mjs / OPTIMIZACION.md
Labeling conventions (be explicit)
• “Root Page (src/app/page.js)"
• “Responsive Hook (src/app/hooks/useResponsive.js)"
• “HTTP GET /”
• “imports / composes”
• “loads static image”
• “build reads config”
Don’t overthink it: decompose aggressively
Even though it’s “just a Next app”, you get the most accurate architecture by separating:
• routing (page.js)
• shell (layout.js)
• each section component
• shared hook
• static assets
• build/config vs runtime