Off Work Countdown is a Next.js-based web application that helps you keep track of the time remaining until the end of your workday. With a sleek and interactive interface, this app provides a visual countdown and progress bar to make your workday more manageable.
- Set custom work start and end times
- Real-time countdown display
- Visual progress bar
- Optional 15-minute reminder before the end of work
- Animated gradient background option
- Progressive Web App (PWA) support for offline use
- Responsive design for various devices
- Multi-language support (i18n)
- Support for custom salary calculation
- Next.js 14 (App Router)
- React
- TypeScript
- Tailwind CSS
- Framer Motion
- next-pwa
- i18next
- Clone the repository:
git clone https://github.com/ififi2017/Off-Work-Countdown.git- Install dependencies:
cd Off-Work-Countdown
npm install- Configure the environment:
# Create .env.local file
cp .env.example .env.local
# Edit .env.local and set your base URL
NEXT_PUBLIC_BASE_URL=http://localhost:3000- Run the development server:
npm run dev- Open http://localhost:3000 with your browser to see the result.
The site configuration is centralized in config/site.ts:
export const siteConfig = {
name: "Off Work Countdown",
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || 'https://off.rainif.com',
github: "https://github.com/ififi2017/Off-Work-Countdown",
themeColor: "#F3F4F6",
} as const;Language configuration is managed in i18n-config.ts:
export const defaultLocale = 'en'
export const locales = ['en', 'zh-CN', 'zh-TW', ...] as const
// Language code mapping
export const languageMapping = {
'zh': 'zh-CN',
'zh-Hans': 'zh-CN',
// ... more mappings
}
// Language display names
export const languageNames = {
'en': 'English',
'zh-CN': '简体中文',
// ... more names
}- Set your work start and end times using the dropdown menus.
- Toggle the reminder switch if you want a notification 15 minutes before the end of work.
- Enable the animated gradient background if desired.
- Click "Start Countdown" to begin tracking your workday.
- The app will display the remaining time and a progress bar.
- You can return to the settings at any time by clicking the "Return" button.
- Use the language selector to switch between available languages.
This app supports Progressive Web App features, allowing you to install it on your device and use it offline. To install:
- Open the app in a supported browser (e.g., Chrome, Edge).
- Look for the install prompt in the address bar or menu.
- Follow the prompts to install the app on your device.
Contributions are welcome! Please feel free to submit a Pull Request.
We're looking to expand our app's language support. If you'd like to contribute translations:
- Fork the repository and create a new branch for your language.
- Add your language code to
localesarray ini18n-config.ts. - Add language mapping and display name if needed.
- Create translation files in
public/locales/[lang]/:translation.json- for UI stringsseo.json- for SEO metadata
- Test the app thoroughly with the new language.
- Submit a pull request with your changes.
This project is open source and available under the MIT License.
Special thanks to:
- @Google Gemini 3 Pro Powerful front-end AI generation capabilities
- @v0.dev AI assistance in component design
- @cursor.com AI-powered coding assistance
- @claude.ai and @chatgpt.com Large language model support in development
- @vercel.com Hosting and deployment services
- @Cloudflare CDN services
