BRAINROT is your unhinged AI bestie — a chaotic, Gen-Z-flavored AI chat assistant that delivers real-time streaming AI responses in a sleek modern interface.
Built with React + AI streaming, this project focuses on creating a smooth chat experience with a playful internet-style personality.
Many users want quick access to AI assistants for answering questions, generating content, or solving problems. However, building a full-scale AI system is complex and resource-intensive.
This project aims to develop a simple web-based AI assistant interface that allows users to interact with an AI model using natural language queries.
The Minimum Viable Product is the simplest version of the system that delivers the core functionality.
- ✅ A web-based chat interface
- ✅ User prompt input
- ✅ Integration with the Gemini API
- ✅ AI-generated response display
- ✅ Basic conversation flow
The MVP demonstrates how a frontend interface communicates with an AI model through an API to generate responses in real time.
A simple UI where users can type prompts and view responses.
- Technologies: React, Tailwind CSS, shadcn/ui
The system accepts user input and sends it to the backend server.
- Capture user query
- Send API request
The backend connects to Google Gemini to generate intelligent responses.
- Model:
gemini-3-flash(via Lovable AI Gateway)
The application securely integrates with the AI model using a backend Edge Function.
- Prompt submission
- Response retrieval
- Real-time streaming interaction
User
↓
Frontend (React Chat UI)
↓
Backend (Edge Function)
↓
Gemini API (via AI Gateway)
↓
AI Response (SSE Stream)
↓
Frontend Display (Token-by-token)
- Basic chat UI
- Gemini API integration
- Text prompt & response
- Simple conversation display
- Real-time streaming responses
- Markdown rendering
- Chat history persistence
- User authentication
- Voice input
- Image input
- Context memory
- Multi-model support
- AI prompt suggestions
- Multi-conversation threads
- Personalized AI assistant
| Layer | Technology |
|---|---|
| Frontend | React, TypeScript, Vite, Tailwind CSS, shadcn/ui |
| AI Model | Google Gemini 3 Flash |
| AI Gateway | Lovable AI Gateway |
| Backend | Lovable Cloud (Edge Functions) |
| Streaming | Server-Sent Events (SSE) |
git clone https://github.com/Keerthipriya27/BRAINROT.gitcd BRAINROTnpm installnpm run devThe app will start locally on:
http://localhost:5173
src/
├── components/ # UI components (ChatMessage, ChatInput, etc.)
├── lib/ # Utility functions (streamChat helper)
├── pages/ # Page components
└── integrations/ # Backend client configuration
supabase/
└── functions/
└── chat/ # Streaming chat edge function
- User sends a message through the chat interface.
- The message is sent to the backend Edge Function.
- The backend communicates with the Gemini 3 Flash model through the AI Gateway.
- Responses are streamed back to the frontend in real time using SSE.
- Tokens are rendered as they arrive for a smooth chat experience.
The MVP successfully demonstrates how a web interface can interact with a generative AI model to provide intelligent responses, forming the foundation for more advanced AI-powered applications.
Keerthipriya
🔗 LinkedIn: Keerthipriya Peddada
💻 GitHub: Keerthipriya27
Contributions are welcome!
- Fork the repository
- Create a new branch
- Commit your changes
- Open a Pull Request
This project is licensed under the MIT License.
⭐ If you like this project, consider starring the repository.
