DEV Community

Pranavi Mehta
Pranavi Mehta

Posted on

Confide: How I Finally Finished My AI Companion App (with a Little Help from Copilot)

GitHub β€œFinish-Up-A-Thon” Challenge Submission

This is a submission for the GitHub Finish-Up-A-Thon Challenge

What I Built
There's a peculiar kind of loneliness that strikes at 2 AM when you just need someone to listen β€” not to fix things, not to give advice, just to hear you out. That feeling is what sparked Confide, an AI companion web app designed to make people feel heard, seen, and a little less alone.
Confide isn't a chatbot in the cold, transactional sense. It's a full-stack emotional support companion powered by Groq's Llama 4 Scout model, wrapped in a warm pastel UI that feels more like texting a friend than querying a machine. Users can name their companion, choose a personality that suits them, and build a relationship with an AI that actually remembers them across sessions.
What makes Confide different:

🎭 Six distinct companion personalities β€”
from Warm & Friendly 🌸 to Smart & Sassy ✨ to Calm & Wise 🌿. Each personality shapes the AI's language, tone, and energy across every message.

🧠 Persistent, per-user chat memory β€” conversations are stored in PostgreSQL per user, so your companion picks up right where you left off.

πŸ‘€ Deep personalization β€” users set their name, age, bio, and companion name at signup. All of it gets injected into the system prompt, so conversations feel tailored, not generic.

πŸ” Secure auth β€” JWT-based email/password login and Google OAuth, with bcrypt-hashed passwords.

🚨 Built-in crisis support β€” because an emotional companion app has a responsibility to take mental health seriously.

Tech stack: React (Vite) on the frontend, FastAPI + LangChain on the backend, Groq API for inference, and PostgreSQL for user and message storage. Deployed on Vercel.

Demo
πŸ”— Live App: https://ai-companion-topaz-nine.vercel.app
πŸ™ GitHub Repo: https://github.com/pranavimehta13/AI-Companion

Here's a quick walkthrough of the core flow:

Sign up β€” create your account, name your companion, pick a personality, and share a little about yourself.
Chat β€” your companion responds in-character, remembering your name, bio, and past conversations.
Settings panel β€” update your companion's personality or your profile details anytime, mid-journey.
Clear history β€” full control: wipe your chat slate and start fresh whenever you want.

πŸ“Έ Screenshots:

The Comeback Story
Confide started as an idea I genuinely believed in β€” but like many side projects, it got stuck. The core concept was there: an empathetic AI you could actually talk to. But the execution was incomplete. There was no real auth system, no memory between sessions, and no sense of personality or personalization. It was a prototype in the truest sense β€” a proof of concept with a gaping hole where the product should have been.

When I came across the GitHub Finish-Up-A-Thon, it felt like the push I needed.

Here's what I actually finished during the challenge:

User auth & profiles (from scratch)
I built out a full authentication system with JWT-protected sessions, bcrypt password hashing, and Google OAuth integration. Users now have real accounts β€” not just temporary chat sessions. The user profile schema (name, age, bio, companion_name, personality) feeds directly into every AI interaction, making conversations feel personal from the very first message.

Persistent, per-user chat history
Before: chat history vanished on refresh.
After: every message is stored in PostgreSQL, isolated per user, and retrieved on login. Your companion actually remembers you.

The personality & tone system
This was the feature I was most excited to build. Instead of one flat AI voice, users now choose from six personalities at signup β€” and that choice ripples through every response the model generates. The selected personality key is stored in the database and injected into the LangChain system prompt on every /chat request. Changing your companion's personality mid-journey is one settings update away.

Crisis resource integration
Building an emotional support app comes with real responsibility. I added built-in crisis support prompts with resources for Indian users (iCall, Vandrevala Foundation) and international crisis centres β€” because some conversations need more than an AI.

The project went from "cool idea, half-built" to a real, deployed, usable product. That's what finishing feels like.

My Experience with GitHub Copilot
GitHub Copilot was genuinely my pair programmer for this one β€” not just a fancy autocomplete, but something closer to a rubber duck that occasionally writes the code for you.

On the backend, Copilot shone brightest when I was wiring up the FastAPI routes and the LangChain chain logic. Writing the personality injection into the system prompt β€” dynamically building the SystemMessage based on the user's stored personality key β€” involved a lot of conditional string logic and LangChain-specific API calls. Copilot would often complete entire route handlers correctly after seeing my first few lines and the comment I'd written above the function. That kind of contextual awareness saved real time.

On the auth system, Copilot helped me think through the JWT middleware. When I started writing the get_current_user dependency for FastAPI, it suggested the full token-decode-and-validate pattern before I'd finished typing the function signature. It was right. I adjusted a few details and moved on.

On the frontend, it was most useful during the React component work β€” particularly the chat UI state management. Managing auth state, chat history, and the settings panel simultaneously involved a lot of useState and useEffect choreography. Copilot's suggestions kept me from having to look up patterns I half-remembered.

For documentation, I used Copilot to draft sections of the README β€” specifically the API endpoint table and the environment variable setup instructions. I reviewed and edited everything, but having a solid first draft to react to is much faster than writing from a blank slate.
The honest summary: Copilot didn't write Confide. But it kept me in flow. When I knew what I wanted to build but couldn't immediately recall the exact syntax or pattern, Copilot filled the gap in seconds instead of minutes. For a solo developer trying to finish a meaningful project, that adds up.

Built with 🌸 and a lot of care β€” Pranavi Mehta (@pranavimehta13)

Top comments (0)