How gymnd-informatik/teachertodoscreen works
Main Components
• Frontend (Root):
• HTML (index.html): Displays tasks, events, and announcements.
• JavaScript (script.js): Fetches and dynamically updates content from output.json, manages mode (light/dark) and pagination.
• CSS (style.css): Provides styles and theming (including light and dark mode support).
• Backend/Admin:
• HTML (admin/index.html): Provides administrator interface for managing content.
• JavaScript (admin/script.js): Integrates Quill for rich text editing, data fetching and updating display for events.
• CSS (admin/style.css): Provides styling for the admin panel.
• PHP Endpoint (admin/saveFile.php): Handles POST requests for content saving to the root output.json.
• .htaccess (in admin): Enforces HTTP basic authentication to protect the backend.
• Data Storage:
• JSON File (output.json): Acts as the central storage repository for events and tasks that the frontend displays.
• Auxiliary Files & Scripts:
• PHP file at the root (saveFile.php): Processes frontend POST requests.
• Shell scripts (within the scripts directory): Likely for installation, deployment, or maintenance tasks (e.g., install.sh, on.sh, off.sh, crontab).
Relationships and Data Flow
• The Frontend fetches updated event/task data from output.json via script.js.
• The Admin Panel, secured via .htaccess, allows users to update event details. Changes are sent via POST requests to admin/saveFile.php (or the corresponding PHP endpoint) which writes updates to output.json.
• The PHP scripts (both in the admin and at the root) act as middleware between the user interface and the JSON data file.
• Deployment and maintenance scripts are auxiliary elements that support the overall system.
Architectural Patterns and Technologies
• Separation of Concerns: The project is separated into two primary zones (frontend for presentation and admin for content management).
• Client-Side Dynamic Data Handling: JavaScript fetches JSON data dynamically.
• PHP as a simple backend for data processing.
• Basic authentication via Apache (.htaccess) for securing the admin panel.
• Lightweight web application architecture (not a typical MVC, but with clear separation between display and content management).
Final Touches
• Be as detailed as possible by breaking down components into sub-elements (like showing that the admin panel includes a rich text editor sub-component).