How juancandela2511/conocimiento_contigo works
Purpose and Runtime
This is a Vite-served React learning platform, centered on courses, interactive activities, learner progress/achievements, and administrator content management. The frontend starts at src/main.jsx, mounts the application in src/App.jsx, and is styled through src/index.css and page/component CSS.
Application Shell and Access Control
src/App.jsx is the primary composition and routing boundary for public, learner, and administration views. Route-loading state is isolated in src/contexto/RouteLoadingContext.jsx; protected application areas are gated by src/utilidades/ProtectedRoute.jsx. Navigation and theme controls are shared shell components in src/components/estructura/BarraNavegacion.jsx and src/components/estructura/CambiadorTema.jsx.
Learner Course Experience
The learner flow begins on src/pages/HomePage.jsx, opens a course in src/pages/CursoDetalle.jsx, and presents individual educational material through src/components/ui/ContentViewerModal.jsx. Course-facing UI is composed from hero, completion, and progress widgets such as src/components/ui/CursoHero.jsx, src/components/ui/CompletedCourseCard.jsx, and src/components/ui/AnimatedProgressBar.jsx.
Interactive Assessment and Activity Runners
Course content can invoke dedicated activity engines rather than embedding game logic in course pages. Quiz, crossword, ordering, and word-search activities are implemented in src/components/juegos/QuizRunner.jsx, src/components/juegos/CrosswordRunner.jsx, src/components/juegos/OrdenarPasosRunner.jsx, and src/components/juegos/WordSearchRunner.jsx. Their completion results are expected to feed the broader progress model.
Progress, Achievements, and Learner Records
Learners view aggregated and detailed progress through src/pages/UserProgressPage.jsx and src/pages/ProgresoDetallePanel.jsx, with reusable record presentation in src/components/ui/ProgresoTable.jsx and src/components/ui/UserProgressCard.jsx. Achievement presentation is separated into src/pages/LogrosPage.jsx and src/components/ui/LogroItem.jsx. Progress-specific retrieval/aggregation is centralized by src/hooks/useAdminProgress.js, shared by administrative reporting.
Administration Boundary
Administrative workflows are organized around src/components/Admin/AdminDashboard.jsx and specialized management pages: src/pages/AdminUsuariosPage.jsx, src/pages/AdminProgresoPage.jsx, src/pages/AdminLogrosPage.jsx, and src/pages/AdminAptitudesPage.jsx. Course/content authoring is modal-driven, including src/components/Admin/AddContentModal.jsx, src/components/Admin/EditContentModal.jsx, and activity-specific creation such as src/components/Admin/AddCuestionarioModal.jsx and src/components/Admin/AddCrucigramaModal.jsx.
Persistence, Offline Support, and AI Service
Supabase is the backend integration boundary via src/services/supabaseClient.js, with project/server configuration under supabase/config.toml. Browser-side offline persistence and service-worker behavior are encapsulated in src/services/offlineDb.js and src/services/sw.js. The in-app assistant UI, src/components/ChatIA.jsx, calls a Supabase Edge Function implemented in Deno at supabase/functions/chat-gemini/index.ts, which is the backend boundary for Gemini chat integration.
Deployment
The frontend is built by Vite (vite.config.js) and has Vercel deployment configuration in vercel.json. The application therefore spans a browser React runtime, Supabase-managed backend/auth/data capabilities, a Deno Edge Function for AI chat, and Vercel hosting.
Main entry points: App.jsx App shell and routes · useAdminProgress.js Progress aggregation · supabaseClient.js Supabase client · AdminDashboard.jsx Admin dashboard
Components 22
React browser app
Vite-served learner and administration client.
- Application entry
src/main.jsx - App shell and routes · Composes public, learner, and admin views.
src/App.jsx - Route loading state
src/contexto/RouteLoadingContext.jsx - Protected routes · Gates protected application areas.
src/utilidades/ProtectedRoute.jsx - Navigation and theme
src/components/estructura/BarraNavegacion.jsx - Course home
src/pages/HomePage.jsx - Course detail
src/pages/CursoDetalle.jsx - Content viewer · Presents individual educational material.
src/components/ui/ContentViewerModal.jsx - Activity runners · Quiz, crossword, ordering, and word-search completion flows.
src/components/juegos/QuizRunner.jsx - Learner progress · Aggregated and detailed learner records.
src/pages/UserProgressPage.jsx - Progress aggregation · Retrieves and aggregates progress for learner and admin views.
src/hooks/useAdminProgress.js - Achievements
src/pages/LogrosPage.jsx - Admin dashboard · Entry point for management workflows.
src/components/Admin/AdminDashboard.jsx - Admin management pages
src/pages/AdminProgresoPage.jsx - Content authoring · Creates and edits content and activity definitions.
src/components/Admin/AddContentModal.jsx - AI assistant UI
src/components/ChatIA.jsx - Offline persistence
src/services/offlineDb.js - Supabase client · Client boundary for managed auth and data.
src/services/supabaseClient.js
Supabase backend
Managed data/auth plus Deno AI function.
- Gemini chat function · Backend boundary for AI chat integration.
supabase/functions/chat-gemini/index.ts - Supabase project
supabase/config.toml
Other components
- Vite build
vite.config.js - Vercel hosting
vercel.json
Connections 25
- Vite build → Application entry: builds
- Vite build → Vercel hosting: deploys to
- Application entry → App shell and routes: mounts
- App shell and routes → Route loading state: uses
- App shell and routes → Protected routes: enforces
- App shell and routes → Navigation and theme: renders shell
- App shell and routes → Course home: routes to
- App shell and routes → Course detail: routes to
- App shell and routes → Learner progress: routes to
- App shell and routes → Achievements: routes to
- Protected routes → Admin dashboard: guards
- Course detail → Content viewer: opens
- Content viewer → Activity runners: launches activities
- Activity runners → Progress aggregation: records completion
- Learner progress → Progress aggregation: reads
- Achievements → Progress aggregation: derives from
- Admin dashboard → Admin management pages: opens
- Admin dashboard → Content authoring: opens
- Admin management pages → Progress aggregation: uses reporting data
- Progress aggregation → Supabase client: queries
- Content authoring → Supabase client: persists content
- Supabase client → Supabase project: connects to
- Offline persistence → Supabase client: supports offline client data
- AI assistant UI → Gemini chat function: invokes
- Gemini chat function → Supabase project: runs on