How chechu15/mi-pagina-web works
Project Type and Purpose
• Full-stack React application with:
– Server-side rendering (SSR)
– Client-side hydration via React Router
– TypeScript + TailwindCSS
– Built and served via Vite (dev) or Docker/Firebase (prod)
• Purpose: fast SSR+CSR hybrid web app, with CI/CD deploys to Firebase Hosting (or any container platform).
File Structure
– app/ : all React routes, root.tsx, global CSS
– public/ : static index.html and 404 fallback
– react-router.config.ts : route conventions
– vite.config.ts & tsconfig.json : build/tooling configuration
– Dockerfile + .dockerignore : containerized build
– .firebase/* + firebase.json + .firebaserc : Firebase Hosting setup
– .github/workflows/*.yml : CI/CD for Firebase deploy on PR/merge
Main Components to Model
A. Developer Machine / CI Pipeline
• Source code in GitHub → GitHub Actions workflows
• Builds (npm run build or docker build) → Artifact (build/, container image)
B. Dev Environment
• Vite Dev Server (HMR + SSR proxy)
• Browser (client code, React hydration)
C. Production Environment
• Hosting platform (Firebase Hosting or Docker-based host)
• Node SSR Server (serves SSR HTML + APIs)
• Static Asset CDN (serves client JS/CSS from build/client)
D. (Optional) External Services
• Any REST/GraphQL backends or external APIs called from loaders/actions
Relationships & Data Flows
– Browser → HTTP GET / → SSR Server → HTML+Initial Data → Browser
– Browser → JS bundles (from CDN or /build/client) → React hydrates
– User navigation → React Router (client) fetches data via fetch/loaders → updates UI
– CI (on push) → GitHub Actions → build + firebase deploy
– Docker image → Container registry → Cloud host runs Node SSR
Architectural Patterns & Principles
– SSR + CSR Hybrid: initial SSR for SEO/performance, CSR for routing transitions
– Nested route modules: each route file exports loader, action, component
– Single-codebase monolith: front+server in one repo, split at build time
– Infrastructure as code: Firebase + Docker + GitHub Actions declarative configs