A minimalist, responsive digital clock application built with React and TailwindCSS. Simple, clean, and functional.
- Real-time Clock: Updates every second with precise time
- Date Display: Shows the current date in a readable format
- Dark/Light Mode: Toggle between dark and light themes
- 12/24 Hour Format: Switch between 12-hour and 24-hour time formats
- Responsive Design: Works on all devices and screen sizes
- Full Screen Background: Fills the entire screen with the theme color
- Title Updates: Browser tab title updates with the current time
- Node.js (v14 or higher)
- npm (v6 or higher)
For Unix/Linux/macOS:
./scripts/setup.sh
For Windows:
scripts\setup.bat
These scripts will check your environment, install dependencies, and offer to start the application for you.
We provide convenient scripts for common package operations:
For Unix/Linux/macOS:
./scripts/package-manager.sh [command]
For Windows:
scripts\package-manager.bat [command]
Available commands:
install
- Install dependenciesclean
- Clean build artifacts and cachesupdate
- Update dependenciesaudit
- Run security auditstart
- Start the development serverbuild
- Build for productionhelp
- Show help message
For example:
./scripts/package-manager.sh start
-
Clone the repository:
git clone https://github.com/msadeqsirjani/digital-clock.git cd digital-clock
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run dev
- Start the development servernpm run build
- Build for productionnpm run preview
- Preview the production buildnpm run start
- Start the development server and open in browsernpm run setup
- Install dependenciesnpm run clean
- Clean build artifacts and cachenpm run prepare
- Clean and reinstall dependenciesnpm run restart
- Clean, reinstall, and restart the development server
To create a production build:
npm run build
The built files will be in the dist
directory.
- React
- TypeScript
- TailwindCSS
- Vite
- Lucide Icons
- Click the sun/moon icon to toggle between dark and light modes
- Click the "12H"/"24H" button to switch time formats
This project is licensed under the MIT License - see the LICENSE file for details.