Skip to content

harsh98trivedi/6174-Constant

Repository files navigation

6174 | Kaprekar's Constant Visualisation

Meta Image

An interactive, premium web application built with Svelte and Tailwind CSS to visualize the mathematical routine that leads to the mystical constant 6174. This project is a tribute to the beauty of number theory and the groundbreaking work of Indian mathematician D.R. Kaprekar.

✨ Features

  • Interactive Kaprekar Routine: Input any 4-digit number (strictly enforced) and watch it converge to 6174 in 7 steps or less.
  • Lottery Machine Animation: A high-energy randomization feature that cycles through numbers with mechanical "click" feedback.
  • Premium Hybrid Haptics:
    • Physical Haptics: Tactile vibrations for mobile users via web-haptics.
    • Mechanical Audio: Synthesized "click" sounds for desktop users for a tactile feel across all devices.
  • Modern Glassmorphism UI: A sleek, dark interface with vibrant gradients, blurred surfaces, and a subtle film grain effect.
  • Educational Deep Dive: Learn about the history of Dattatreya Ramchandra Kaprekar and the unique properties of the constant.
  • Fully Responsive & SEO Ready: Optimized meta-tags, comprehensive social sharing (Open Graph/Twitter), and fluid layouts for all screen sizes.

🚀 Getting Started

To run this project locally, follow these steps:

  1. Clone and Install Dependencies:

    npm install
  2. Start Development Server:

    npm run dev

    To access the site on your mobile phone over the same Wi-Fi, the server is configured to host over the network by default.

  3. View in Browser:

    • Local: http://localhost:5173
    • Network: http://192.168.x.x:5173 (Check your terminal for the exact IP)

🛠 Tech Stack


Made with ❤️ by Harsh Trivedi

About

An interactive tribute to the beauty of number theory and the work of D.R. Kaprekar.

Topics

Resources

Stars

Watchers

Forks

Contributors