Julien Lengrand-Lambert 16ae2a1430 Creating the project
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00
2025-11-11 10:06:56 +01:00

Is It Christmas?

A simple, delightful website that tells you whether today is Christmas Day (December 25th).

Features

  • 364 Days of the Year: Shows "NO" with a sad smiley face when it's not Christmas
  • Christmas Day: Shows "YES" with festive falling snow animation
  • Client-Side Date Checking: Works offline using your browser's local time
  • Responsive Design: Looks great on mobile, tablet, and desktop
  • Accessibility: Supports prefers-reduced-motion for users who prefer reduced animations
  • Performance Optimized: 60fps snow animation with particle count optimization

Tech Stack

  • Backend: Java 21 with standard library HttpServer (no frameworks)
  • Frontend: Vanilla HTML, CSS, and JavaScript (no frameworks or libraries)
  • Deployment: Docker Compose with nginx for static files
  • Zero Dependencies: Minimal, lightweight implementation

Quick Start

# Build and run
docker compose -f docker/docker-compose.yml up --build

# Access the application
open http://localhost

Local Development

Backend:

cd backend
javac -d build src/main/java/christmas/*.java
java -cp build christmas.Main

Frontend:

cd frontend
python3 -m http.server 80

API

GET /api/christmas

Returns whether today is Christmas Day.

Response:

{
  "isChristmas": false,
  "date": "2025-11-11"
}

Project Structure

├── backend/
│   └── src/main/java/christmas/
│       ├── ChristmasChecker.java    # Date logic
│       ├── ChristmasServer.java     # HTTP server
│       └── Main.java                # Entry point
├── frontend/
│   ├── index.html                   # UI structure
│   ├── styles.css                   # Styling & animations
│   └── script.js                    # Date check & snow animation
└── docker/
    ├── Dockerfile.backend           # Java container
    ├── Dockerfile.frontend          # nginx container
    └── docker-compose.yml           # Orchestration

Features Detail

Non-Christmas Day (364 days/year)

  • Large "NO" text in red
  • Animated sad smiley face
  • Current date display
  • Responsive sizing

Christmas Day (December 25th)

  • Large "YES" text in green
  • Festive "Merry Christmas" message
  • Falling snow animation (Canvas API)
  • 75-150 particles optimized by screen size
  • Pauses when tab is hidden (Page Visibility API)
  • Respects prefers-reduced-motion

Midnight Transitions

  • Automatically reloads at midnight to update the display
  • Handles December 24→25 and December 25→26 transitions

Development

Built following the Specify workflow:

  • Spec-first planning
  • User story-driven development
  • Constitution-compliant (minimal dependencies, YAGNI principles)
  • MVP-first implementation (P1: Non-Christmas day, P2: Christmas day)

Performance

  • Page load: < 2 seconds
  • Date check: < 1 second
  • Snow animation: 30-60 FPS
  • Mobile optimized: 75 particles
  • Desktop: 150 particles

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

License

This is a demonstration project built with Claude Code.

Description
No description provided
Readme 122 KiB
Languages
Shell 75.2%
JavaScript 10.4%
Java 8.9%
CSS 4.3%
HTML 1.2%