Skip to content
All projects

Case study · Full-stack & mobile

Nook

private real-time messenger

A messaging app with no feed, no stories and no strangers. Calls, snaps and disappearing messages run over live sockets, and the chat wallpaper belongs to the conversation rather than your phone.

Screenshot of Nook

The problem

Mainstream messengers have turned into feeds, with stories, suggested contacts and strangers able to reach you. Nook is a messenger for the small group of people you actually talk to: text, voice notes, snaps, disappearing messages and voice or video calls, with no feed and nobody you haven't accepted.

What the research found

  • 18 server test suites (security, snaps, secret chats, push, polls, backup and more) run against a real server on a throwaway database rather than mocks, on every push via GitHub Actions.
  • The secret-chat cryptography is checked by a self-test script that runs the actual client crypto module under Node's WebCrypto, so it tests the shipped code rather than a copy.

Decisions that shaped it

  1. 1

    Disappearing timers start on delivery, not when a message is written. Each message stores an expiry time, and a scheduler sweeps expired rows because SQLite has no TTL index. A scheduled message's timer is pushed back by however late it was delivered, and anything someone chose to keep is never swept.

  2. 2

    A snap is destroyed only after everyone has used up their views. Each recipient gets one open plus three replays. The server records an open before showing the photo, and deletes the media from storage only once every recipient has used all of their looks. Snaps cannot be forwarded.

  3. 3

    Calls only ring for friends. The server relays WebRTC offers, answers and ICE candidates over Socket.IO. Before it rings anyone, it checks that the callee is in the conversation, that neither person has blocked the other and that they are friends. An unanswered call becomes a missed call after 40 seconds and is logged in the chat.

  4. 4

    The wallpaper belongs to the conversation, so changing it needs consent. In a one-to-one chat a new wallpaper is stored as a proposal, and the other person has to accept it before it changes for both of them. In groups only admins can change it, and a "just me" option sets a private wallpaper without asking anyone.

  5. 5

    Secret chats are end-to-end encrypted, with their limits stated in the code. Devices agree keys with ECDH P-256 and a signed handshake, then a hash ratchet gives every message a new AES-256-GCM key. That provides forward secrecy. The code also says plainly that there is no post-compromise security, and the server stores only ciphertext and skips link previews, search and notification text for these chats.

Built with

  • React
  • TypeScript
  • Node.js
  • Socket.IO
  • WebRTC
  • libSQL
  • React Native
  • Expo
Next case studyMetroNow Chennai