A real-time analytics dashboard for monitoring GraphMemory-IDE system performance, built with Streamlit and FastAPI.
- 📊 Real-time Analytics: Live system performance metrics
- 🧠 Memory Insights: Memory distribution and growth tracking
- 🔗 Graph Metrics: Network topology and connectivity analysis
- 🔄 Live Updates: Auto-refreshing data streams using Streamlit fragments
- 🔐 Authentication: JWT-based login system
- 📱 Responsive Design: Mobile-friendly interface
- Python 3.11+
- FastAPI server running on port 8000 (from Phase 1)
- Required dependencies (see requirements.txt)
-
Install dependencies:
pip install -r requirements.txt
-
Run the dashboard:
streamlit run streamlit_app.py
-
Access the dashboard: Open your browser to
http://localhost:8501
Use the same credentials configured for your FastAPI backend.
dashboard/
├── streamlit_app.py # Main application entry point
├── .streamlit/
│ └── config.toml # Streamlit configuration
├── components/ # Reusable UI components
│ ├── auth.py # Authentication components
│ ├── metrics.py # Metrics display components
│ ├── charts.py # Chart visualization components
│ └── layout.py # Layout and navigation components
├── utils/ # Utility functions
│ ├── api_client.py # FastAPI SSE client
│ ├── chart_configs.py # ECharts configuration generators
│ └── auth_utils.py # Authentication utilities
└── assets/ # Static assets
└── styles.css # Custom CSS styling
The dashboard uses Streamlit's @st.fragment(run_every=seconds) decorator for real-time updates:
- Analytics metrics: Updates every 2 seconds
- Memory metrics: Updates every 5 seconds
- Graph metrics: Updates every 3 seconds
- Charts: Auto-refresh with data streams
- Start/Stop: Control real-time streaming from the sidebar
- Refresh Rate: Configurable update frequency
- Status Indicator: Live streaming status display
- JWT-based login form
- Session state management
- Token validation and refresh
- User information display
- Real-time system performance metrics
- Memory distribution and growth tracking
- Graph topology statistics
- Health score calculation
- Apache ECharts integration via streamlit-echarts
- Fallback to native Streamlit charts
- Real-time data visualization
- Interactive chart controls
- Responsive page configuration
- Sidebar navigation and controls
- System status monitoring
- Custom CSS loading
The dashboard connects to FastAPI endpoints:
GET /dashboard/latest- Fetch latest dataGET /dashboard/status- Server status and connection infoPOST /auth/token- User authentication
- Custom theme colors
- Server settings
- Browser configuration
FASTAPI_URL- FastAPI server URL (default: http://localhost:8000)LOG_LEVEL- Logging level (default: INFO)
-
Connection Error
- Ensure FastAPI server is running on port 8000
- Check network connectivity
- Verify authentication credentials
-
Import Errors
- Install all dependencies:
pip install -r requirements.txt - Check Python version compatibility
- Install all dependencies:
-
Chart Display Issues
- Install streamlit-echarts:
pip install streamlit-echarts - Fallback charts will be used if ECharts unavailable
- Install streamlit-echarts:
-
Authentication Problems
- Verify FastAPI auth endpoints are working
- Check JWT token configuration
- Clear browser cache/session state
Run with debug logging:
LOG_LEVEL=DEBUG streamlit run streamlit_app.py- Create component in
components/directory - Add utility functions to
utils/if needed - Import and use in
streamlit_app.py - Update this README
Modify assets/styles.css for custom styling. The CSS is automatically loaded by the layout component.
- streamlit: Web app framework
- streamlit-echarts: Apache ECharts integration
- requests: HTTP client for API calls
- PyJWT: JWT token handling
- pandas: Data manipulation
- numpy: Numerical operations
Part of the GraphMemory-IDE project. See main project LICENSE file.