Skip to content

Conversation

@Chaitu7032
Copy link
Contributor

Add floating chatbot UI component with modern design

  • Implement real-time stock analysis with technical indicators (RSI, Moving Averages)
  • Add investment recommendations and market data visualization
  • Support for both PostgreSQL (production) and SQLite (development)
  • Comprehensive error handling and responsive design"

@vercel
Copy link

vercel bot commented Sep 23, 2025

@Chaitu7032 is attempting to deploy a commit to the mihir2006's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thanks for creating this PR

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Chaitu7032, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new AI-powered stock analysis chatbot feature, enhancing the application's capabilities by providing real-time market insights and investment recommendations. The changes span both the backend and frontend, including flexible database configuration for development, integration with new financial data APIs, and the addition of a dedicated chatbot API and user interface. The aim is to offer users an interactive and intelligent tool for stock analysis.

Highlights

  • Flexible Database Configuration: The backend database setup now supports SQLite for development environments, automatically falling back to it if a PostgreSQL DATABASE_URL is not provided. This simplifies local development and testing.
  • New API Integrations: New environment variables for POLYGON_API_KEY and FINNHUB_API_KEY have been added, indicating integration with additional financial data providers to power the AI analysis.
  • Chatbot Backend Integration: A new chatbot router has been introduced and integrated into the FastAPI application, establishing the API endpoints for the AI-powered stock analysis chatbot functionality.
  • Chatbot Frontend UI: A new Chatbot UI component has been added to the frontend's main layout, providing a floating interface for users to interact with the AI-powered stock analysis tool.
  • Dependency Update: The aiohttp library has been added to the backend dependencies, likely to facilitate asynchronous HTTP requests for interacting with external services or AI models.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Chaitu7032 Chaitu7032 closed this Sep 23, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new AI-powered chatbot feature, including backend support for it with a new router and database configuration that allows for easier development with SQLite. The frontend is updated to include the chatbot UI. My review has identified a few critical issues that need to be addressed before merging. In backend/main.py, several routers are included twice, which will lead to duplicate API endpoints. Additionally, the frontend/app/HomeClient.tsx file contains temporary debugging code that disables the preloader and should be removed. Please see the detailed comments for specific suggestions.

Comment on lines +47 to +51
app.include_router(auth.router, prefix="/api", tags=["Authentication"])
app.include_router(stocks.router, prefix="/api", tags=["Stocks"])
app.include_router(market.router, prefix="/api", tags=["Market"])
app.include_router(portfolios.router, prefix="/api", tags=["Portfolios"])
app.include_router(chatbot.router, prefix="/api", tags=["Chatbot"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

These routers (auth, stocks, market, portfolios) are already included on lines 41-44 without a prefix. Including them again here with the /api prefix creates duplicate API endpoints. To fix this, you should remove the redundant app.include_router calls on lines 41-44.

Comment on lines +9 to +10
// Temporarily disable preloader for debugging
const [isLoading, setIsLoading] = useState(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change disables the preloader, likely for debugging purposes. This should be reverted to the original logic to ensure the preloader is shown to new visitors as intended.

Suggested change
// Temporarily disable preloader for debugging
const [isLoading, setIsLoading] = useState(false);
const [isLoading, setIsLoading] = useState(!hasShownPreloader);

setIsLoading(false);
hasShownPreloader = true;
}, 2500);
}, 500); // Reduced to 0.5 seconds for testing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The preloader timeout has been significantly reduced for testing. This should be reverted to its original value of 2500 to ensure the intended user experience.

Suggested change
}, 500); // Reduced to 0.5 seconds for testing
}, 2500);

"use client";
import { useEffect, useState } from "react";
import Landing from "@/components/Landing";
import SimpleLanding from "@/components/SimpleLanding";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The SimpleLanding component is imported but is not used within this file. It should be removed to keep the code clean and avoid potential confusion.

@Chaitu7032 Chaitu7032 reopened this Sep 23, 2025
@Chaitu7032 Chaitu7032 closed this Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant