Project Info
Inspiration
We referenced how people enjoy playing on Chess.com, and the competitive element to it was applicable to many fields. In addition, it is often common to see people pointlessly arguing on social media, without proper moderation, and often unwarranted. It is clear that people need an avenue to argue, but it would also be good to be able to concurrently improve their argumentation and logical reasoning skills. Thus, we believe that a debating app, similar to Chess.com app, would be able to bring people of opposing views together, to come to possible resolutions. We aimed to create a mobile app so it would be accessible and usable for the average person.
What it does
Our debating app, debAIDe, pairs individuals of similar debating skill, and assigns each individual with a stand to defend. Individuals will then take turns proposing arguments and countering their opponentโs arguments, and an AI judge will determine a winner. The winner will have an increase in rating, and the loser will be given advice on how to improve their arguments.
How we built it
For our frontend, we used React Native (Expo) using Expo AV to record audio, Zustand for global state management, React Query to fetch and cache data, and TypeScript for type-safe development. For our backend, we used FastAPI, PostgreSQL, SQLAlchemy, Google Gemini AI (for scoring), Whisper for speech-to-text transcription, and Uvicorn for our server.
Challenges we ran into
The toughest challenge was actually coming up with a good idea. Our society is constantly filled with problems that we would love to solve, so we wanted to create something that would benefit society while also making sure to use AI meaningfully.
Accomplishments we're proud of
Creating a mobile app was a challenge for us, as we were not very experienced in app development, and had to learn a lot in our creation process. We are proud that we created a fully-functional mobile app that looks and works well.
What we learned
We learned how to send information to be processed by Gemini, and to curate our prompts to ensure proper output formats. We also learned how to create an app that stored data from different users, and that could coordinate between different users concurrently.
What's next
We are considering more interesting formats, such as 2v2, clan battles or even โbattle royaleโ. We are also considering moving into educational mode, where the user can directly pick apart arguments with fallacies.
๐ค debAIDe
AI-powered debate practice platform with real-time feedback and 1v1 battle mode
debAIDe helps you master the art of debate through AI-powered coaching, instant feedback, and competitive battles with other debaters. Practice solo or challenge opponents in real-time debates.
โจ Features
๐ฏ Practice Mode
- AI-Powered Topics - Choose from curated topics or get daily AI-generated suggestions
- Voice Recording - Record your opening, rebuttal, and closing statements
- Auto-Transcription - Automatic speech-to-text conversion
- Instant AI Feedback - Get detailed scores on structure, logic, delivery, and time management
- Personalized Coaching - Receive strengths, improvement areas, and targeted practice drills
- Key Moments - AI identifies and highlights your best arguments with timestamps
โ๏ธ Battle Mode
- 1v1 Debates - Challenge other users in real-time debates
- Matchmaking - Find opponents or join existing battle rooms
- Turn-Based System - Take turns presenting arguments in structured debate rounds
- AI Judging - Automated scoring and winner determination
- Leaderboards - Track your win rate, streaks, and climb the rankings
- Battle History - Review past debates and learn from your performances
๐จ User Experience
- Dark/Light Mode - Beautiful theme switching throughout the app
- Cross-Platform - iOS, Android, and Web support via Expo
- Real-Time Updates - Live battle status and instant feedback
- User Stats - Comprehensive statistics tracking your progress
๐ Tech Stack
Frontend
- React Native (Expo) - Cross-platform mobile framework
- TypeScript - Type-safe development
- React Query - Server state management
- Zustand - Global state management
- Expo AV - Audio recording and playback
Backend
- FastAPI - High-performance Python API framework
- PostgreSQL - Relational database
- SQLAlchemy - Async ORM
- Google Gemini AI - Scoring, feedback, and judging
- Whisper - Speech-to-text transcription
- Uvicorn - ASGI server
๏ฟฝ Screenshots
Practice Mode - Topic Selection
Choose from diverse debate topics or try the AI-generated topic of the day.
Battle Mode - Live Debate
Compete against real opponents in structured, turn-based debates.
Results - AI Feedback
Get detailed scoring and personalized improvement suggestions.
Project Structure
debaide/
โโโ backend/
โ โโโ main.py # FastAPI application
โ โโโ models.py # Database models (Users, Topics, Sessions, Battles)
โ โโโ database.py # PostgreSQL configuration
โ โโโ schemas.py # Pydantic request/response schemas
โ โโโ services/
โ โ โโโ gemini_service.py # AI scoring, feedback & judging
โ โ โโโ storage_service.py # Audio file management
โ โ โโโ stt_service.py # Speech-to-text transcription
โ โ โโโ auth_service.py # JWT authentication
โ โโโ requirements.txt
โ โโโ .env.example
โ
โโโ frontend/
โโโ app/
โ โโโ _layout.tsx # Root navigation
โ โโโ index.tsx # Auth redirect
โ โโโ home.tsx # Main dashboard
โ โโโ topics.tsx # Topic selection
โ โโโ session.tsx # Practice recording
โ โโโ results.tsx # Practice feedback
โ โโโ auth/ # Login & registration
โ โโโ battle/ # Battle mode screens
โ โโโ lobby.tsx # Matchmaking
โ โโโ room.tsx # Live battle
โ โโโ results.tsx # Battle outcome
โโโ components/
โ โโโ NavBar.tsx # Navigation component
โ โโโ ThemeToggle.tsx # Dark mode toggle
โโโ lib/
โ โโโ api.ts # API client
โ โโโ theme.tsx # Theme configuration
โ โโโ authStore.ts # Auth state
โ โโโ store.ts # Global state
โโโ package.json
โโโ .env.example
๐ ๏ธ Setup Instructions
Prerequisites
- Python 3.11+
- Node.js 18+
- PostgreSQL 14+ (or use Neon DB, Supabase)
- Gemini API Key (get from Google AI Studio)
Quick Start (Recommended)
-
Clone the repository:
git clone https://github.com/juliezyli/debaide.git cd debaide -
Set up backend:
cd backend python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt cp .env.example .env # Edit .env with your DATABASE_URL and GEMINI_API_KEY python main.pyBackend runs at
http://localhost:8000โข API docs at/docs -
Set up frontend (in a new terminal):
cd frontend npm install cp .env.example .env # Edit .env if backend is not on localhost:8000 npx expo startThen scan the QR code with Expo Go app or press
wfor web
Detailed Setup
-
Install Python 3.11+ and PostgreSQL 14+
-
Set up database:
-
Get Gemini API Key:
- Visit Google AI Studio
- Sign in and create a new API key (free tier available)
-
Configure .env:
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/debaide GEMINI_API_KEY=your_gemini_api_key_here SECRET_KEY=your_secret_key_for_jwt API_BASE_URL=http://localhost:8000 -
Run the server:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
-
Install Node.js 18+
-
Configure .env:
EXPO_PUBLIC_API_URL=http://localhost:8000 -
Run on different platforms:
npx expo start- iOS: Press
i(requires Xcode on macOS) - Android: Press
a(requires Android Studio) - Web: Press
w - Mobile device: Scan QR with Expo Go app
- iOS: Press
๐ ๏ธ Setup Instructions
Prerequisites
- Python 3.11+
- Node.js 18+
- PostgreSQL 14+ (or use Neon DB, Supabase)
- Gemini API Key (Get it here)
cd frontend
-
Install dependencies:
npm install -
Configure environment:
cp .env.example .env # Edit .env if your backend is not on localhost:8000 -
Start Expo:
npm start -
Run on device:
- Scan QR code with Expo Go app (iOS/Android)
- Press
ifor iOS simulator - Press
afor Android emulator - Press
wfor web
๐ฎ How to Use
Practice Mode
- Sign up / Log in to your account
- Choose a topic from the list or try the daily AI-generated topic
- Get your stance - System assigns you PRO or CON position
- Record your debate in three segments:
- Opening Statement (introduce your position)
- Rebuttal (counter opposing arguments)
- Closing Argument (summarize and conclude)
- Review AI feedback - Get scores, strengths, improvements, and practice drills
Battle Mode
- Enter the lobby and see available battles
- Create a room or join an existing one
- Wait for opponent to join
- Take turns debating:
- Each player records their segments
- AI transcribes in real-time
- Follow turn-based structure
- Get AI judgment - Winner determined by overall performance
- Check leaderboard to see your ranking
๐ API Documentation
Authentication
POST /register- Create new accountPOST /login- Get access tokenGET /users/me- Get current user info
Practice Mode
GET /topics- List all topicsGET /topics/daily- Get/generate daily topicPOST /session/start- Start practice sessionPOST /segment/upload- Upload audio segmentPOST /segment/text- Submit text segmentPOST /session/score- Score completed sessionGET /session/{id}/history- Get session details
Battle Mode
GET /battle/available- List open battlesPOST /battle/create- Create new battle roomPOST /battle/{id}/join- Join a battleGET /battle/{id}- Get battle statusPOST /battle/{id}/segment- Submit battle segmentPOST /battle/{id}/complete- Finalize and judge battle
User Stats
GET /user/stats- Get comprehensive user statistics
Full API documentation available at http://localhost:8000/docs when running locally.
๐ค AI-Powered Features
Scoring System
Gemini AI evaluates your debate performance across four dimensions:
- Structure (0-5 points) - Organization, clarity, and coherence
- Logic (0-5 points) - Reasoning quality, evidence, and argumentation
- Delivery (0-5 points) - Confidence, articulation, and engagement
- Time Management (0-5 points) - Pacing, completeness, and efficiency
Total Score: 0-20 points
Feedback Includes:
- ๐ Detailed score breakdown
- ๐ช Your key strengths
- ๐ฏ Areas for improvement
- โญ Highlighted best moments with timestamps
- ๐๏ธ Personalized practice drills
Battle Judging
In battle mode, AI judges compare both debaters' performance holistically:
- Overall argument quality
- Rebuttal effectiveness
- Consistency and coherence
- Delivery and confidence
- Determines winner objectively
๐ Deployment
Railway / Render / Fly.io:
- Connect your GitHub repository
- Set environment variables:
DATABASE_URL=<your_postgres_url> GEMINI_API_KEY=<your_api_key> SECRET_KEY=<random_secret> - Deploy automatically from main branch
Docker:
cd backend
docker build -t debaide-backend .
docker run -p 8000:8000 --env-file .env debaide-backend
Expo Application Services (EAS):
# Install EAS CLI
npm install -g eas-cli
# Login to Expo
eas login
# Configure project
eas build:configure
# Build for iOS/Android
eas build --platform ios
eas build --platform android
# Submit to stores
eas submit --platform ios
eas submit --platform android
Web Deployment:
npx expo export:web
# Deploy the web-build folder to Vercel, Netlify, or any static host
๐ Database Schema
Core Tables:
users- User accounts and authenticationtopics- Debate topics with difficulty and categorysessions- Practice debate sessionssegments- Audio recordings and transcriptsscorecards- AI feedback and scoringbattles- 1v1 competitive debatesbattle_segments- Battle round recordingsuser_stats- Performance statistics and rankings
๐ ๏ธ Built With
- FastAPI - Modern Python web framework
- React Native - Cross-platform mobile development
- Expo - React Native tooling
- PostgreSQL - Relational database
- Google Gemini - AI scoring and judging
- Whisper - Speech recognition
- Zustand - State management
- React Query - Server state
Analysis
View
Metric
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- FastAPIIn code
- PythonIn code
- ReactIn code
- TypeScriptIn code
- PostgreSQLClaimed
4 of 5 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
203 KB
Source files
30
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
juliezyli/debAIDe
41 files ยท 571 KB ยท @ 096eb52
Structure
Interface
13 files ยท 32%Screens, components and styles rendered to the user.
Application logic
16 files ยท 39%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here โ open the file browser to check anything the diagram implies.
Languages
- TypeScript59%
- Python35%
- Markdown6%
- YAML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm ยท 25- @expo/vector-icons
- @react-native-async-storage/async-storage
- @tanstack/react-query
- axios
- expo
- expo-asset
- expo-av
- expo-constants
- expo-file-system
- expo-font
- expo-linking
- expo-router
- expo-splash-screen
- expo-status-bar
- react
- react-dom
- react-native
- react-native-safe-area-context
- +7 more
backend/requirements.txt
pypi ยท 10- asyncpg
- boto3
- fastapi
- google-generativeai
- openai-whisper
- pydantic
- python-dotenv
- python-multipart
- sqlalchemy
- uvicorn[standard]
Declared in the repositoryโs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectโs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.