Skip to content

Soumya-prog-tech/FinTerminal

Repository files navigation

Dashboard

Graph

Portfolio

FinTerminal

A high-performance, real-time stock analysis and portfolio tracking dashboard.

Python React FastAPI Docker Tailwind

Deployment

Deployed Frontend Link : https://spring-street-assignment-reja.vercel.app/

Backend is deployed on render so it may take one minute for the server to spun up again.

Quick Start (Docker - Recommended)

This is the easiest way to run the application.

  1. Run the following command in the root directory:

    docker compose up --build
  2. Access the application:

Manual Setup (Fallback)

If you do not have Docker installed, follow these steps to run the backend and frontend manually.

Backend

  1. Install dependencies:
    pip install -r requirements.txt
  2. Start the server:
    uvicorn app.main:app --reload

Frontend

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

Note: The frontend is configured to look for the backend at http://localhost:8000 by default. You can change this by setting the VITE_API_URL environment variable in a frontend/src/lib/api.js file in the frontend directory.

Architecture & Approach

Backend: Built with FastAPI to ensure high-performance asynchronous processing. The system leverages Pandas for efficient, vectorized financial calculations (including SMA, RSI, and Volatility metrics) and integrates YFinance for live market data retrieval. To optimize performance and respect API rate limits, lru_cache is implemented for frequently accessed data.

Frontend: Developed using React and Vite for a fast, modern development experience and optimized build performance. The UI is styled with Tailwind CSS, featuring a bespoke, "Pro" dark mode design with glassmorphism effects, avoiding generic component libraries. State management is handled via React Context to maintain data consistency across the Dashboard and Portfolio views.

Data Visualization: Charts are rendered using ApexCharts and Recharts. These libraries are optimized with windowing techniques to efficiently handle large datasets (such as 5-year historical data) without causing browser lag or rendering issues.

Portfolio Logic: The portfolio system utilizes a "Time-Travel Simulation" approach. Instead of relying on a static database of transactions, it calculates Profit & Loss (P&L) dynamically based on historical entry points (simulating investments made 1 year, 3 years, or 5 years ago). This allows for flexible and immediate performance analysis under different historical scenarios.

Key Features

  • Real-time Stock Search & Analytics: Instantly search for global tickers to view live price data, daily change, and volume metrics.
  • Pro-Level Interactive Charts:
    • Granular Time Controls: Switch seamlessly between 1D, 1W, 1M, 1Y, 3Y, and 5Y periods.
    • Smart Interval Logic: The backend automatically adjusts data resolution (e.g., using 5-minute candles for the 1-Day view vs. Daily candles for the 1-Year view) for maximum precision.
    • Technical Overlays: Visual indicators for SMA (Simple Moving Average), RSI (Relative Strength Index), and Volatility.
  • Simulated Portfolio Intelligence:
    • "Time-Travel" Backtesting: Simulates a $10,000 investment at the start of any selected period to calculate hypothetical P&L, Total Return, and Net Liquidity.
    • Dynamic Balance Tracking: The "Total Balance" and "Profit" cards update instantly based on the selected time horizon (e.g., see your hypothetical returns from buying NVDA 3 years ago vs. 1 month ago).
  • Financial Hero Section: A dedicated dashboard header displaying Net Worth, Invested Capital, and a split view of Today's P&L vs. Total P&L with clear color-coded signals.
  • High-Performance UI:
    • Boutique Design: Custom "Glassmorphism" aesthetic with Tailwind CSS (no generic Bootstrap components).
    • Smooth Animations: Staggered entry animations powered by Framer Motion for a premium app feel.
    • Optimized Rendering: Uses windowing techniques to render 5+ years of data without browser lag.

Releases

No releases published

Packages

 
 
 

Contributors