How mohammedadamdev/marriageinvitation works
Purpose and delivery model
A static, browser-only wedding invitation template. It presents event content, supports in-browser editing, persists edits locally, and can be deployed as static files. Primary entry point: index.html; styling and responsive/print presentation: styles.css; client behavior: script.js.
Invitation presentation shell
index.html defines the public invitation page: hero content, ceremony/reception details, gallery placeholders, RSVP/contact affordances, navigation, and the editing UI. It references bundled media under assets/, including assets/videos/hero-video-BkP1eoiB.mp4 and assets/audio/wedding-background-music.mp3.
Configuration and content precedence
Default invitation data is maintained in config.js, with config-template.json serving as a portable configuration shape/template. On page initialization, client logic applies configured content to the DOM and uses browser-local persisted edits when present. This establishes a static-default versus per-browser customization boundary: local changes are not shared with other visitors or deployments.
Browser-side editing and persistence
script.js owns the administrative interaction flow: open/close the edit panel (including keyboard shortcut), collect edits, update rendered invitation fields, and save state to localStorage. It also supports configuration download for manual backup. No server API, authentication, or shared database exists; browser storage is the sole persistence runtime.
Sharing and QR workflow
qr-generator.html is a separate static entry point for producing a shareable QR-code experience around the hosted invitation URL. The invitation itself is intended to be distributed by link, messaging channels, or a printed QR code. External map/contact destinations are content-level browser links rather than backend integrations.
Static hosting and local serving
The site runs in any modern browser and needs only static-file hosting. vercel.json provides Vercel deployment configuration; DEPLOYMENT.md documents deployment concerns. For local preview, serve.py can serve the repository through Python, avoiding browser file-origin restrictions where applicable. Other hosting services are optional deployment targets, not application dependencies.
Asset and visual customization boundary
Visual system, responsiveness, and print behavior are centralized in styles.css; content structure remains in index.html. Media is repository-hosted under assets/images, assets/audio, and assets/videos. tools/optimize_images.py is an offline asset-preparation utility, separate from the page runtime.
Main entry points: index.html Invitation page · script.js Client behavior · qr-generator.html QR generator · config.js Default invitation data
Components 15
Invitation runtime
Browser-only public invitation and local editing.
- Invitation page · Public invitation structure and editing UI.
index.html - Client behavior · Applies content, manages editing, and saves local changes.
script.js - Default invitation data · Static content defaults applied at initialization.
config.js - Config template · Portable configuration shape for manual use.
config-template.json - Visual system · Responsive and print presentation.
styles.css - Browser local storage · Per-browser edits; not shared or server-backed.
Sharing & hosting
Static delivery and QR sharing.
- QR generator · Creates a QR sharing experience for the hosted invitation URL.
qr-generator.html - Static hosting · Serves static files to browsers.
- Vercel deployment config
vercel.json - Deployment guide
DEPLOYMENT.md - Local preview server · Avoids browser file-origin restrictions during preview.
serve.py
Media & preparation
Repository-hosted media and offline optimization.
- Hero video
assets/videos/hero-video-BkP1eoiB.mp4 - Background music
assets/audio/wedding-background-music.mp3 - Image assets · Gallery and invitation imagery.
assets/images - Image optimizer · Prepares image assets outside the page runtime.
tools/optimize_images.py
Connections 16
- Static hosting → Invitation page: serves
- Vercel deployment config → Static hosting: configures
- Deployment guide → Static hosting: documents deployment
- Local preview server → Invitation page: serves locally
- Invitation page → Client behavior: loads
- Invitation page → Visual system: uses
- Invitation page → Hero video: embeds
- Invitation page → Background music: plays
- Invitation page → Image assets: renders
- Client behavior → Default invitation data: applies defaults
- Client behavior → Browser local storage: reads and saves edits
- Client behavior → Invitation page: updates invitation fields
- Config template → Default invitation data: defines portable shape
- Image optimizer → Image assets: prepares
- QR generator → Invitation page: encodes hosted URL
- QR generator → Static hosting: hosted with