Inspiration

Loneliness is one of the most widespread yet invisible crises of our time. I wanted to build something that doesn't just connect people superficially — but actually helps them form real bonds with strangers, backed by science.

What it does

Unlonely matches two strangers in real time and guides them through Dr. Arthur Aron's 36 Questions — a research-backed framework proven to build genuine closeness between people. While waiting to be matched, users chat with a Gemini AI companion designed to ease anxiety and emotionally prepare them for the conversation ahead.

How we built it

Built with vanilla HTML/CSS/JavaScript on the frontend, Node.js and Socket.io for real-time bidirectional communication, and Google Gemini API on the backend for the AI warmup chat. The API key is stored securely in a .env file and all Gemini calls are routed server-side. Deployed on Railway.

Challenges we ran into

Getting Socket.io rooms to persist across page redirects was tricky — users needed to rejoin their room after being redirected from the waiting page to the chat page. Syncing question progression between both users in real time also required careful event handling.

Accomplishments that we're proud of

Building a fully functional real-time matched chat system from scratch, and designing an AI companion that feels genuinely human rather than robotic through careful system prompt engineering.

What we learned

How to build real-time applications with Socket.io, how to architect a secure backend with environment variables, and how purposeful AI prompt design can completely change the feel of a user interaction.

What's next for Unlonely

Typing indicators, anonymous usernames, a depth meter showing emotional connection progress, and potentially a mobile app version.

Share this project:

Updates