ShareFollower

A connected ESP32 touchscreen dashboard for live portfolio tracking, local device storage, embedded web management, and web radio playback.

Project Summary

ShareFollower is a connected ESP32 dashboard for following a small investment portfolio from a dedicated touchscreen device. It shows live share prices, portfolio value, invested cost, gain or loss, currency conversion, and market status without needing to open a laptop or phone.

The project started as a stock-following display, then grew into a broader desk companion. The current build combines a portfolio dashboard, an on-device LVGL interface, a companion web interface, Wi-Fi setup tools, notification thresholds, chart views, currency settings, and a compact web radio player.

The interesting part is the blend of embedded UI and web UI. The ESP32 device is not just a display client: it stores portfolio data locally in NVS, fetches live financial data over Wi-Fi, renders a touch interface on the device, and serves a browser dashboard from the same firmware.

This is an embedded, local-device project with external market-data dependencies. The runtime is centered on the ESP32 hardware, while live quotes, chart data, ticker search, exchange rates, and radio streams come from online services.

Project Pages

What It Does Today

  1. The ESP32 device boots, initializes NVS storage, SPIFFS, the display, touch UI, audio codec, Wi-Fi, and the embedded web server.
  2. It loads saved portfolio items, transactions, Wi-Fi profiles, radio stations, exchange rates, and the selected system currency from local storage.
  3. It connects to Wi-Fi using saved profiles, with setup and scan tools available through the web interface.
  4. Every update cycle, it refreshes currency rates when needed and fetches live stock quotes from the selected data provider.
  5. The device display shows portfolio totals, per-ticker price and gain information, Wi-Fi status, time, API status, and a compact system monitor.
  6. A ticker can open a chart view with short-term price history and visual context against the stored purchase cost.
  7. The browser interface lets the user add, edit, sell, and remove portfolio items, configure alert thresholds, search tickers, review completed transactions, change currency settings, manage Wi-Fi, and manage radio stations.
  8. The radio feature stores stream URLs, plays MP3 streams through the device audio path, and supports uploaded station logos converted into raw RGB565 assets for fast rendering.

Current Features

  • ESP-IDF firmware for an ESP32 touchscreen dashboard.
  • LVGL-based on-device portfolio interface.
  • Embedded HTTP server with a single-page browser dashboard.
  • Local portfolio storage with up to 10 active tickers.
  • Transaction tracking for sold shares.
  • Live quote fetching through Yahoo Finance and Finnhub paths.
  • Ticker search through Finnhub.
  • Short-range chart data from Yahoo Finance.
  • Market phase display for regular, pre-market, post-market, closed, or extended sessions.
  • Dynamic system currency selection for EUR, USD, and TRY.
  • Live exchange-rate updates and local persistence of currency rates.
  • Automatic cost conversion when a new or edited asset uses a different currency from the system currency.
  • High, low, and jump-threshold price alerts.
  • Multi-profile Wi-Fi storage with retry and fallback behavior.
  • Wi-Fi setup page with network scanning.
  • On-device settings popup for currency selection.
  • Integrated web radio station list.
  • MP3 stream playback through a buffered decoder pipeline.
  • Radio station logo upload through the web UI, converted to raw RGB565 for device rendering.
  • SPIFFS storage for station logo assets.
  • Screenshot endpoint for capturing the current LVGL screen as raw display data.

Architecture

Touchscreen ESP32 device
-> ESP-IDF application
-> LVGL dashboard UI
-> portfolio, currency, Wi-Fi, radio, and stream managers
-> NVS and SPIFFS local storage

Browser dashboard
-> embedded HTTP server
-> JSON API routes
-> same local portfolio, Wi-Fi, settings, and radio state

Online services
-> market quotes, chart data, ticker search, currency rates, and audio streams

The firmware is organized around small managers with clear responsibilities. main initializes hardware and starts the recurring update task. The portfolio manager owns holdings, transactions, alert thresholds, price history, and NVS persistence. The quote client talks to external market-data APIs. The currency manager fetches and caches exchange rates. The UI manager renders the device interface and handles touch interactions. The web server exposes the browser dashboard and JSON API. The radio and stream managers store station metadata and handle audio playback.

