feat(frontend): datos de demo embebidos (demo autosuficiente en Vercel)#29
Merged
Conversation
La demo dependía del backend .NET + mock en Render free, que se duermen y provocaban 'No hay datos' / 502 al abrir en frío. Como el dashboard ya calcula todos los agregados en cliente, ahora el frontend trae un dataset de ejemplo embebido y lo usa como fuente por defecto: - frontend/app/lib/sample-sales.json: 25 ventas ficticias (fixtures del mock). - fetchDashboard: usa BACKEND_URL si responde con datos; si no (sin URL, caído, vacío o timeout) cae al dataset embebido. La demo carga al instante, siempre, sin depender de Render. - DEMO.md: documenta el montaje (front en Vercel, datos embebidos, backend opcional y cómo conectarlo). README y DEPLOY actualizados. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
La demo dependía del backend .NET + mock en Render free, que se duermen y provocaban "No hay datos" / 502 al abrir en frío. Como el dashboard ya calcula todos los agregados en cliente, ahora el frontend es autosuficiente.
Cambios
frontend/app/lib/sample-sales.json: dataset embebido (25 ventas ficticias, fixtures del mock).fetchDashboard: usaBACKEND_URLsi responde con datos; si no (sin URL, caído, vacío o timeout) cae al dataset embebido. La demo carga al instante, siempre, sin depender de Render.DEMO.md(nuevo): documenta el montaje — front en Vercel, cómo coge los datos de prueba, dónde está el backend y cómo conectarlo si se quiere. README y DEPLOY actualizados.Por qué
Vercel/GitHub Pages/Cloudflare son hosts de frontend; ninguno corre el backend .NET gratis sin dormir. La solución real no es cambiar de host sino quitar la dependencia del backend para la demo. Sigue en Vercel (ya configurado); basta con dejar
BACKEND_URLvacío.Verificación
lint✅ ·test:run✅ (31) ·build✅🤖 Generated with Claude Code