How anshumanmahato/happy-birthday-card works
Happy Birthday Card is a customizable web-based greeting with a build-time personalization flow and an interactive birthday experience. Setup supplies a recipient name and picture, optionally a scrolling message; the builder prepares the picture and markup, then generates the page. At runtime, the card can gate access by birthday date and otherwise guides the viewer through animated scenes to the greeting. The graph includes documented local and remote setup options. Styling and template relationships are shown only where the provided source establishes them; unsampled implementation details are not inferred.
Main entry points: init.js Setup Orchestrator · index.js Runtime Entry · animation.js Scene Animation · genIndex.js Page Generator
Components 16
Card Personalization
- Setup Orchestrator
builder/init.js - Local Inputs
local
Content Preparation
- Photo Resizer
builder/getPic.js - Message Markup
builder/generateMarkup.js - Page Generator
builder/genIndex.js
Birthday Experience
- Runtime Entry
src/js/index.js - Birthday Date Check
src/js/ext/openDate.js - Early/Late Pages
src/js/pages.js - Page Switcher
src/js/ext/setPage.js - Scene Animation
src/js/animation.js
Card Presentation
- HTML Template
src/template.html - Card Styles
src/scss/main.scss
Other components
- Card Creator
- Remote Photo
- Telegraph Message
- Card Viewer
Connections 15
- Card Creator → Setup Orchestrator: provides settings
README.md - Local Inputs → Setup Orchestrator: supplies local inputs
builder/init.js - Remote Photo → Setup Orchestrator: provides photo URL
builder/init.js - Telegraph Message → Setup Orchestrator: provides message URL
builder/init.js - Setup Orchestrator → Photo Resizer: processes photo
builder/init.js - Setup Orchestrator → Message Markup: formats message
builder/init.js - Setup Orchestrator → Page Generator: generates page
builder/init.js - Page Generator → HTML Template: reads template
builder/genIndex.js - Runtime Entry → Birthday Date Check: checks date
src/js/index.js - Runtime Entry → Page Switcher: sets alternate page
src/js/index.js - Runtime Entry → Early/Late Pages: selects page content
src/js/index.js - Runtime Entry → Scene Animation: starts animation
src/js/index.js - Page Switcher → Early/Late Pages: renders page data
src/js/index.js - Card Viewer → Scene Animation: interacts with card
src/js/animation.js - Scene Animation → Card Viewer: shows greeting
src/js/animation.js