How juantoranzos/proyectofinalnext works
Project type and purpose
• This is a front-end-focused, server-rendered React application built on Next.js (bootstrapped with create-next-app).
• There is no separate “backend” folder or custom API routes, so it’s primarily a front-end project that uses Next.js’s built-in server-side rendering (SSR), static generation, and routing.
File structure
• Top-level files:
• package.json, package-lock.json → dependencies & scripts
• next.config.mjs → Next.js configuration
• jsconfig.json → path aliases
• eslint.config.mjs, .gitignore, postcss.config.mjs → linting & CSS build config
• app/ directory:
• layout.js → root layout component for all pages
• page.js → the default route’s page component
• globals.css → global styles
• No “api” subfolder under app/, so no custom API endpoints.
README
• Confirms it’s a vanilla Next.js app, using next/font to optimize & serve the “Geist” font.
• No mention of external databases or microservices—deployment via Vercel is recommended.
Main components
a. Client (Browser)
b. CDN / Vercel Edge Network (optional, for static assets & caching)
c. Next.js Server (Node.js runtime on Vercel or custom host)
d. File-system routes within Next.js (app/layout.js, app/page.js)
e. Static asset pipeline: CSS (globals.css + PostCSS), next/font → external font delivery service
f. Developer tooling (ESLint, PostCSS, bundler)
Relationships & interactions
• The Browser sends HTTP requests to the Next.js Server (via Vercel or self-hosted).
• Server uses file-system routing (app/page.js, other future pages) to resolve routes.
• Layout.js wraps each page component, injecting HTML head, styles, and font links.
• next/font logic fetches fonts from Vercel’s font service (or external CDN) at build time or runtime.
• CSS is processed via PostCSS, delivered as static assets.
• Optional: CDN caches both SSR responses and static assets close to the user.
Architectural patterns & key design principles
• File-system routing: each file under app/ becomes a route.
• Server-side rendering + static generation hybrid.
• Separation of concerns: layout, global styles, and page components.
• Build-time optimization of fonts and CSS.
Relevant technologies & frameworks
• Next.js (routing, SSR, SSG)
• React (component model)
• Node.js (runtime for SSR)
• PostCSS (CSS transformations)
• next/font (font optimization)
• Vercel (hosting, edge network)
Essential elements to capture
• File-system routing → page resolution path
• CSS & font build pipeline
• Deployment hosting & CDN caching
• Clear separation: client ↔ server, code modules ↔ external services