Ada AI is a specialized coding assistant built to provide students and developers with accurate, context-aware debugging help. Unlike generic AI chatbots, Ada is engineered specifically for software development workflows, integrating a real-time code editor directly into the conversation loop.
System Architecture
The system was re-architected from an unstable web-scraper into a robust, authenticated Python routing layer hosted on Render. The core philosophy is strict data segregation: connecting to Google's Gemini 3.1 model while keeping data isolated.
- Input & Security: Security is handled via Google Firebase Authentication. Upon login, a unique User ID is generated. This acts as the primary key for all database operations. The frontend captures messages and editor content, sending it over HTTPS with a Firebase ID Token.
- Server Verification: The Python Flask backend validates the ID Token using the Firebase Admin SDK before processing requests.
- AI Processing: Validated requests are formatted into JSON against a strict system prompt enforcing the "Coding Assistant" persona to resist injection attacks, then forwarded to Gemini.
- Response Streaming: The AI response is streamed back to the browser in real-time chunks via Server-Sent Events (SSE), significantly reducing perceived latency.
Data Storage & Privacy
Data persistence is managed via Google Cloud Firestore (NoSQL), structured to maximize privacy and ease of deletion.
- Data Structure: Chats live exclusively under the user document (
/users/{userId}/chats/{chatId}). No data is stored in global collections. - Control & Export: Users have full control to instantly delete single chats or wipe their entire history. Chats can also be exported as JSON or Markdown documents.
To facilitate collaboration, users can generate unique public links for any conversation. These links are read-only, but if a viewer logs in, they can "fork" a copy of the chat to their own history and continue the conversation seamlessly.