A wedding invitation for phones, a link per guest, whose whole backend is the couple's Google Sheet.
In use for a real wedding. Shown here with an invented couple.
Project facts
- Role
- Solo: design, build, ship
- Timeline
- 9 days, 26 Oct to 3 Nov 2026
- Built with
- Claude Code
- ChatGPT
- Higgsfield
- Stack
- Astro 7
- TypeScript
- Tailwind CSS 4
- GSAP
- Lenis
- Google Apps Script
- Google Sheets
- Vercel
The One Invitation a Couple Sends
A digital invitation is a settled product. The paid services sell much the same page from a template: a cover with the guest's name, music, the couple, a countdown, a map, a gallery, RSVP, wishes, bank details. They answer what a guest needs and look like what they are.
This one began with a couple who wanted guests to leave a message without a database or a server to run, and with a plain rule for the design: on the day a couple send their only invitation, it must not look generated. So the question became how far a static page and a spreadsheet can go, and how far the page can get from a template when every ornament, word and motion is chosen for one wedding.
Guests open it from a link in a chat, on a phone, often an older one, and most will read it once. The phone is the design's first case, and everything else follows from it.
The real invitation is in use, with guests posting. Its couple stay private. What is shown here is a portfolio copy of the same code, re-dressed: the couple 林茉莉 and 沈望舒 are generated people, the garden in Suzhou and its lane are invented, and so are the banks, the guests and their wishes. Nothing here is a photo of anyone. The page says so in its footer.


From a Link in a Chat to a Wish in the Moon
- A link with a name in it. Every guest gets their own address,
/苏晚, written with their WhatsApp message by one command. The page reads the name before first paint, so the cover is theirs from the start. There is no list of guests on the site. In the chat the link shows the couple, in a preview of 1200 by 630, and every page says noindex: it is for the people invited. - A tap opens it. Browsers allow sound only after a tap, so the tap starts the music, already in the phone. A bridal veil comes over the cover and parts, and the page comes out of the light.
- Who, when, where. A moon gate, a verse under a red seal, the couple out of the dark. The days left count up once and then change once a minute; on the day itself the rings give way to a line. A card carries the lunar date beside the date, with Google Maps and a Google Calendar entry one tap away.
- The photos. A strip to swipe on a phone, which nudges once to show that it slides, and a viewer over the page with arrows, a swipe, Esc and the phone's back button.
- A gift, without hunting for a number. A red envelope breaks its gold seal and two cards rise, each copied by its own button. A wish list marks what is taken, so no one gives the same twice, and never says who took it. A guest can take a mark back; a fund on the list closes it and opens the envelope.
- One form. Name already filled; attending, not attending or not sure; how many, asked only of those coming; a wish; a photo. The photo is a print the moment it is chosen, while the phone makes the real copy. Sent, it is in the book at once. A guest who answers again adds a second row, and the couple see both.
- A moon of wishes (this copy only). Past the book, the wishes hang as a full moon, each on its own thread. A finger going sideways parts the strands, a tap reads one, and a wish just sent falls in.
The Same Page on a Wide Screen
A laptop gets the same words and photos. The moon window widens until the photo fills the screen, ending on the same photo in the same place as the phone's veil. The hero's words stand beside the photo, the couple stand side by side, the gallery becomes a grid, and the form sits beside the book it fills. Nothing is a separate build: one page, reflowing, with targets of at least 44 px at every width.






