BathChat - AI-Powered Social Discovery for University of Bath
Inspiration
We noticed that university students struggle to find genuine connections on campus. Traditional social apps focus on photos and surface-level interaction, missing the deeper compatibility that matter shared interests, courses, accommodation, and genuine goals. We wanted to create something that uses AI to understand real compatibility and help Bath students find meaningful connections, whether that's study partners, flatmates, or friends who actually get them.
What it does
BathChat is an AI-powered social discovery platform designed exclusively for University of Bath students. It combines intelligent matching with gamified engagement:
Smart AI Matching: Our algorithm analyses real profile data (course, interests, societies, accommodation, goals, bio) to suggest compatible matches with personalised reasoning Intelligent Icebreakers: AI generates conversation starters tailored to why users will click, eliminating awkward first messages.
EXP-Based Reputation System: Users build reputation (bronze → silver → gold → platinum → diamond) by taking actions: Sending friend requests (+5 XP) Connecting with matches (+10 XP) Sending chat messages (+2 XP) Campus Community: Browse profiles by course, accommodation, interests, and societies Leaderboard: See who's most connected and building their reputation on campus Direct Messaging: Chat with connections in-app and build relationships
How we built it
Backend (FastAPI + Python)
RESTful API with 15+ endpoints for auth, profiles, discovery, connections, chat, and leaderboard PostgreSQL database with complex relational schemas (users, profiles, matches, messages, friend requests, experience logs)
OpenRouter AI integration (Llama 3.1 8B) for intelligent match scoring and icebreaker generation Async SQLAlchemy for high-performance database operations
EXP reward system with automatic tier calculation based on configurable thresholds Frontend (Android + Web)
Native Android app with RecyclerView-based horizontal swiping discovery (Tinder-like UX)
Vanilla HTML/CSS/JavaScript web interface for desktop access
Responsive design with CORS-enabled cross-origin communication
Real-time profile cards displaying full user information and match data
Deployment
Backend: Uvicorn on Render Cloud with PostgreSQL on Render Frontend: Python http.server for local development, ready for mobile app store Challenges we ran into AI Provider Integration: Initially used Google GenAI SDK which had limitations; migrated to OpenRouter HTTP API for better model selection and reliability Discovery Algorithm Complexity: Balancing local scoring (interests, course overlap) with AI-driven ranking; settled on comprehensive AI evaluation Port Management: Had to troubleshoot multiple port conflicts during backend development; found stable port 8770 CORS Configuration: Frontend and backend communication required careful CORS header configuration with credentials support JavaScript Variable Shadowing: API client had subtle bug where "console" variable conflicted with window.console, breaking form submissions Schema Design: Managing complex relationships between users, profiles, matches, messages, and experience logs without circular dependencies EXP Tier Transitions: Designing reward thresholds that incentivize action without trivializing the system (settled on 5/10/2 points for friend request/connect/chat)
Accomplishments that we're proud of
✅ Built a complete full-stack application from auth → matching → messaging → leaderboard in one cohesive system
✅ Implemented AI-powered compatibility matching that generates personalized insights instead of random suggestions
✅ Created a gamification system that incentivizes meaningful engagement without feeling forced
✅ Solved complex database design with proper relationships, cascade deletes, and async operations
✅ Fixed critical JavaScript bugs in production and deployed fixes with zero downtime
✅ Made CORS work across different environments (port 5500 ↔ port 8770) with proper header management
✅ Generated dynamic EXP rewards that auto-calculate tier progression for all users on startup
✅ Built Android app with smooth card-based discovery UI and real-time API integration
What we learned
Full-stack development requires thinking about frontend AND backend constraints simultaneously

Log in or sign up for Devpost to join the conversation.