StockUP is a sophisticated AI assistant for stock market analysis and recommendations. It leverages advanced AI algorithms to suggest optimal stock trading strategies and offers users a comprehensive dashboard to track stock performance.
This application is for educational and research purposes only. It is not intended to serve as investment advice. StockUP is not responsible for any losses or gains made while using this application.
- Displays historical stock data (1d, 5d, 1mo, 6mo, 1y, 5y).
- Shows general stock information and latest news.
- Provides AI-powered analysis and trading recommendations for stocks using Google Gemini.
- Includes an AI chatbot for specific stock-related queries, also powered by Google Gemini.
- Homepage features a dashboard for "big seven" tech companies.
- Backend: Python, FastAPI, Poetry (for dependency management), Google Gemini API.
- Frontend: Svelte, Vite, TypeScript, Node.js.
- Node.js and npm (or pnpm/yarn)
- Python (3.9+ recommended)
- Poetry
backend/: Contains the FastAPI application.frontend/: Contains the SvelteKit application.
- Clone the repository:
git clone <repository-url> - Navigate to the project directory:
cd <project-name>
- Navigate to the backend directory:
cd backend - Create a virtual environment (optional but recommended if not using Poetry's env management):
python -m venv .venvandsource .venv/bin/activate(or.\.venv\Scripts\activateon Windows). - Install dependencies:
poetry install - Set up environment variables:
- Copy
.env.exampleto.env:cp .env.example .env - Add your Google Gemini API Key to
.env:GEMINI_API_KEY="YOUR_API_KEY"
- Copy
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install(orpnpm install/yarn install)
- Navigate to
backend/. - Run:
poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
- Navigate to
frontend/. - Run:
npm run dev -- --host- Alternatively, use
npm run dev -- --opento automatically open the app in a new browser tab.
- Alternatively, use
- Access the application in your browser, usually at
http://localhost:5173.
To create a production version of the frontend app:
- Navigate to
frontend/. - Run:
npm run build
You can preview the production build locally (after building) with: npm run preview.
- Navigate to
backend/. - Run unit tests:
pytest . - Linters/Formatters:
poetry run pylint .poetry run black .poetry run pre-commit run --all-files
- Navigate to
frontend/. - Run linter:
npm run lint - Run formatter:
npm run format
- The project includes a
backend/Dockerfilethat can be used to build a container image for the application. - This Dockerfile builds the frontend and serves it using the FastAPI backend.
- Build the image:
docker build -t stockup-app -f backend/Dockerfile . - Run the container:
docker run -p 8000:8000 -e GEMINI_API_KEY="YOUR_API_KEY" stockup-app
- Contributions are welcome! Please feel free to open an issue or submit a pull request.
- Check the
.github/ISSUE_TEMPLATE/for reporting bugs or requesting features. - Follow the existing coding style and ensure tests pass before submitting a PR.