A festive New Year countdown application built with React, TypeScript, and Vite. Features an animated countdown timer, interactive gift box, and beautiful winter scene with fireworks.
- Countdown Timer: Real-time countdown to New Year with animated numbers displaying days, hours, minutes, and seconds
- Fireworks Display: Background video with fireworks and festive audio
- Interactive Gift Box: Click-to-open animated gift box that reveals a winter scene
- Winter Scene: Interactive SVG scene with clickable areas that zoom into different sections
- Smooth Animations: Powered by Framer Motion for fluid transitions and animations
- Responsive Design: Works across different screen sizes
- React 19.2.0 - UI library
- TypeScript - Type safety
- Vite 7.2.4 - Build tool and dev server
- React Router DOM 7.11.0 - Client-side routing
- Framer Motion 12.23.26 - Animation library
- ESLint - Code linting
new-year/
โโโ public/
โ โโโ happy-new-year.png # New Year image
โ โโโ winter-scene.svg # Interactive winter scene SVG
โ โโโ vite.svg
โโโ src/
โ โโโ assets/
โ โ โโโ audio/ # Fireworks audio
โ โ โโโ images/ # Fireworks image
โ โ โโโ video/ # Fireworks video
โ โโโ components/
โ โ โโโ CountdownTimer/ # Countdown timer component
โ โ โโโ GiftBox/ # Animated gift box
โ โ โโโ Navigation/ # Navigation bar
โ โ โโโ WinterScene/ # Interactive winter scene
โ โโโ pages/
โ โ โโโ CountdownPage.tsx # Main countdown page
โ โ โโโ GiftScenePage.tsx # Gift opening page
โ โโโ App.tsx # Main app component with routing
โ โโโ main.tsx # App entry point
โ โโโ index.css # Global styles
โโโ package.json
โโโ vite.config.ts
โโโ tsconfig.json
- Node.js (version 18 or higher recommended)
- npm, yarn, pnpm, or bun
- Clone the repository:
git clone <repository-url>
cd new-year- Install dependencies:
npm installStart the development server:
npm run devThe app will be available at http://localhost:5173 (or another port if 5173 is busy).
Create a production build:
npm run buildThe optimized files will be in the dist/ directory.
Preview the production build locally:
npm run previewRun ESLint to check for code issues:
npm run lintThis project is configured for automatic deployment to GitHub Pages using GitHub Actions.
-
Push your code to GitHub:
git init git add . git commit -m "Initial commit" git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git git push -u origin main
-
Enable GitHub Pages:
- Go to your repository on GitHub
- Navigate to Settings โ Pages
- Under Source, select GitHub Actions
- Save the settings
-
Deploy automatically:
- The workflow will automatically run on every push to the
mainormasterbranch - You can also manually trigger it from the Actions tab โ Deploy to GitHub Pages โ Run workflow
- The workflow will automatically run on every push to the
-
Access your site:
- After deployment, your site will be available at:
https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/- The deployment URL will be shown in the workflow summary
If you prefer to deploy manually or test the build locally with the correct base path:
# Build with the repository name as base path (replace REPO_NAME with your actual repo name)
BASE_PATH=/REPO_NAME/ npm run build
# The build output will be in the dist/ directory- Displays a real-time countdown to New Year 2026
- Shows animated days, hours, minutes, and seconds
- Features a background fireworks video with festive audio
- Numbers animate smoothly as they update every second
- Click the animated gift box to open it
- The gift box lid flies away and the box moves down
- After the animation, the interactive winter scene appears
- Click on different areas of the winter scene to zoom in
- Click again to zoom back out to the full view
- Use the navigation bar at the top to switch between pages
- The active page is highlighted in the navigation
- Real-time countdown calculation
- Animated number transitions using Framer Motion
- Automatically calculates time until next New Year
- Animated gift box with hat/lid
- Click interaction to trigger opening animation
- Smooth transitions with spring physics
- Loads and renders interactive SVG scene
- Clickable overlay areas for zoom functionality
- CSS animations for snow, letters, and penguins
- ViewBox manipulation for smooth zooming
- Audio autoplay may be blocked by browsers - users may need to interact with the page first
- The winter scene SVG is loaded dynamically from the public folder
- All animations use Framer Motion for smooth performance
Feel free to submit issues or pull requests if you'd like to contribute to this project.
This project is open source and available for personal use.
Happy New Year 2026! ๐