.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.18234949.svg :target: https://doi.org/10.5281/zenodo.18234949
Interactive application developed in React + TypeScript + Vite to visualize the didactic planning and learning objectives of the course in a dynamic and attractive way.
- Dynamic Visualization: Renders interactive cards for each week of the course based on the
planeamiento.jsondata file. - Smart Filtering: Allows searching contents by title, learning objectives, or activities. Includes a keyboard-accessible clear search button that manages focus automatically.
- Categorized Evaluation: Visually distinguishes between formative (blue) and summative (purple) evaluations.
- Bibliographic References: Inclusion of APA sources for each session.
- Internationalization (i18n): Switch between English and Spanish (
en/es) via the Settings menu. - Edit Mode: Toggleable interface for modifying syllabus content directly (for authorized users/development).
- Week Reordering: Move weeks up and down with automatic re-indexing.
- Drag & Drop: Intuitive drag-and-drop support for reordering weeks.
- Live Editing: Edit titles, objectives, activities, and evaluations in place.
- Auto-Save: Changes are automatically saved to local storage.
- Import/Export: detailed JSON import/export with schema validation.
- Export to HTML: Generate a standalone, offline-ready HTML version of the syllabus for sharing.
- Unit Configuration: Customizable unit label (e.g., "Week", "Session") via Settings.
- Keyboard Shortcuts: Press
?to view a list of all available shortcuts (toggle Edit Mode, expand cards, etc.).
- Dark Mode: Light/Dark theme toggling with local persistence and system adaptation.
- Modern Interface: Clean and responsive design using Tailwind CSS.
- Fluid Animations: Expansion and filtering transitions implemented with Framer Motion.
- Robustness: Safe type mapping and error handling for inconsistent data (strings vs objects).
- Living Documentation: Source code documented with JSDoc.
- Accessibility (a11y):
- Readable Typography: Base font size increased to 18px to improve readability on all screens.
- Reduced Motion: Respects
prefers-reduced-motionfor users who disable system animations. - Keyboard Navigation: Full support for tabbing and keyboard activation.
- Interactive Cards: Expand/collapse week cards using
EnterorSpacekeys. - Visible Focus: High contrast focus indicators (
focus-visible) exclusively for keyboard navigation. - Screen Reader Support: Decorative icons
aria-hiddenandaria-expanded/aria-controlsattributes for dynamic states. - Semantic HTML: Proper use of
<button>and<input>elements for native accessibility. - Mobile Experience: Floating action buttons display visible text labels when accessed on mobile devices to improve understanding without tooltips.
- Form Validation: All form fields include unique
idandnameattributes to ensure compatibility with autofill tools and assistive technologies.
- Core: React 18, Vite, TypeScript
- Styles: Tailwind CSS v3
- Animations: Framer Motion
- Icons: Lucide React
- Utilities:
clsx,tailwind-merge - Testing: Vitest, React Testing Library
The project uses Vitest for unit testing.
# Run unit tests
npx vitest runCurrent test coverage includes:
- Export Buttons: Verifies rendering of labels and interactions for export functionality.
- Context Providers: Verifies logic for Edit Mode and Theme Context.
syllabus-viewer/
βββ src/
β βββ components/
β β βββ EditToggle.tsx # Edit mode toggle button
β β βββ ExportExcelButton.tsx # Component to export data to Excel
β β βββ ExportJsonButton.tsx # Component to export data to JSON
β β βββ FloatingControls.tsx # Container for floating UI controls
β β βββ Footer.tsx # Page footer
β β βββ Header.tsx # Title and introduction
β β βββ LanguageToggle.tsx # Language switch button
β β βββ SearchBar.tsx # Search bar
β β βββ SortableWeekCard.tsx # Draggable wrapper for WeekCard
β β βββ ThemeToggle.tsx # Theme toggle button
β β βββ TimelineGrid.tsx # Main card grid
β β βββ WeekActivities.tsx # Activities section
β β βββ WeekCard.tsx # Container for the weekly card
β β βββ WeekEvaluation.tsx # Evaluations section
β β βββ WeekObjectives.tsx # Objectives section
β β βββ WeekReferences.tsx # References section
β β βββ ConfirmationModal.tsx # Reusable confirmation modal
β β βββ ShortcutsModal.tsx # Keyboard shortcuts help modal
β β βββ SettingsModal.tsx # Global settings modal
β βββ context/
β β βββ EditModeContext.tsx # Context for handling edit mode
β β βββ LanguageContext.tsx # Context for handling internationalization
β β βββ ThemeContext.tsx # Context for handling theme (light/dark)
β β βββ translations.ts # Translation strings dictionary
β βββ data/
β β βββ planeamiento.json # Source of truth (synchronized from root)
β βββ App.tsx # Main orchestrator
β βββ main.tsx # Application entry point
β βββ types.ts # TypeScript type definitions
βββ public/ # Static assets
βββ index.html # Base HTML template
The file src/data/planeamiento.json serves as the default data source for the application.
Note
This repository includes a sample planeamiento.json to demonstrate the application's capabilities. To use this viewer for your own course, simply replace the content of src/data/planeamiento.json with your own syllabus data following the required structure.
This separation between data and presentation logic allows for:
- Maintainability: Updating the syllabus content (topics, objectives, evaluations) without touching React code.
- Scalability: The application scales automatically to render any number of weeks defined in the JSON.
- Type Safety: Although data is JSON, it is cast to the
SyllabusEntryinterface at runtime to ensure data integrity throughout the application.
The planeamiento.json file now features a root structure that includes metadata and weeks:
Global course information that feeds both the application Header/Footer and MyST configuration:
title,semester,university,descriptionauthors: List of authors.
Configuration settings for the application:
unitLabel: Custom label for the time unit (e.g., "Week", "Session", "Module").
Each entry in the weeks array represents a week of classes and contains:
week: Sequential week number.title: Main title of the session.subtitle: Optional subtitle or topic description.content: List of topics to cover.objectives: Specific learning objectives.activities: Description of dynamic activities (labs, workshops).evaluation: Array of objects defining the type (Formativa/Sumativa) and description of the assessment.references: List of bibliographic citations in simplified APA format.
{
"week": 1,
"title": "Introduction to Physics",
"subtitle": "Fundamental Concepts",
"content": [
"Units and unit conversion",
"SI units",
"dimensional analysis",
"conversions"
],
"objectives": [
"Distinguish between standard units and systems of units.",
"List the fundamental units of the International System of Units.",
"Employ multiples and prefixes of metric units.",
"Use conversion factors to convert units within a system or from one system of units to another."
],
"activities": "Workshop 'Physics in the Kitchen': Estimate and convert quantities from complex recipes to SI units.",
"evaluation": [
{
"type": "Formativa",
"description": "Classwork: Collaborative resolution of complex dimensional conversion problems."
}
],
"references": [
{
"text": "[1] Wilson, J., Buffa, A., & Lou, B. (2007). FΓsica (6.Βͺ ed.). Pearson-Prentice Hall.",
"pages": "Secciones 1.1 a 1.5, pΓ‘g. 23-25"
}
]
}The application implements a robust data management system:
- Auto-Save: All changes made in Edit Mode are automatically saved to the browser's
localStorage. This ensures work is not lost if the tab is closed. - Reset: A "Reset Data" button permits reverting all local changes to the initial state defined in
planeamiento.json. - JSON Import/Export:
- Users can export their current state as a JSON file.
- Users can import external JSON files.
- Validation: Recent implementation includes Zod schema validation. When importing a JSON file, the application strictly validates that the file structure matches the expected schema exactly (including nested fields like
weeks,metadata, etc.) before applying changes. This prevents corruption of the application state.
This project was developed with the active assistance of Antigravity, an AI agent from Google Deepmind.
- Scaffolding: Initialization of the Vite project and configuration of development tools (ESLint, PostCSS).
- Component Architecture: Refactoring of monolithic
App.tsxinto a modular architecture (Header,SearchBar,TimelineGrid). - Instructional Design: Generation of innovative and student-centered activities and evaluations for the 16 weeks.
- Data Refactoring: Migration from flat text fields to typed structures (e.g., formative vs summative evaluations).
- Dark Mode: Complete implementation of theme toggling (Light/Dark) using
ThemeContextand Tailwinddark:classes. - Documentation: Automatic generation of JSDoc and maintenance of the README.
The project has verbatimModuleSyntax: true enabled in tsconfig.json. This means all type imports must explicitly use the type syntax.
Incorrect:
import { ReactNode } from 'react';Correct:
import { type ReactNode } from 'react';For a list of common errors and their solutions, please refer to TROUBLESHOOTING.md.
# Install dependencies
npm install
# Start development server (default port 5173)
npm run devThe project uses vite-plugin-singlefile to bundle all code (HTML, JS, CSS) into a single HTML file. This allows running the application locally without needing a web server, avoiding CORS issues with the file:// protocol.
# Generate portable file in /dist/index.html
npm run buildOnce built, the dist/index.html file is completely standalone and can be opened directly in any browser.
Β© 2026 gerardolacymora