A Static Page and One Spreadsheet
The page is static files on Vercel. Any path that is not a file answers with the page, so a guest's name can be the address. Everything that changes lives in one Google spreadsheet, behind one Apps Script file. There is no Supabase, no Firebase, no server to run and no monthly bill.
A Spreadsheet, and Not Supabase
The couple asked for no database and no server to run, and a real database would still have needed an admin page for them to hide a wish or answer one. A spreadsheet is the store and the admin screen at once, and a couple already know it. The options were weighed on 26 October:
| Option | Guests see wishes | The couple manage them in | Cost and limits | Verdict |
|---|---|---|---|---|
| Google Sheets and Apps Script | At once | The sheet, on any phone | Free. 30 simultaneous runs per user, 6 min a run, 100 emails a day | Chosen |
| Supabase, Firebase | Yes | An admin page still to build | Supabase free projects pause when idle | A database the couple asked not to have |
| Cloudflare Worker with D1 or KV | Yes | An admin page still to build | Free tier is ample | A real backend, more to build and own |
| Google Form and a published CSV | After a delay | The sheet | Free. A published tab is public in full | Kept in the code as a fallback |
| Formspree, Web3Forms, EmailJS | No, email only | The inbox | About 50 to 250 a month free | Private messages only |
| Giscus, Disqus | Yes | Their dashboards | Guests need an account, or see ads | Wrong audience |
What a database would have given has to be written by hand instead: a lock in place of transactions, tick boxes in place of a permissions table, a cache in place of indexes. For a guest book of hundreds, that is a few lines each, and all of it is below. The page was built against 520 wishes, 130 of them with a photo.
From an Empty Spreadsheet to a Web API in About Fifteen Minutes
- Create a spreadsheet in any Google account, and set its time zone to the venue's (File, Settings).
- Open Extensions, Apps Script from inside it. A script made at script.google.com instead is not attached to the sheet and cannot see it. In Project Settings, keep the Chrome V8 runtime on.
- Paste
google-apps-script/Code.gsover the emptyCode.gsand save. - Choose
setupin the toolbar and run it. Google asks for access and warns that it has not verified the app, which is normal for a personal script.@OnlyCurrentDoclimits it to this one spreadsheet, nothing else in the Drive. The sheet gets its three tabs. - Deploy, New deployment, Web app. Execute as: Me. Who has access: Anyone. Copy the address that ends in
/exec. - Put that address in
wishes.endpointinsrc/data/wedding.tsand deploy the site. - Check it from a terminal:
curl -sL "<the address>?limit=1"answers{"ok":true,"total":0,"totalPhotos":0,"items":[],"next":null}.
After any change to the file, it is Manage deployments, the pencil, New version. A new deployment would get a new address, which would then have to go in wishes.endpoint, with the site deployed again. Two optional script properties: NOTIFY_EMAIL sends the couple an email per answer, and REQUIRE_APPROVAL holds new wishes back until they tick Show.
One File, Two Entry Points
doGet and doPost turn the sheet into a small JSON API. Both requests are "simple" in the CORS sense, because Apps Script cannot answer a preflight: a GET with a query string, and a POST whose body is JSON sent as text/plain. Apps Script replies through a redirect to a one-time address, which fetch follows by itself.
| Request | What comes back |
|---|---|
GET ?offset=0&limit=10 | A page of visible wishes, newest first, each photo with its small copy |
&strip=12 | Beside the page, the newest photos, for the strip |
&only=photos | Only the wishes with a photo, for the photo wall |
&words=1 | No small copies, for the moon, so it reads nothing from the Photos tab |
GET ?photo=<id> | One photo whole, joined from its parts; nothing for a hidden or deleted one |
GET ?gifts=1 | The ids of the gifts taken, nothing about who |
POST an answer | The wish as the page shows it, or nothing for a private one |
POST action: "gift" or "ungift" | The gifts taken now; a cancel only with the key that invitation kept |
| Tab | One row per | Columns |
|---|---|---|
| Answers | Answer | Time, Name, Attendance, Guests, Wish, Photo, Show, Private, Reply, From link, ID |
| Photos | Photo | ID, Time, Name, Small (480 px), Part 1 to Part 10 |
| Gifts | Mark | Time, Gift, Name, From link, Cancelled, Gift ID, Key |
What the script guards, since nothing else does:
- Formulas. Sheets runs text that starts with
=,+,-or@, so a guest could write=IMPORTXML(...). Stored text gets a leading apostrophe. - Bots. A hidden field only a bot fills in gets a polite yes and keeps nothing, and a form sent within 1.5 s of the page loading is refused.
- Floods. Apps Script never sees an IP address, so limits go by the name in the link and by the clock: 3 answers per guest in 10 minutes, 30 a minute overall.
- Two writers at once. A write waits up to 10 s for
LockService's lock; past that the page is told the sheet is busy. - A lost reply. Every answer carries a key, remembered for 10 minutes, so trying again after a failed reply never makes a second row.
- Two guests, one gift. A mark is decided inside that same lock, so the first wins and the second is told it has gone. A guest gets 6 marks or cancels in 10 minutes.
- Slow reads. Pages are cached for 60 s and small copies for 6 hours, apart, because a cache entry holds 100 KB and a page with its small copies would pass that. A new answer or an edit in the tab clears the page cache at once.
From a Tap to a Print in the Book
- The guest presses send. Attendance is checked in the page's own words, under the field.
- The phone has already made two copies of the photo: at most 1440 px, about 300 KB, and a 480 px small copy of about 30 KB. Each steps down in size and quality until it fits. Drawn through a canvas, they carry no camera details and no place.
- The form posts its JSON. A line fills with the time it should take; after 8 s it says the connection is slow, and after 75 s it stops and offers to try again under the same key.
doPostchecks the honeypot, the time, the rate and every length: a name of at most 60 characters, a wish of 500, 1 to 10 guests, a photo that is a JPEG or a WebP.- A row lands in Answers. The photo lands in Photos as text: a cell holds at most 50,000 characters, so it goes in parts of 48,000. Nothing goes to Drive, so the script asks only for its own spreadsheet and for sending email.
- The wish comes back and the page puts it at the top of the book, and on a strand of the moon. Other guests see it on their next load.
There Is None: It Is the Sheet
There is no admin to build. Untick Show and the wish leaves the page. Type in Reply and it shows under the wish. Untick Photo and the photo alone goes. Delete a row and it is gone within a minute, since Sheets does not report a deleted row and the cache has to run out; its photo leaves the page with it, though the cells stay in Photos until that row goes too. A guest can write to the couple only. The Gifts tab says who marked what, which only the couple can see.
Static HTML, No Framework
Astro builds the page twice from one layout, Chinese at the root and English under /en: a preloader and eleven chapters, in the order of an evening. The rest is plain TypeScript modules, and each does nothing while its section is off.
- Facts and words apart. Every fact lives in
wedding.ts, parsed by Zod as the build starts, so a bad date stops it. Every word lives inwords.tsandwords.en.ts, held to the same keys by a type. Components hold neither. - Light only. A phone set to dark may not grey the paper, so the page tells the browser so (
color-scheme: only light). - Every path is the page.
vercel.jsonrewrites any path that is not a file toindex.html, and/en/...to the English page. Under/_astro/a missing file is a true 404, because those files are cached for a year as immutable and the page in place of one would stay broken for that year. - The guest's name. An inline script under 1 KB, placed right after the cover's name, reads the path and writes it in before first paint. A Chinese name travels percent-encoded, and the encoding has to stay in a host's canonical form, or a redirect turns a hyphen into a space. Cloudflare is the standby host, and tests run every case through its own rule.
- What a guest typed reaches the page with
textContent, neverinnerHTML. - Anything over the page is a
<dialog>, opened by one helper, so the phone's back button closes it and the scroll rests under it. - The guest book for hundreds. One GET brings the count, the three newest wishes and twelve photos with their small copies, so the page stays one length however many write. The whole book opens over it and asks for the next page while the guest is still a screen from the end. A photo shows its small copy at once and the whole one when it comes. If the book cannot load it says so and offers to try again, and an empty book invites the first wish.
- The page's own photos come in AVIF and WebP at widths from 480 to 2560 px, with a JPEG for the oldest browsers, over a blurred preview in the photo's own colour.
- Sound. The song is fetched whole while the cover waits, so the tap plays it at once, under a tenth of a second later. A turning record opens its player, with a pause button and a gold line to move through the song. It pauses when the page goes out of sight and comes back with it; a phone that keeps it silent on waking gets it back at the next tap.
- Pictures that fail ask again, twice, under a fresh address, and the browser's broken mark never shows.
Started Once, and Never by Measuring
GSAP runs the arrivals and Lenis carries the scroll, on the wheel and under a finger, with a ceiling on speed. Each arrival is started once by an IntersectionObserver, so an arrival never makes the page measure itself while the guest scrolls, which on an older phone was most of the lag. Only what moves with the scroll itself (depth, parallax, float, the hero) follows ScrollTrigger, and it eases after the scroll, so an uneven swipe still moves it evenly. Every particle layer draws in one requestAnimationFrame loop that thins out when frames run long, and a chapter well off screen goes idle. Reveals use opacity, never visibility, so a keyboard can reach a link that has not arrived yet.
| Where | What moves | How long |
|---|---|---|
| Preloader | A gold ring draws itself around the initials by CSS alone and a hairline fills as the page loads; the initials lift, the ring widens and fades | Never later than 6 s |
| Cover | The ring draws, the window opens from its centre, the jade and the lantern come down on their cords and swing to rest | Ring 2.2 s, window 1.7 s, swing about 2.5 s |
| Opening, upright | A veil clip comes over the cover and parts, and the page comes out of a burst of light, sharp as it settles | In 0.12 s, parting about 0.65 s, dissolve 0.4 s |
| Opening, wide | The words go, light swells in the ring, and the window widens until the photo fills the screen | Window 1 s |
| Hero | The names letter by letter, blur to sharp on a strong phone; petals, bokeh, dust and sparkle; the photo breathes; scrolling pushes it in and lets the words drift up | 0.9 s, 0.04 s apart |
| Greeting | The moon gate draws, the words rise from behind a mask, the verse panel stands up from the page | 1.4 s, 0.95 s, 1 s |
| Every title | A few gold sparks burst from it as it rises, and a light runs once across a gold-leaf word | Once |
| Couple | Lights come up on each portrait out of black | 1.5 s; a fade only on a low phone |
| Countdown | The rings draw, the numbers count up once, a light circles each ring | 1.4 s; 60 s and 180 s a lap |
| Events | The card stands up from the page | 1 s |
| Gallery | Each photo reveals by a clip with a slow settle | Once |
| Envelope | The seal swells and breaks, the flap opens on a hinge, the first card rises, the second follows | 0.4 s, 0.7 s, 0.6 s, 0.65 s |
| Cards | Each tilts under the hand, and with the phone's own tilt where that is allowed, and flips on a tap | 0.9 s |
| Moon | Threads first, characters unrolling behind them, strands released from the middle out | About 2 s |
| Close | The jade and the lantern come down, the portrait lights, the blessing rises, then the phoenix, the families and the seal | As the cover and the couple |
The small things have one rule each. A button's coin breathes slowly; a button lifts on hover, presses down and rings on focus. A link's ring turns gold and rotates 10 degrees while a line draws under its label, in 0.5 s. A field gets a gold line on focus. A radio fills a small moon. A chosen photo drops in as a tilted print, with a remove mark and a change link. Copy turns its coin to a tick and changes its words for two seconds. The record's label turns and its small marks move while the song plays. There is no menu, no carousel with dots, no sticky header and no progress bar: one page, read once, top to bottom.
One Page, and What Each One Gets
| Device | What it gets |
|---|---|
| A phone, or any upright screen | One column, the veil, the hero's words low over the photo, the gallery as a swipe row, the couple stacked |
| A short phone | The cover tightens at 37.5rem and 30rem tall, tested at an iPhone SE's height |
| An upright tablet | The veil too, because the veil follows the screen's shape and not its size |
| 48rem and wider, on its side | The hero's words beside the photo, the cover's ring beside its words |
| 64rem and wider | The gallery as a grid, the couple side by side, the form beside the book, the countdown's photo beside its rings |
| Save-Data on | The window opening in place of the veil clip, and the low tier from the start |
Some of it is one browser's habit, handled where it happens. An iPhone will not let a page set the volume, so the song's soft start is in the file itself. An iPhone after it was locked allows sound only after a tap, so the guest's next tap anywhere brings the song back, and a phone that dropped the song's connection while asleep loads it again and goes on from where it was. Safari makes no WebP, so its photos go as JPEG. An Android phone cannot read an iPhone's HEIC file, so the form says that photo could not be read and asks for another.
The Same Page, Less Moving
tier.ts sets a tier from the device's memory, cores and Save-Data, then from frames timed while the cover arrives, and lowers it while scrolling if a phone falls behind. A low phone gets the same page with less moving: fewer particles, slow loops held still, no filter over a whole photo. A phone under 24 frames a second while scrolling gets its own scrolling back. The first view at a phone's size is 21 requests and about 1.2 MB, with the song's 1.9 MB fetched behind the cover, measured in Chrome on a Mac with the CPU slowed four times and the network held to 1.6 Mbps.
A Hanging Chain on a Canvas
Each wish is one strand of characters. A strand is a hanging chain: each character's sideways offset is pulled by the weight hanging below it, the real physics for small angles, and its height follows from the fixed spacing, so it can bend and lift but never stretch or tangle, and it always comes back. The sums live in src/lib/wish-moon.ts, tested with no page around them.
One sheet of characters is drawn once and stamped per frame, on the page's one loop, so a frame is a stamp per character and no text layout. Measured on a Mac at a phone's size with the CPU slowed six times, it held 60 frames a second, also while brushed.
The first 8 px of a finger decide its way: up and down belongs to the page, and only sideways touches the moon. A wish just sent waits for the page to come to rest, then falls slowly, so it lands where it can be seen. A slow phone gets fewer strands, no breeze, and no frames at all once nothing moves.
While the song plays, each strand struck rings a small bell in the song's own notes, D, E, G, A and B; a guest who paused the music hears nothing. With reduced motion the moon is simply there, whole. The canvas is hidden from a screen reader, because the book holds every wish as text, and a button reads them one by one into a live note.
The Real Script, Running in the Visitor's Tab
A fake would prove nothing, and a public form on a real sheet would need moderating for as long as the portfolio lives. So this copy's endpoint sits on the reserved .invalid domain, which no request can reach. A small wrapper catches those requests on their way out and hands them to the very same Code.gs, run through new Function on in-memory stand-ins for Google's services and seeded with invented guests. Every refusal, limit and reply is the real one, and nothing leaves the browser. A backstage page puts a phone beside the sheet, live, over a BroadcastChannel. On a phone the two take turns behind a switch, and a +1 on the sheet's tab says a row has arrived.
182 of Them
Vitest runs Code.gs itself in a sandbox with an in-memory spreadsheet: validation, the formula guard, private wishes, approval, rate limits, the cache, email, the gift marks, and the client and script together. Every guest link goes through Cloudflare's own rule. The moon's chain is checked for never stretching and always coming back. The guards were mutation-checked: removing the formula guard, the honeypot, the private filter or the cache clearing each fails a test.
How It Was Built
Nine days, 35 commits, from 26 October to 3 November 2026. The first day went from research to a deployed design to the one form wired to the sheet. Then came the couple's first feedback and an English page, the gift moved up, the music, the film, the wish list. This copy and its Chinese dress came on 4 November, and the moon on 5 November.
Claude Code wrote most of the code, under a CLAUDE.md that held the rules: facts only in one file, words only in another, never invent a fact, ask before big decisions, and every visual and every word decided by a person.
A Couple Who Do Not Exist
ChatGPT made this copy's people, products, ornaments and paper, one image at a time, every prompt logged; Higgsfield made the gold leaf, the petals and the veil clip. A project's instructions carry the two people, feature by feature, into every chat; two casting portraits go into each new chat as the reference; frames of one look stay in one chat, and a new look starts from the original portraits, so any drift cannot compound. No real photo ever went to a generator. The music is written in code on "Mo Li Hua", a folk song in the public domain whose name is the bride's own.

