https://producingtechnology.com/65-apps/sebastianjason_183628_15200430_New Dating App.html
Spark is a Tinder-style dating-app mockup scoped to a phone-width
column (max 420px). It presents three pages wired to a bottom nav:
Discover, Matches, and Profile.
All data comes from a USER object and a MOCK_MATCHES
array hard-coded in the <script> block — the comment
"DATA from JSON" is aspirational rather than literal; there is no
fetch anywhere.
created_at,
an About paragraph, a Details table (age, location, verified, gender, photo
count), and interest chips derived from USER.interests with a
small emoji dictionary.
Styling is warm-dark with a rose/gold gradient logo, Syne display
type, and Lato body text. A fadeUp animation plays on
each page switch.
USER
and MOCK_MATCHES are both literals in the file. Nothing is
fetched and the JSON URL referenced in course materials isn't touched.
swipeAction
rewrites the front card's content and re-animates it in, but the second card
in the DOM stays forever "Alex, 25, Jersey City" — so after one swipe the
stack shows two copies of the same profile stacked.
https://example.com/photo1.jpg — <img> tags
never appear anyway; the card uses a gradient + emoji placeholder. The
"Photos: 2 uploaded" line on the profile page is therefore meaningless.
event.target inside switchTab, which is a
global reference that breaks if the function is ever called programmatically.
Make Spark an honest, functional dating-app mock driven by a real JSON payload instead of inline literals, and fix the cosmetic shortcuts that break once the user actually interacts. Specifically:
- Replace the inline
USERandMOCK_MATCHESwith a singlefetchof a JSON file shaped as{ me, deck: [...profiles], matches: [...conversations] }. Keep a sample JSON in the repo so the default experience still works.- Build the swipe stack from
deck: render the next card into the back slot ahead of time and promote back → front on each swipe (DOM swap, not content rewrite) so the "Alex, 25" ghost no longer repeats.- Make the Nearby / New / Popular tabs actually filter the deck by a profile field (
distance,createdAt,likeCount), and drop theevent.targetreliance by taking the button element as an argument.- Add a real chat screen: clicking a conversation opens a modal that loads
conversation.messages[]and lets you type (stored in memory only is fine for a mock).- Show either
photos[].urlin an actual<img>with a lazy gradient fallback, or remove "Photos: 2 uploaded" from the Details table so the UI stops claiming something it doesn't render.- Replace the first "You" bubble with an "Add new match" CTA (or just remove it) so the row matches its label.
- Give Super Like its own consequence: a limited daily counter shown near the button, an upward animation that lands on a separate "⭐ Super Likes" row on the Matches page, and a different toast with the remaining count.
- Make swipe-commit distance relative to card width (
card.offsetWidth * 0.25) so narrow viewports feel right.- Wire the bell and gear to small modals — notifications list, settings (dark/light toggle, distance range) — instead of dead toasts.
- Keep the existing aesthetic: rose/gold gradient logo, Syne display type, phone-width column, and the current toast/fadeUp animations.