How tabelaturnot/tabelaturno works
Main Components
• Static Web Content:
• index.html: The main HTML file that structures the web page.
• main.css: The stylesheet for styling the page.
• table_script.js: The JavaScript file that controls dynamic behaviors (for rendering or updating the shift work table).
• PWA Enhancements:
• manifest.json: Defines the application’s metadata and is used when the app is added to a mobile home screen.
• service-worker.js: Provides caching and offline functionality as part of the PWA support.
• Supporting Artifacts:
• 404.html: Handles error pages.
• GitHub workflow and configuration files (.github directory) that automate testing or syncing, though these are only relevant for development/CI/CD rather than runtime.
• Hosting/Deployment:
• GitHub Pages acts as the static hosting service that delivers the files to the end-user's browser.
Relationships and Interactions
• Client (User’s Browser):
• Loads the static assets (index.html, main.css, table_script.js) from GitHub Pages.
• Reads manifest.json to install as a PWA (if supported by browser) and interacts with the service worker.
• The service worker intercepts network requests to cache resources and provides offline access.
• Development & Deployment Pipeline:
• GitHub workflows (.github/workflows) are set up for automated tasks like syncing or building/deployment. Though they play no part in runtime, they ensure the latest version gets published reliably.
Architectural Patterns and Design Principles
• Static Web Architecture:
• With no traditional backend server, the structure follows a “pure client-side” approach.
• Progressive Enhancement:
• The inclusion of PWA elements (manifest and service worker) adds offline capabilities and improved performance.
• Clear Separation of Concerns:
• Structure separates presentation (HTML/CSS) from behavior (JavaScript) and functionality (service worker for caching).
Relevant Technologies
• HTML, CSS, JavaScript – for core web presentation and functionality.
• Service Worker API and Web Manifest – for PWA features.
• GitHub Pages – as the static hosting environment.
• GitHub Actions (workflows) – for CI/CD processes during development.
Elements
• "User Browser" (client) that loads HTML, CSS, JavaScript.
• "manifest.json" and "service-worker.js" in a "PWA Components" section.
• "GitHub Pages" as the hosting infrastructure.
• Labels and Visual Distinctions:
• Use clear labels (e.g., “Static Assets”, “PWA Components”, “Hosting”) to differentiate sections.
• Keep it detailed by dividing it into as many meaningful components as possible while still clearly showing the flow:
1. GitHub Pages delivering assets.
2. Client-side rendering and execution (HTML, CSS, JS).
3. Service Worker handling caching and offline functionality.
4. Manifest enabling PWA installation.
5. CI/CD pipelines (if desired) for automating updates and deployments.