A modular React, Vite and Tailwind app to perform countdown timer operations.
Countdown App is a modular React application scaffolded with Vite and styled using Tailwind CSS. It provides a clean interface for setting and running countdown timers, with the codebase split into reusable components for maintainability and scalability.
The application follows a modular structure, separating timer logic and UI into distinct components:
src/: Contains all React components and TypeScript logic
// Modular components handling timer state, display, and controlspublic/: Serves static assets for the app
// Static files and the entry HTML served by Vite
Timer copy: A backup/reference copy of the timer implementation
// Alternate version of the timer logic for reference
- Countdown Timer: Set hours, minutes, and seconds and watch the timer count down in real time
- Modular Components: Timer logic is broken into reusable pieces for easy maintenance and extension
- Reactive UI: React state drives live updates to the display on every tick
- Tailwind Styling: Utility-first CSS keeps the interface clean and responsive across devices
When a user starts a countdown:
- The user inputs the desired hours, minutes, and/or seconds
- React calculates the target end time from the current timestamp
- A
setIntervaldecrements the remaining time every second - The UI re-renders with updated values on each tick
- When the timer hits zero, it stops and signals completion to the user
- React Hooks:
useStateanduseEffectfor managing timer state and intervals - TypeScript: Type-safe props and logic across all components
- Modular Design: Separation of concerns with dedicated components for input, display, and controls
- Tailwind CSS: Rapid, responsive styling with utility classes
- Vite: Fast bundling and instant hot module replacement during development
- Interval Cleanup: Proper
clearIntervalusage insideuseEffectto prevent memory leaks
- Clone the repository:
git clone https://github.com/achille010/countdown-app.git
cd countdown-app- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser to
http://localhost:5173
- No persistent storage (timer resets on page refresh)
- No alarm or sound notification on completion
- No support for multiple simultaneous timers
- No backend integration
This is intentionally minimal to demonstrate a clean modular React + TypeScript + Tailwind setup.
- Node.js 18 or higher
- npm or yarn
- Web browser
Contributions are welcome! Feel free to fork this repository and submit pull requests for improvements.
MIT License - Read details from the LICENSE file
Built as a modular countdown timer app using React, TypeScript & Tailwind CSS