A Spreadsheet as the Database and the Admin
The couple asked for no database and no server to run, and a spreadsheet asks them to learn nothing. The choice saved an admin to design and a monthly bill. It cost a form that must show its progress, abuse limits written by hand, and a new version of the same deployment after every change, or the address moves.
Photos as Text in Cells
Drive would have been the obvious store. Keeping photos in the sheet means the script needs one spreadsheet and no Drive, and a deleted row takes its photo off the page. It costs a cap of 450,000 characters a photo and a page that reads a photo back from its parts, and it puts the work on the guest's phone.
Every Path Is the Page
A name in the address means no guest list on the site and nothing to leak. It also means anyone can type any name, which the cover meets with a line asking pardon for any mistake in how a guest is addressed. The encoding has to stay in a host's canonical form, so tests run every case through Cloudflare's own rule.
The Gift Before the Form
After the first round, the couple found the account numbers went unseen. Guests took the wishes and photos for the end of the page, as on a place's listing in Google Maps, and stopped there. The gift moved up. It costs the money coming before the words, which is why the red envelope has to make it a ceremony.
The Real Backend in a Portfolio Demo
Running the same file in the tab proves the logic and touches nothing. It costs a demo sheet that is not a Google Sheet, and the page says so.
A Moon, and Not a Curtain
The moon is the one chapter the real invitation does not have. It was added to this copy after a reel by marina_uiux: a roof over a curtain of characters swaying under the pointer. Copying that would have read as a copy. The principle was worth taking, letters that hang and a hand that moves them, so here they became 花好月圆, this wedding's own night, made of what the guests wrote. It costs a chapter no real guest has touched, which has to be said wherever it appears.
Design Details
The dress. Ivory paper, ink, black velvet from the photos, gold from the bride's embroidery, cobalt from the studio's wall, cinnabar for a seal. The ornaments come from the couple's tradition: xiangyun cloud rules, key frets, the back of a bronze mirror behind each heading, a moon gate carrying 花好月圆, a silk moon lantern and a jade bi pendant that return at the close. The paper is one generated image of gold-flecked xuan, quilted into a tile with no seam and no pattern.
Chinese type. A whole Chinese face is 6 to 25 MB. The page cuts two down to the 570-odd characters it uses: 184 KB and 100 KB, self-hosted, and unicode-range keeps Latin text from fetching them. Lines sit further apart than Latin's and break between phrases, never inside a word, except in what a guest typed. ZCOOL XiaoWei sets the names because its contrast of thick and thin matches the Bodoni "&" beside it.
Motion arrives once. What keeps moving is light, petals and what hangs in a breeze, and none of it runs under reduced motion. A call for attention is a slight breath of scale: pulses, sweeps and bouncing chevrons were tried and looked generated.




Access. One h1, every image with alt text in the page's language, every field labelled, 44 px targets, focus visible on every stop, Esc closing every overlay and the phone's back button too. No script at all and the page still reads.
Also a film. A 28.6-second save-the-date in four concepts, rendered from the same photos and words: a web page, filmed frame by frame, its score written in code on a public-domain folk tune, every cut on a pulse.
Outcome
The real invitation is live, and guests are writing in it. The couple run it from their sheet. Nothing here claims more than that: no opens, no conversion.
What it proved: a spreadsheet is a good admin because no one has to learn it, and writing down its limits was most of the work. Guests read a page by habits from other places, which moved the gift, marked the photos as openable, and showed the gallery slides. A generated look comes from defaults, and it went away when the pulses and rays went and the ornaments came from the couple's own tradition.
Known limits: the moon has never met a real guest, and has been measured at a phone's size on a Mac and tried in the hand on one real phone, not on a range of old ones; anyone can type any name in a link; a very long book asks more of Apps Script's quotas; a rarer character in a guest's wish falls back to the phone's own face; Google's services do not reach guests in mainland China, so a real wedding there would need another backend.
What would come next: the moon on a range of old phones before any real guest meets it, and, for a wedding in mainland China, the same page on another backend.
Gallery

























