How nugallan/python-desde-cero-adeviento-web works
Project Type and Purpose
• This is a static, single‐page web application built with Python and Reflex (a React‐style UI framework for Python) and then deployed as a static site (Next.js‐based output) to Vercel.
• Its purpose is to render an interactive “Calendario de aDEViento” UI entirely in the browser with no custom server‐side logic at runtime.
File‐Structure Analysis
• Top‐level packages and scripts:
• adeviento_web/ (Python package with Reflex app)
• assets/ (source CSS, JS, images)
• public/ (build output: Next.js–generated static files under _next/ and other HTML/JS/CSS)
• build.sh, rxconfig.py, requirements.txt (build and dependency configs)
• Within adeviento_web/:
• components/ (reusable UI bits: Button, Day, HeaderText, etc.)
• views/ (page‐level compositions: calendar, navbar, footer, etc.)
• adeviento_web.py (app entry point that composes views into a page)
• Build pipeline indicators:
• rxconfig.py (Reflex config)
• build.sh (script that likely invokes reflex build and Next.js build)
README Insights
• Specifies Python 3.12+, Reflex 0.7.2+, NES.CSS for styling, and Vercel for static hosting.
• No runtime backend beyond Reflex’s development server; production is pure static.
Core Components
a. Developer Environment
– Python + Reflex CLI (dev server & build tool)
– Source code folders (adeviento_web/, assets/)
b. Build/Transpilation Layer
– Reflex compiler → generates React/Next.js code
– Next.js build → bundles JS/CSS into public/_next/ and HTML pages
c. Hosting/Delivery
– Static files on Vercel (or any static web host)
d. Client Side
– Browser running React UI (hydrated from static JS bundle)
e. External Dependencies
– NES.CSS (via CDN or local CSS in assets/css)
– Any other external JS libs (e.g., countdown.js, snow.js)
Relationships and Interactions
• During development: Browser ↔ WebSocket ↔ Reflex dev server (for hot‐reload).
• Static assets (CSS/JS from assets/) are consumed at build time and referenced in HTML.
Architectural Patterns and Principles
• Component‐based UI (React/Reflex)
• Unidirectional data flow in the browser
• Build‐time rendering → static site generation (SSG)
• Strict separation:
• Source (Python) → Build pipeline → Deployment assets
• No server‐side compute at runtime (static only)
Technologies and Frameworks to Annotate
• Python 3.12+
• Reflex (0.7.2+)
• Next.js (auto‐inferred from _next/ folder)
• NES.CSS (2.3.0)
• Vercel (static hosting)
Essential Elements to Capture
• Components taxonomy (Python UI modules vs. static assets)
• Build stages (Reflex compile → Next.js SSG)
• Hosting & delivery (Vercel serving public/)
• Runtime environment (Browser executing React)