How yormanona/comunikate_ec_v1 works
Project Type and Purpose
• This is a Single-Page Application (SPA) built with React, using Vite as the build tool and dev server.
• It’s a content-driven, static front-end for a courses/coworking site: it serves various pages (Home, Cursos, Servicios, Nosotros, Inscríbete, Contacto) and renders data loaded from local JSON files.
File Structure
• Top level:
• package.json / package-lock.json: dependencies and scripts
• vite.config.js: Vite build/dev configuration
• public/: static assets (images, instructors folder)
• src/: application source
• src/ subdivisions:
• components/: reusable UI components (NavBar, HomeSlider, footer, etc.)
• pages/: page-level components, organized by route (Cursos, Cursos/Audiovisual, etc.)
• data/: local JSON files (instructores.json, course data)
• hook/: custom hooks (ScrollToTop, useTypewriter)
• assets/img/: various images for courses, gallery, etc.
• styles/: CSS files organized by component/page
• main.jsx / App.jsx: application entry point and router setup
Extract Insights from README
• Confirms use of React + Vite with HMR (fast refresh) via @vitejs/plugin-react or plugin-react-swc.
• No backend or external API is mentioned; data is loaded locally.
Main Components
a. Developer Environment
• Code Editor / Git Repo (local machine)
• Vite Dev Server (localhost:3000) with HMR
b. Build Pipeline
• Vite (bundler/transpiler)
• Babel or SWC plugin
• Output: static assets (JS/CSS/HTML) in dist/
c. Hosting & CDN
• Vercel (per vercel.json) or any static-site host (Netlify, AWS S3 + CloudFront)
• CDN cache layer
d. Client Browser
• Loads index.html
• Executes bundled React app
• React Router handles navigation between pages
• Components fetch JSON from “public/” or embedded in bundles
e. Static Assets
• Images in public/ and src/assets/img/
• CSS files served alongside JS
Relationships & Data Flow
• Developer writes code → commits to Git → pushes to remote
• On push, CI/CD triggers Vite build → produces dist/ → deploys to hosting/CDN
• Client browser requests “/” → CDN/host returns index.html + JS/CSS
• Browser runs React app → React Router maps URL to a page component → component loads data (JSON or assets) → renders UI
• Navigation within the SPA does not reload the server, uses client-side routing
Architectural Patterns & Design Principles
• SPA with client-side routing (React Router)
• Component-based UI (atomistic structure in src/components + pages)
• Separation of concerns:
• components/ for pure UI
• pages/ for route containers
• data/ for static content
• hook/ for cross-cutting behavior
• Vite for fast rebuilds and optimized production build