Back to App

Ada AI Documentation

Comprehensive guide to the architecture, usage, and contribution workflow for the Ada AI Coding Assistant.

1 Introduction

Ada AI is a specialized coding assistant built to provide students and developers with accurate, context-aware debugging and refactoring help. Unlike generic AI chatbots, Ada is engineered specifically for software development workflows, integrating a real-time code editor directly into the conversation loop.

Core Philosophy: Simplicity, Speed, and Strict Data Segregation. Ada connects you to Google's Gemini 2.5 Flash model while keeping your data isolated within your own Firebase document scope.

2 System Architecture

Authentication Layer

Security is handled via Google Firebase Authentication. We support:

  • Google OAuth: One-click secure sign-in.
  • Email/Password: Traditional credential access.

Upon login, a unique User ID (UID) is generated. This UID acts as the primary key for all database operations, ensuring you never access data belonging to another user.

Request Lifecycle

  1. Input Capture: The frontend captures your message, active code editor content, and any uploaded file context.
  2. Secure Transmission: Data is sent to our Python Flask backend (hosted on Render) over HTTPS, accompanied by your Firebase ID Token.
  3. Server-Side Verification: The backend validates your ID Token using the Firebase Admin SDK before processing any request.
  4. AI Processing: Validated requests are forwarded to the Gemini 2.5 API. The system prompt enforces a "Coding Assistant Only" persona.
  5. Response Streaming: The AI response is streamed back to your browser in real-time chunks, reducing perceived latency.

3 Data Storage & Privacy

We use Google Cloud Firestore (NoSQL) for persistence. Your data is structured to maximize privacy and ease of deletion.

Data Structure

/users/{userId}/chats/{chatId}

All your chats live exclusively under your user document. No data is stored in global collections.

Deletion Policy

You have full control over your data:

  • Single Chat: Instantly removed via the context menu.
  • Clear History: A batch operation wipes your entire `/chats` subcollection.

4 Key Features

Smart Code Artifacts

When Ada writes code, it automatically detects the language and extracts it into the dedicated Artifact Panel on the right. This keeps your chat clean and gives you a dedicated workspace to view, copy, or format the code.

Chat Sharing

Need to share a solution? You can generate a unique link for any chat conversation.

  • Public Access: Anyone with the link can view the conversation (Read-Only).
  • Forking: If the viewer logs in, they can save a copy of the chat to their own history and continue the conversation.

Export Data

You are not locked in. Export any chat session as a JSON file or Markdown document for your own records or documentation.

5 Contributing

Ada AI is an open-source project licensed under MIT. We welcome pull requests, bug reports, and feature suggestions from the developer community.

How to Contribute

  1. Fork the Repository: Go to our GitHub and click "Fork".
  2. Clone Locally: git clone https://github.com/notamitgamer/ada-web.git
  3. Create Branch: git checkout -b feature/amazing-feature
  4. Commit & Push: Make your changes and push to your fork.
  5. Pull Request: Open a PR describing your changes.
View on GitHub

6 Support & Contact

Found a bug? Need a feature? Or just want to say hi? Here is how you can reach the developer.