💬 Jekardah Chat — A Messenger Keyed by Gmail Address, Realtime Without a Socket, and a History That Ends Every Midnight
An Indonesian-language messenger laid out like WhatsApp Web whose identity is a Gmail address instead of a phone number: sign in with Google, type a friend’s email, and chat — even with someone who has never signed in, whose messages are waiting when they do. Every address passes through one normalisation function, so Budi.Santoso+kerja@gmail.com and budisantoso@gmail.com are the same person. The front end is plain HTML, CSS and JavaScript; the API is one Express 5 Vercel Function in Singapore over Neon Postgres. Realtime needs no socket service: every event that should change a screen bumps a version counter for each affected user, and the client holds /api/wait open while the function re-reads its counter every 300 ms for up to 25 seconds, delivering a message in about 0.4 seconds and telling open apps when a new build has been deployed; Pusher channels are optional. Messages carry grey, double and blue ticks, with a group message turning blue only once every member has read it; groups have admins and system messages; Web Push and a service worker deliver notifications and an icon badge while the app is closed. Photos and documents up to 4 MB and videos up to 64 MB are stored privately in Vercel Blob and served only after a query confirms the caller belongs to the conversation, videos through a one-hour signed URL. Every day at 00.00 WIB all messages and files are deleted: the first request of the new day claims it with one conditional UPDATE, so exactly one purge runs before any data is shown, with Vercel Cron as backup. One deployment is the web app, an installable phone app on iPhone and Android, and the content of Electron apps for macOS and Windows.
Keywords Email-Based Identity·Google Sign-In·Long Polling·Read Receipts·Group Chat·Web Push·PWA·Electron·Neon Postgres·Vercel Blob·Daily Purge