There are two firmware variants in the repository. The current main firmware targets the ESP32-P4 plus ESP32-C6 style board with a 4.3 inch display, Wi-Fi, touch, audio, SPIFFS, and hosted wireless components. A separate ESP32-S3 capacitive variant exists as a port and earlier hardware path.

Main Components

  • ESP32 Firmware: The main embedded application that initializes hardware, starts services, and coordinates periodic updates.
  • LVGL Device UI: The on-screen dashboard for portfolio cards, totals, status indicators, chart views, alerts, settings, and radio controls.
  • Embedded Web Dashboard: A browser-based interface served directly from the device for portfolio management, Wi-Fi setup, chart viewing, settings, radio station management, and logo uploads.
  • Portfolio Manager: Local storage and business logic for holdings, cost basis, purchase dates, sold transactions, alert thresholds, and short-term price history.
  • Market Data Client: Quote, symbol lookup, chart, and fallback currency logic for Yahoo Finance and Finnhub-backed workflows.
  • Currency Manager: System-currency selection, exchange-rate refresh, conversion between supported currencies, and persistence of rates.
  • Wi-Fi Manager: Saved network profiles, setup access point, scan results, retry behavior, connected SSID reporting, and time synchronization support.
  • Web Server: HTTP routes for portfolio data, transactions, charts, settings, notifications, Wi-Fi, radio stations, station logos, ticker search, and screenshots.
  • Radio Manager: Persistent station list for named radio streams.
  • Stream Manager: HTTP or HTTPS stream connection, buffering, MP3 decoding, playback control, and UI feedback.
  • Audio Manager: Audio codec setup and a short boot chime.
  • SPIFFS Storage: File storage for uploaded station logo assets.

Services And Technologies Used

Current services and technologies:

  • ESP-IDF.
  • FreeRTOS tasks.
  • ESP HTTP Server.
  • LVGL 9.
  • cJSON.
  • NVS for persistent structured settings.
  • SPIFFS for station logo storage.
  • ESP Wi-Fi and SNTP.
  • ESP LCD, touch, and board support components.
  • ESP audio codec and I2S playback path.
  • MP3 decoding for web radio playback.
  • Yahoo Finance chart endpoints for quotes, candles, market phase, and currency rates.
  • Finnhub for quotes, symbol profile lookup, and ticker search.
  • HTML, CSS, JavaScript, and Chart.js for the embedded browser dashboard.

Planned or possible refinements:

  • A cleaner first-run setup flow that requires user-provided credentials and API keys before network calls.
  • More defensive API error handling and rate-limit feedback.
  • Broader chart ranges and local chart caching.
  • A public-safe sample configuration and build guide.
  • More polished media capture for the project page.

Design Principles

  • Keep the device useful at a glance, with dense but readable financial information on a small screen.
  • Store personal portfolio data locally on the device instead of depending on a separate backend.
  • Make core configuration available from the browser interface so the device can be managed without reflashing firmware.
  • Keep the device UI and web UI connected to the same underlying state.
  • Use cached rates and stored portfolio values to keep the dashboard useful between refreshes.
  • Separate hardware-facing code, data fetching, UI rendering, and persistence into focused modules.
  • Avoid publishing credentials, local network details, personal portfolio values, or exact private setup paths.

Roadmap

  • Remove hardcoded private defaults from the active firmware path and require user-provided credentials or a local secrets file.
  • Add a public setup guide with screenshots of the first-run Wi-Fi and API-key flow.
  • Improve chart caching to reduce external API calls.
  • Expand chart timeframes beyond the current short-range views.
  • Add clearer error states for API failures, disconnected Wi-Fi, and stale prices.
  • Add portfolio import and export for easier backup.
  • Add named dashboard or watchlist profiles.
  • Improve security around the embedded web interface before exposing it beyond a trusted local network.
  • Capture final device photos, screen photos, and a short demo video.

Project Status

ShareFollower is an active working prototype. The main firmware initializes the target hardware, renders the on-device dashboard, serves a browser interface, stores portfolio and radio state locally, fetches live quote and currency data, supports Wi-Fi setup, and plays web radio streams. The next milestone is public-release cleanup, clearer setup documentation, and polished media capture.