Overview
Create a separate experimental GUI for Indistocks using the Slint framework as an alternative to the existing egui-based interface. This is an experiment to evaluate Slint's capabilities - the current egui GUI will remain as-is.
Motivation
- Evaluate declarative UI approach vs. immediate mode (egui)
- Explore better separation between UI markup and business logic
- Test Slint's performance and developer experience for stock data visualization
- Compare cross-platform capabilities and binary sizes
References
Slint Resources
Local References
- Plotter example:
/home/nocodo/Projects/slint/examples/plotter - demonstrates chart integration with Plotters library
- Gallery example:
/home/nocodo/Projects/slint/examples/gallery - shows widget usage
Technical Approach
Project Structure
Indistocks/
├── indistocks-gui/ # EXISTING: Keep egui GUI as-is
├── indistocks-db/ # EXISTING: Shared backend (no changes)
└── indistocks-slint/ # NEW: Slint experiment
├── src/
│ └── main.rs
└── ui/
└── *.slint # Declarative UI markup
Setup Command
cd /home/nocodo/Projects/Indistocks
cargo generate --git https://github.com/slint-ui/slint-rust-template --name indistocks-slint
Then add to workspace in root Cargo.toml:
[workspace]
members = ["indistocks-gui", "indistocks-db", "indistocks-slint"]
Dependencies
slint = "1.13" (or latest)
slint-build = "1.13" (build dependency)
plotters = "0.3" (for chart rendering, following Slint's plotter example)
indistocks-db (existing shared backend)
Features to Replicate
All features from the existing GUI:
1. Top Navigation
- App title
- Search bar with real-time symbol lookup
- Navigation buttons (Stocks, Settings, Notifications)
2. Sidebar
- Recently viewed stocks list
- Clickable symbols with company names
3. Main Content - Stock Charts
- Historical price visualization using Plotters → Image buffer
- Interactive pan/zoom with TouchArea
- Time range filters (5D, 1M, 3M, 6M, 1Y, 5Y, All)
- Lazy loading for large datasets
- Adaptive date formatting
4. Stocks Grid
- Virtual scrolling table (using ListView)
- Display: Symbol, Name, LTP, % Change, Volume, High/Low
- Price range filters
- Time range selector
- Color-coded gains/losses
- Efficient rendering for thousands of rows
5. Settings Page
- NSE equity list download
- BhavCopy data download with progress tracking
- Status messages and date range display
Implementation Phases
Key Technical Challenges
- Charting: Slint has no native plotting - use Plotters to render to
SharedPixelBuffer then display as Image (see plotter example)
- State Management: Convert egui's immediate mode to Slint's property bindings and callbacks
- Virtual Scrolling: Use ListView component with efficient data models
- Async Operations: Handle downloads with callbacks and property updates
Success Criteria
Non-Goals
- Do NOT modify or remove the existing egui GUI
- Do NOT change the
indistocks-db backend
- This is purely an experiment to evaluate alternatives
Labels: enhancement, experiment, ui
Overview
Create a separate experimental GUI for Indistocks using the Slint framework as an alternative to the existing egui-based interface. This is an experiment to evaluate Slint's capabilities - the current egui GUI will remain as-is.
Motivation
References
Slint Resources
Local References
/home/nocodo/Projects/slint/examples/plotter- demonstrates chart integration with Plotters library/home/nocodo/Projects/slint/examples/gallery- shows widget usageTechnical Approach
Project Structure
Setup Command
cd /home/nocodo/Projects/Indistocks cargo generate --git https://github.com/slint-ui/slint-rust-template --name indistocks-slintThen add to workspace in root
Cargo.toml:Dependencies
slint = "1.13"(or latest)slint-build = "1.13"(build dependency)plotters = "0.3"(for chart rendering, following Slint's plotter example)indistocks-db(existing shared backend)Features to Replicate
All features from the existing GUI:
1. Top Navigation
2. Sidebar
3. Main Content - Stock Charts
4. Stocks Grid
5. Settings Page
Implementation Phases
Key Technical Challenges
SharedPixelBufferthen display as Image (see plotter example)Success Criteria
Non-Goals
indistocks-dbbackendLabels: enhancement, experiment, ui