How dragodiv/editto works
Project Type and Purpose
• This is a front‑end web application built with Next.js using the App Router (src/app).
• Bootstrapped with create-next-app, it focuses on rendering React components server‑side (SSR) and/or statically (SSG), optimized by Next.js conventions.
File Structure
• Top level: configuration files (next.config.mjs, eslint.config.mjs, postcss.config.mjs, jsconfig.json), package manifests, and the public folder for static assets.
• src/app: houses server and client components (layout.js, page.js, components/Tooltip.js) and global styles (globals.css).
• No api directory—this is purely a front‑end rendering pipeline without a custom backend API.
Core Components
a. Client Layer
• Browser running JavaScript served by Next.js (React components in page.js, Tooltip.js).
• Global CSS (globals.css) and component styles.
b. Server/Build Layer
• Next.js serverless functions (SSR) or static‐generation engine.
• Build tools: Webpack/RSC compiler, PostCSS for CSS, ESLint for linting.
• next.config.mjs controlling dynamic routing, environment variables, optimization.
c. Deployment/Infrastructure
• Vercel CDN (or equivalent) caching static pages, assets from public/.
• Node.js runtime executing server components if SSR is used.
d. External Services
• next/font service to fetch and optimize the "Geist" font family.
• Potential analytics or third‑party APIs (not present in this example but leave a placeholder).
Relationships and Data Flow
• User’s Browser → DNS → CDN Edge Cache →
• If asset found (HTML/CSS/JS/static files in public/), serve directly.
• Otherwise, forward request to Next.js runtime for SSR or SSG.
• Next.js Runtime → File System (src/app) → Render React components → Return HTML/CSS/JS.
• Styles: PostCSS processes globals.css during build; shipped as part of CSS bundle.
• Fonts: next/font fetches "Geist" at build or runtime, then delivered via CDN.
Architectural Patterns & Design Principles
• File‑based routing & App Router (convention over configuration).
• Separation of concerns:
• Layout (layout.js) wraps pages.
• Page components (page.js) define routes.
• Reusable UI pieces in components/.
• CDN for static assets; serverless for dynamic rendering.
• Automated build & deploy pipeline (e.g., GitHub → Vercel).
Final Advice
• Be detailed: map every folder to a logical component.
• Deployment (Vercel) and runtime (Node.js serverless) explicitly.