Skip to content

punkouter26/PoRobotStocks

Repository files navigation

PoRobotStocks 🤖📈

.NET 10 Azure License

PoRobotStocks is an AI-powered robotics & automation stock research dashboard for retail investors. It aggregates 80+ curated tickers across 25 thematic categories, enriches each with GPT-4o investment analysis and sentiment scoring, and presents everything in a zero-login Blazor WASM SPA hosted on Azure App Service.

Architecture Overview

flowchart LR
    U["Investor\n(Browser)"]
    FD["Azure Front Door\n(CDN + WAF)"]
    APP["App Service\nBlazor WASM + .NET 10 API"]
    TS["Azure Table Storage\n(Stock Persistence)"]
    AI["Azure OpenAI\n(GPT-4o Analysis)"]
    AV["Alpha Vantage\n(Market Data)"]

    U --> FD --> APP
    APP --> TS
    APP --> AI
    APP --> AV
Loading

Full architecture details: docs/Architecture.mmd · docs/Architecture_SIMPLE.mmd

Documentation

File Description
docs/Architecture.mmd C4 Level 1 — Azure deployment topology (App Service, Table Storage, OpenAI, Front Door)
docs/Architecture_SIMPLE.mmd Simplified deployment topology (high-level nodes)
docs/SystemFlow.mmd Full sequence: user journey + data pipeline + auth flow
docs/SystemFlow_SIMPLE.mmd Simplified data flow (cache-hit vs. cache-miss paths)
docs/DataModel.mmd Entity Relationship Diagram — full domain model + Table Storage mapping
docs/DataModel_SIMPLE.mmd Core ERD (Stock aggregate relationships only)
docs/ProductSpec.md PRD — business logic, feature definitions, success metrics
docs/DevOps.md Deployment guide, CI/CD, environment secrets, Day-1 Docker Compose setup
docs/screenshots/ App screenshots for visual reference

🚀 Features

  • Robotics Universe: 80+ pre-curated tickers across 25 categories (core robotics, autonomous vehicles, AI chips, medical, ETFs, defense, and more)
  • AI Stock Analysis: GPT-4o pipeline — technical indicators + sentiment → Buy/Hold/Sell recommendation with confidence score
  • Real-time Market Data: Live quotes and 252-day OHLCV charts via Alpha Vantage with smart caching
  • Interactive Dashboard: RadzenDataGrid with filtering, sorting, search, and skeleton loading states
  • Watchlist: Client-side localStorage watchlist with live price and AI Score columns
  • Health Monitoring: /health JSON endpoint + /diag UI covering all connected services

🛠️ Technology Stack

Frontend

  • Blazor WebAssembly (.NET 10) — Interactive SPA
  • Radzen Blazor — DataGrid, Charts, Notifications, Dialogs

Backend API

  • FastEndpoints — Vertical Slice Architecture endpoints
  • ASP.NET Core 10 — Minimal hosting model
  • FluentValidation — Request validation
  • Serilog — Structured logging with Application Insights sink

Data & Storage

  • Azure Table Storage — Primary data persistence (PoRobotStocksStock table)
  • Azurite (Docker) — Local storage emulator

AI & Analytics

  • Azure OpenAI (GPT-4o) — Investment analysis and scoring
  • Azure AI Language (TextAnalytics) — Sentiment analysis
  • Alpha Vantage API — Real-time and historical market data

Resilience & Observability

  • Polly — Retry + circuit breaker on Table Storage client
  • OpenTelemetry — Traces and metrics to Application Insights
  • Health Checks — Table Storage, Alpha Vantage, Azure OpenAI, Azure AI Language

📋 Prerequisites

☁️ Deployment

See docs/DevOps.md for full CI/CD pipeline details.

Live URL: https://porobotstocks.azurewebsites.net

Deployments are triggered automatically on push to master via GitHub Actions (OIDC federated credentials → azd provision + az webapp deploy).

# One-time manual deploy
azd auth login
azd provision
azd deploy

🏃‍♂️ Getting Started

See docs/DevOps.md for the complete Day-1 setup guide, including Docker Compose, environment secrets, and CI/CD pipeline details.

Quick start

git clone https://github.com/punkouter25/PoRobotStocks.git
cd PoRobotStocks

# Start Azurite storage emulator
docker compose up -d

# Configure appsettings.Development.json (see docs/DevOps.md §3)

# Run the application
dotnet run --project src/PoRobotStocks.Web --launch-profile http
URL Description
http://localhost:5000/stocks Stocks Dashboard
http://localhost:5000/health Health check JSON
http://localhost:5000/diag Diagnostics UI
http://localhost:5000/scalar/v1 Scalar API reference

🔌 API Endpoints

Endpoint Method Description
GET /api/stocks GET List all curated robotics stocks
GET /api/stocks/{ticker} GET Detailed stock with charts, AI Score, technical analysis
POST /api/stocks/refresh POST Trigger incremental refresh (5 tickers per call)
GET /health GET JSON health report for all connected services
GET /api/diag GET Configuration diagnostics with masked values

🧪 Testing

# Unit tests
dotnet test tests/Po.RobotStocks.UnitTests/

# Integration tests (requires Azurite + secrets)
dotnet test tests/PoRobotStocks.IntegrationTests/

# E2E tests (requires running app on :5000)
cd tests/Po.RobotStocks.E2ETests && npm install && npx playwright test

🔍 Monitoring

  • Logs: Serilog → Console + logs/log-{date}.txt + Application Insights sink
  • Traces/Metrics: OpenTelemetry → Application Insights
  • Health: /health (pull-based JSON), /diag (Blazor UI)

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors