<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 24doors Team</title>
    <description>The latest articles on DEV Community by 24doors Team (@doors24team).</description>
    <link>https://dev.to/doors24team</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4280961%2F6d2756aa-5e65-4c6a-b950-6f8ba543d1b4.png</url>
      <title>DEV Community: 24doors Team</title>
      <link>https://dev.to/doors24team</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/doors24team"/>
    <language>en</language>
    <item>
      <title>A New Year's Eve wish game with no sign-up: whose midnight is it?</title>
      <dc:creator>24doors Team</dc:creator>
      <pubDate>Sun, 06 Dec 2026 06:20:15 +0000</pubDate>
      <link>https://dev.to/doors24team/a-new-years-eve-wish-game-with-no-sign-up-whose-midnight-is-it-1o9d</link>
      <guid>https://dev.to/doors24team/a-new-years-eve-wish-game-with-no-sign-up-whose-midnight-is-it-1o9d</guid>
      <description>&lt;p&gt;In Spain, people eat twelve grapes at midnight on New Year's Eve, one on each chime of the clock, and each grape stands for a month of the coming year. We turned that into a small web game for group chats: &lt;a href="https://12grapesforfriends.com/" rel="noopener noreferrer"&gt;12 Grapes With Friends&lt;/a&gt;. You start a bunch of twelve grapes, share one link, and each friend seals a wish inside a grape. Nobody can open them until midnight.&lt;/p&gt;

&lt;p&gt;It is free and has no sign-up. That one decision shaped most of the front end, so here are the parts that took the most thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Whose midnight is it?
&lt;/h2&gt;

&lt;p&gt;Friends in a group chat are rarely in the same time zone. If every visitor used their own clock, the grapes would open at twelve different moments.&lt;/p&gt;

&lt;p&gt;So midnight belongs to the person who started the bunch. When the bunch is created, the browser works out the next January 1 at 00:00 in local time and stores it as a timestamp with the bunch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;nextMidnight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFullYear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everyone who opens the link counts down to that same instant. A friend in another city sees the wishes open when it is midnight for the owner, not for them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Owning something without an account
&lt;/h2&gt;

&lt;p&gt;There is no login, so "this bunch is mine" has to live somewhere else. The browser that created the bunch is remembered as its owner. For people who start on a laptop and want to open the wishes on a phone, the owner can ask for a private link. It is the normal share link with a key after the &lt;code&gt;#&lt;/code&gt;, so the key is not sent to the server as part of the page request. The interface tells the owner plainly not to post that link in the chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  Twelve slots, three per friend
&lt;/h2&gt;

&lt;p&gt;Each grape is a month. A friend picks an empty month, chooses what kind of wish it is (luck, love, money or adventure, each with its own colour) and writes one line. One friend can fill at most three grapes, which leaves room for the rest of the group and keeps one keen person from filling the whole clock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing that works in a group chat
&lt;/h2&gt;

&lt;p&gt;The share button uses &lt;code&gt;navigator.share&lt;/code&gt; when the browser has it and falls back to copying the invite text to the clipboard. The picture cards for stories are drawn on a 1080 × 1920 canvas, turned into a PNG with &lt;code&gt;toBlob&lt;/code&gt;, and shared as a file when &lt;code&gt;navigator.canShare&lt;/code&gt; says files are allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small things
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A practice mode lights one grape per chime so you can rehearse. The real chimes in Madrid come about three seconds apart.&lt;/li&gt;
&lt;li&gt;The confetti is skipped when &lt;code&gt;prefers-reduced-motion&lt;/code&gt; is set.&lt;/li&gt;
&lt;li&gt;The game's front end is plain JavaScript, with no UI framework.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your group wants to try it this December 31, the game is here: &lt;a href="https://12grapesforfriends.com/" rel="noopener noreferrer"&gt;12grapesforfriends.com&lt;/a&gt;. The site also has a short guide to &lt;a href="https://12grapesforfriends.com/12-grapes-tradition" rel="noopener noreferrer"&gt;the 12 grapes tradition&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
