A minimal, customizable online chess clock built with Next.js, React, TypeScript, and Tailwind CSS.
[Quick Links: Introduction · Tech Stack · Prerequisites / Requirements · Installation · Configuration · Usage · Project Structure · Features · Development · Contributing · License · FAQ]
Chess Timer is a web‑based chess clock that lets players set game duration, increment, and choose between horizontal or vertical layouts. It offers several visual themes and runs entirely in the browser, making it easy to start a timed game without installing any software.
- Framework: Next.js (v16)
- Language: TypeScript
- UI Library: React 19
- Styling: Tailwind CSS 3
- Icons: lucide‑react
- Build Tools: Turbopack (via
next dev), ESLint, PostCSS
- Node.js (>= 18)
- npm, pnpm, or yarn
- Internet connection for fetching dependencies
# Clone the repository
git clone https://github.com/Janhvibabani/Chess-Timer.git
cd Chess-Timer
# Install dependencies (choose your package manager)
npm install
# or
pnpm install
# or
yarn installThe project uses the default Next.js configuration. If you need to customize Tailwind, edit tailwind.config.js. Environment variables are not required for the core functionality.
# Start the development server
npm run dev
# or
pnpm dev
# or
yarn devOpen http://localhost:3000 in a browser to view the timer.
# Build for production
npm run build
# or
pnpm build
# or
yarn build# Start the production server
npm start
# or
pnpm start
# or
yarn start| Path | Description |
|---|---|
app/ |
Next.js app router components |
app/components/ |
Reusable React components (e.g., dropdown) |
app/layout.tsx |
Global layout and metadata |
app/page.tsx |
Main page implementation |
public/ |
Static assets (icons, images) |
styles/ or globals.css |
Global Tailwind CSS imports |
tsconfig.json |
TypeScript compiler options |
package.json |
Scripts, dependencies, and project metadata |
- Adjustable total time and increment per move
- Horizontal and vertical layout options
- Multiple visual themes (dark / light)
- Responsive design for desktop and mobile browsers
- Fully client‑side; no backend required
# Run ESLint
npm run lint
# or
pnpm lint
# or
yarn lintThe project is set up with strict TypeScript settings and ESLint rules from eslint-config-next.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit your changes with clear messages.
- Open a pull request describing the changes.
Make sure linting passes before submitting.
This project is licensed under the MIT License. See the LICENSE file for details.
Q: Can I use this timer offline?
A: Yes. After the initial load, all assets are cached by the browser, allowing offline use.
Q: How do I change the theme colors?
A: Edit the Tailwind configuration in tailwind.config.js or modify the CSS classes in the component files.
Q: Is there support for chess variants (e.g., blitz, rapid)?
A: The timer’s duration and increment are fully configurable, so you can set any time control you need.