Releases: Amnoor/Digital-Clock-Program
v2.0.0 - Modular Architecture and User-Customizable Time Formats
Overview
Version 2.0.0 marks a major milestone for the Digital Clock Program, focusing on significant architectural improvements and introducing highly-requested user features. This release refactors the entire codebase into a modular structure for better maintainability and scalability. Highlighting this release is the new ability for users to select their preferred time format (12-hour or 24-hour), with the preference saved across sessions.
Highlights
Time Format Toggle with Preference Persistence, Complete Codebase Modularization, Enhanced User Interface and Styling, and Introduction of Breaking API Changes for a more robust architecture.
New Features
A user-configurable time format toggle has been introduced. Users can now switch between a 12-hour (AM/PM) and a 24-hour clock display. This preference is automatically saved to the browser's local storage, ensuring the user's selection persists on their next visit without requiring any manual setup.
Improvements
The entire JavaScript codebase has been refactored into distinct modules for the clock's core logic (modules/clock/index.js) and user preferences (modules/preferences/index.js). This modular design makes the code cleaner, easier to debug, and more scalable for future development. The styling has been updated to accommodate the new toggle switch, and the main clock element is now enclosed in a semantic <main> tag. Logging has also been enhanced to provide better traceability for the new features.
Breaking Changes
The startClock function is no longer available in the global scope of index.js and has been moved into its own dedicated module at modules/clock/index.js. Any external scripts or custom implementations directly calling this function will need to be updated to import it from the new module. The primary clock container has been changed from a div element to a main element, which may affect custom CSS or JavaScript selectors targeting the previous div#clock-box ID. The export method for the logging module has also been updated, which could affect certain module resolution setups.
Upgrade Guide
Docker Users
To upgrade to the latest version, pull the new v2.0.0 or latest tag from Docker Hub:
docker pull amnoorbrar/digital-clock
docker run --rm -p 8080:80 amnoorbrar/digital-clockBuilding from Source
To build this version from the source code:
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v2.0.0
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockFiles Modified
- .github (Folder, Unchanged):
- workflows (Folder, Unchanged):
- docker-push.yml (File, Unchanged)
- workflows (Folder, Unchanged):
- assets (Folder, Unchanged):
- background.jpg (File, Unchanged)
- clock-icon.svg (File, Modified)
- modules (Folder, Modified):
- clock (Folder, Added):
- index.js (File, Added)
- logs (Folder, Modified):
- index.js (File, Modified)
- prefer ences (Folder, Added):
- index.js (File, Added)
- clock (Folder, Added):
- style (Folder, Unchanged):
- style.css (File, Modified)
- .dockerignore (File, Modified)
- CONTIBUTING.md (File, Unchanged)
- Dockerfile (File, Unchanged)
- index.html (File, Modified)
- index.js (File, Modified)
- LICENSE (File, Unchanged)
- README.md (File, Unchanged)
Verification
This release has been successfully tested for the following:
- Correct functionality of the 12-hour and 24-hour time format toggle.
- Successful persistence and loading of user preferences from local storage.
- Integrity of the modularized codebase and all import/export paths.
- Continued core clock functionality without regressions after the refactor.
Links
- Repository: Digital Clock Program v2.0.0 (https://github.com/Amnoor/Digital-Clock-Program/tree/v2.0.0)
- Docker Hub: amnoorbrar/digital-clock (https://hub.docker.com/r/amnoorbrar/digital-clock)
- Changelog:
Contributors
- Amnoor Brar - Project Owner & Lead Developer
Full Changelog:
v1.2.1 - Enhanced Contribution Guidelines and Documentation
Overview
Version 1.2.1 is focused on improving the project's documentation and making it easier for the community to contribute. This release introduces a comprehensive CONTRIBUTING.md file that provides clear, step-by-step guidelines for the entire contribution process. The README.md file has also been updated to reflect the project's current dependencies and to streamline its content.
What's New
- Comprehensive Contribution Guidelines
- A new
CONTRIBUTING.mdfile has been added with detailed information on: - Branching strategy (
main,develop, feature, bugfix, etc.). - A full contribution workflow, from forking the repository to submitting a pull request.
- Commit message guidelines based on the Conventional Commits specification.
- The pull request process and what to include in the description.
- A new
- Updated Documentation
- The
README.mdhas been updated to remove the redundant "Contributing" section. - The "Built With" section has been corrected to show "BusyBox" instead of "Nginx" and "DockerSlim", accurately reflecting the current Docker image setup.
- The
Upgrade Guide
Docker Users
To upgrade, pull the latest image from Docker Hub:
docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latestBuilding from Source
To build this version from source:
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.2.1
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockCompatibility
This release is fully backward compatible with previous versions. No breaking changes have been introduced.
Files Modified
- .github (Folder, Unchanged):
- workflows (Folder, Unchanged):
- docker-push.yml (File, Unchanged)
- workflows (Folder, Unchanged):
- assets (Folder, Unchanged):
- background.jpg (File, Unchanged)
- clock-icon.svg (File, Unchanged)
- modules (Folder, Unchanged):
- logs (Folder, Unchanged):
- index.js (File, Unchanged)
- logs (Folder, Unchanged):
- style (Folder, Unchanged):
- style.css (File, Unchanged)
- .dockerignore (File, Unchanged)
- CONTIBUTING.md (File, Added)
- Dockerfile (File, Unchanged)
- index.html (File, Unchanged)
- index.js (File, Unchanged)
- LICENSE (File, Unchanged)
- README.md (File, Modified)
Verification
This release has been tested for:
- ✅ Clarity and completeness of the new
CONTRIBUTING.mdguide. - ✅ Accuracy of the updated
README.mdfile. - ✅ Continued core clock functionality without regressions.
Links
- Repository: Digital Clock Program v1.2.1
- Docker Hub: amnoorbrar/digital-clock
- Changelog:
Contributors
- Amnoor Brar - Project Owner & Lead Developer
Full Changelog:
v1.2.0 - Container Security and Enhanced Logging
Overview
Version 1.2.0 focuses on hardening the application's security and improving the robustness of the logging system. This release introduces a more secure Docker container environment by implementing a multi-stage build, a non-root user, and a minimal scratch base image. The logging module has also been significantly enhanced to support multiple log levels and provide more structured output. Additionally, the build pipeline has been simplified for better maintainability.
What's New
- Container Security Hardening
- Implemented a multi-stage Docker build process to reduce the final image size and attack surface.
- The application now runs as a non-root user (applicationuser) to mitigate potential security risks.
- The final image is now based on a minimal scratch image, and Nginx has been replaced with busybox httpd.
- Enhanced Logging
- The logging module has been refactored to support multiple log levels: error, warn, info, log, debug, and trace.
- Log messages are now consistently formatted with a timestamp and log level for easier debugging.
- A bug in the logging logic that prevented DEBUG mode from working correctly has been fixed.
- Simplified Build Pipeline
- The GitHub Actions workflow has been simplified by removing the DockerSlim optimization step, which reduces build complexity and reliance on external tools
Upgrade Guide
Docker Users
To upgrade, pull the latest image from Docker Hub:
docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latestBuilding from Source
To build this version from source:
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.2.0
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockCompatibility
This release is fully backward compatible with previous versions. No breaking changes have been introduced.
Files Modified
- .github (Folder, Modified):
- workflows (Folder, Modified):
- docker-push.yml (File, Modified)
- workflows (Folder, Modified):
- assets (Folder, Unchanged):
- background.jpg (File, Unchanged)
- clock-icon.svg (File, Unchanged)
- modules (Folder, Modified):
- logs (Folder, Modified):
- index.js (File, Modified)
- logs (Folder, Modified):
- style (Folder, Unchanged):
- style.css (File, Unchanged)
- .dockerignore (File, Modified)
- Dockerfile (File, Modified)
- index.html (File, Unchanged)
- index.js (File, Modified)
- LICENSE (File, Unchanged)
- README.md (File, Unchanged)
Verification
This release has been tested for:
- ✅ Successful multi-stage Docker image builds.
- ✅ Correct application behavior when running as a non-root user.
- ✅ Correct functionality of the enhanced logging system and DEBUG flag.
- ✅ Simplified and successful execution of the GitHub Actions build pipeline.
- ✅ Continued core clock functionality without regressions.
Links
- Repository: Digital Clock Program v1.2.0 (https://github.com/Amnoor/Digital-Clock-Program/tree/v1.2.0)
- Docker Hub: amnoorbrar/digital-clock (https://hub.docker.com/r/amnoorbrar/digital-clock)
- Changelog:
- Compare v1.1.0...v1.2.0 (v1.1.0...v1.2.0)
- Compare v1.0.2...v1.2.0 (v1.0.2...v1.2.0)
- Compare v1.0.1...v1.2.0 (v1.0.1...v1.2.0)
- Compare v1.0.0...v1.2.0 (v1.0.0...v1.2.0)
- Changelog:
Contributors
- Amnoor Brar (https://github.com/Amnoor) - Project Owner & Lead Developer
Full Changelog:
v1.1.0 - Modular Logging and Build Optimizations
Overview
Version 1.1.0 marks a shift towards a more modern and maintainable codebase. This release introduces a modular logging system for improved debugging and refactors the project to use ES modules. Additionally, the Docker build process has been optimized for smaller and faster image creation.
What's New
- Modular Logging System
- A new centralized logging module has been introduced at
modules/logs/index.js. - All console output is now handled by a
logDebugfunction, which provides structured, timestamped messages for errors, warnings, and general logs. - This refactoring improves code clarity and makes debugging more efficient.
- A new centralized logging module has been introduced at
- ES Module Integration
- The project has been updated to use modern JavaScript ES modules, enabling better code organization and dependency management.
index.jsis now loaded as a module inindex.html, setting the foundation for future feature development.
- Build Optimization
- The
.dockerignorefile has been refined to exclude unnecessary files (likeREADME.md) and remove redundant entries. - These changes reduce the Docker build context, resulting in smaller and more efficient images.
- The
Upgrade Guide
Docker Users
To upgrade, pull the latest image from Docker Hub:
docker pull amnoorbrar/digital-clock:v1.1.0
docker run --rm -p 8080:80 amnoorbrar/digital-clock:v1.1.0Alternatively, you can use the latest tag:
docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latestBuilding from Source
To build this version from source:
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.1.0
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockCompatibility
This release is fully backward compatible with previous versions. No breaking changes have been introduced.
Files Modified
- .github (Folder, Unchanged):
- workflows (Folder, Unchanged):
- docker-pudh.yml (File, Unchanged)
- workflows (Folder, Unchanged):
- assets (Folder, Unchanged):
- background.jpg (File, Unchanged)
- clock-icon.svg (File, Unchanged)
- modules (Folder, Added):
- logs (Folder, Added):
- index.js (File, Added)
- logs (Folder, Added):
- style (Folder, Unchanged):
- style.css (File, Unchanged)
- .dockerignore (File, Modified)
- Dockerfile (File, Unchanged)
- index.html (File, Modified)
- index.js (File, Modified)
- LICENSE (File, Unchanged)
- README.md (File, Unchanged)
Verification
This release has been tested for:
- ✅ Correct functionality of the new modular logging system.
- ✅ Successful loading and execution of ES modules.
- ✅ Optimized Docker image builds.
- ✅ Continued core clock functionality without regressions.
Links
- Repository: Digital Clock Program v1.0.2
- Docker Hub: amnoorbrar/digital-clock
- Changelog:
Contributors
- Amnoor Brar - Project Owner & Lead Developer
Full Changelog:
v1.0.2 - Enhanced Stability and Developer Experience
Overview
Version 1.0.2 is focused on improving the robustness and developer experience of the application. This release introduces critical error handling to prevent silent failures and adds more descriptive console logging for easier debugging. It also includes a minor documentation correction.
What's New
- Enhanced Stability and Logging
- Error Handling: The clock script now gracefully handles situations where the main
clockdisplay element is missing from the page, preventing potential script crashes. An error is logged to the console to notify developers of the issue. - Input Validation: Added a check to the
startClockfunction to ensure the update interval is a valid positive number. This prevents the clock from failing if an invalid interval (e.g., zero or a negative number) is provided. - Improved Logging:
- A "Digital Clock Program Initialized" message is now logged to the console to confirm the script has loaded.
- Success messages are logged when the clock element is found and the clock starts, including the update interval being used. This provides clear feedback on the clock's operational status.
- Error Handling: The clock script now gracefully handles situations where the main
- Documentation Fix
- README Update: Corrected a minor typo in the table of contents, changing the "Contribution" link to "Contributing" for consistency.
Upgrade Guide
Docker Users
To upgrade, pull the latest image from Docker Hub:
docker pull amnoorbrar/digital-clock:v1.0.2
docker run --rm -p 8080:80 amnoorbrar/digital-clock:v1.0.2Alternatively, you can use the latest tag:
docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latestBuilding from Source
To build this version from source:
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.0.2
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockCompatibility
This release is fully backward compatible with previous versions. No breaking changes have been introduced, and existing Docker or CI/CD setups will continue to work without modification.
Files Modified
- .github (Folder, Unchanged):
- workflows (Folder, Unchanged):
- docker-pudh.yml (File, Unchanged)
- workflows (Folder, Unchanged):
- assets (Folder, Unchanged):
- background.jpg (File, Unchanged)
- clock-icon.svg (File, Unchanged)
- style (Folder, Unchanged):
- style.css (File, Unchanged)
- .dockerignore (File, Unchanged)
- Dockerfile (File, Unchanged)
- index.html (File, Unchanged)
- index.js (File, Modified)
- LICENSE (File, Unchanged)
- README.md (File, Modified)
Verification
This release has been tested for:
- ✅ Graceful failure when the #clock element is not found.
- ✅ Correct error logging for invalid update intervals.
- ✅ Clear and informative console logs during initialization and startup.
- ✅ Continued core clock functionality.
- ✅ Documentation accuracy.
Links
- Repository: Digital Clock Program v1.0.2
- Docker Hub: amnoorbrar/digital-clock
- Changelog:
Contributors
- Amnoor Brar - Project Owner & Lead Developer
Full Changelog:
v1.0.1 - Bug Fixes, Accessibility Enhancements & Responsive Design
Overview
Version 1.0.1 is a maintenance and enhancement release that addresses a critical time display bug, implements comprehensive accessibility improvements, and introduces a fully responsive design system. This update ensures the digital clock works correctly across all times of day and provides an optimal experience on devices of all sizes.
What's Fixed
Critical Bug Fix
- AM/PM Display Bug: Resolved incorrect AM/PM indicator showing "AM" for all afternoon and evening times (1 PM - 11 PM)
- Root cause: AM/PM determination was based on converted 12-hour format instead of original 24-hour format
- Solution: Introduced dedicated
hours24variable to preserve original time format before conversion - Clock now correctly displays AM for midnight through 11:59 AM and PM for noon through 11:59 PM
What's New
Accessibility Enhancements
- Screen Reader Support: Added
aria-live="polite"attribute to clock element- Announces time updates non-intrusively to users with visual impairments
- Respects ongoing screen reader navigation without interruption
- SEO Optimization: Implemented meta description tag for improved search engine visibility
- Performance: Added
deferattribute to script tag for optimized, non-blocking JavaScript loading - HTML Structure: Standardized comments and improved semantic markup
Responsive Design System
- Fluid Layout: Replaced fixed pixel dimensions with responsive viewport units (vw/vh)
- Clock container now uses 100vw width and 30vh height for proportional scaling
- Layout adapts seamlessly from mobile (320px) to large desktop monitors
- Fluid Typography: Implemented CSS
clamp()function for automatic font scaling- Font size ranges from 2rem minimum to 4rem maximum based on viewport width
- Smooth scaling eliminates need for traditional media query breakpoints
- Enhanced Centering: Added flexbox properties to clock container for consistent alignment
- Mobile Optimization: Added
overflow-x: hiddento prevent horizontal scrolling - Background Improvements: Enhanced image positioning with center alignment and no-repeat properties
Code Quality Improvements
- JavaScript: Enhanced JSDoc comments and improved variable naming conventions
- Clear distinction between
hours24(original format) andhours12(converted format) - Better documentation for function parameters and return values
- Clear distinction between
- HTML: Cleaner structure with improved readability and maintainability
- CSS: Modern responsive techniques with better organization
Upgrade Guide
Docker Users
Pull the latest image:
docker pull amnoorbrar/digital-clock:v1.0.1
docker run --rm -p 8080:80 amnoorbrar/digital-clock:v1.0.1Or use the latest tag:
docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latestBuilding from Source
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.0.1
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockCompatibility
- Backward Compatible: All changes maintain compatibility with v1.0.0 deployment infrastructure
- No Breaking Changes: Existing Docker configurations and CI/CD pipelines work without modification
- Browser Support: Enhanced support for modern browsers with responsive and accessibility features
Files Modified
index.js- Fixed AM/PM logic, improved documentationindex.html- Added accessibility attributes and performance optimizationsstyle/style.css- Implemented responsive design with fluid typography
Technical Stack
- Frontend: HTML5, CSS3, JavaScript (ES6)
- Server: Nginx
- Container: Docker, DockerSlim
- CI/CD: GitHub Actions
- Version Control: Git, GitHub
Verification
This release has been tested for:
- ✅ Correct AM/PM display across full 24-hour cycle
- ✅ Responsive layout on mobile, tablet, and desktop devices
- ✅ Screen reader compatibility and announcements
- ✅ Smooth font scaling across viewport sizes
- ✅ No horizontal scrolling on any screen size
- ✅ Optimal page load performance
- ✅ Proper asset loading and functionality
Links
- Repository: Digital Clock Program v1.0.1
- Docker Hub: amnoorbrar/digital-clock
- Changelog: Compare v1.0.0...v1.0.1
Contributors
- Amnoor Brar - Project Owner & Lead Developer
Full Changelog: v1.0.0...v1.0.1
v1.0.0 - Initial Release: Digital Clock with Docker & CI/CD
Overview
This is the first production release of the Digital Clock web application. It delivers a real-time digital clock with a modern glassmorphism interface, fully containerized with Docker and automated deployment through GitHub Actions.
What's New
Core Application
- Real-time digital clock updating every second
- 12-hour format with hours, minutes, seconds, and AM/PM indicators
- Modern glassmorphism UI with backdrop blur effects
- Responsive design with custom background image
- Clean, minimal interface built with vanilla JavaScript
Docker Containerization
- Built on
nginx:mainline-alpine3.22-slimbase image - Lightweight deployment with minimal footprint
- Application served on port 80
- Optimized with DockerSlim for reduced image size
- Available on Docker Hub at
amnoorbrar/digital-clock
Automated CI/CD Pipeline
- GitHub Actions workflow triggered on version tags (
v*) - Automated Docker image building and optimization
- Automatic publishing to Docker Hub with versioned and
latesttags - Integrated DockerSlim optimization in the build process
Documentation & Guidelines
- Comprehensive README with project overview
- Two installation methods: pre-built image or build from source
- Structured contribution workflow with branching strategy
- MIT License for open-source collaboration
- Docker Hub and GitHub badges for project status
Quick Start
Option 1: Using Pre-built Image
docker pull amnoorbrar/digital-clock:v1.0.0
docker run --rm -p 8080:80 amnoorbrar/digital-clock:v1.0.0Access the application at http://localhost:8080
Option 2: Building from Source
git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clockAccess the application at http://localhost:8080
Technical Stack
- Frontend: HTML5, CSS3, JavaScript (ES6)
- Server: Nginx
- Container: Docker, DockerSlim
- CI/CD: GitHub Actions
- Version Control: Git, GitHub
Files Added
index.html- Main application structureindex.js- Clock logic and time updatesstyle/style.css- Glassmorphism stylingassets/clock-icon.svg- Branding iconassets/background.jpg- UI backgroundDockerfile- Container configuration.dockerignore- Build optimization.github/workflows/docker-push.yml- CI/CD pipelineREADME.md- Project documentation