Rippler UI
Flutter-based web and desktop interface for the Rippler impact analysis system.
Architecture Diagram
The following diagram illustrates the internal architecture of the Rippler UI, showing the Next.js application structure with pages/routes, React components, state management, API client services, and integration with backend services.
To view and edit the architecture diagram:
- Open
/docs/architecture/services/rippler-ui.drawioin diagrams.net or VS Code with the Draw.io extension - The diagram shows the complete frontend architecture including Next.js pages, React components, API integration, WebSocket connections, state management, and SSO authentication
- After making changes, export to HTML and copy to
/website/static/architecture/services/rippler-ui.drawio.html
Overview
Rippler UI provides a modern, responsive interface for visualizing impact analysis results, managing repositories, and monitoring the health of the Rippler ecosystem.
Features
- Dashboard: Overview of recent analyses and system health
- Repository Management: Onboard and configure repositories
- Dependency Visualization: Interactive dependency graph visualization
- PR Impact View: Detailed view of pull request impact analysis
- Service Monitor: Real-time monitoring of microservice health
- Settings: Configure system preferences and integrations
- Responsive Design: Works seamlessly on web and desktop
Technology Stack
- Flutter: Cross-platform UI framework
- Dart: Programming language
- Flutter Web: Web deployment target
- Flutter Desktop: Native desktop apps (Windows, macOS, Linux)
- Provider: State management
- HTTP: API communication
Quick Start
Prerequisites
- Flutter SDK 3.0+
- Dart SDK 3.0+
- Chrome (for web development)
Installation
# Clone the repository
git clone https://github.com/Citi-Rippler/rippler-ui.git
cd rippler-ui
# Get dependencies
flutter pub get
Running
Web (Development)
# Run in development mode
flutter run -d chrome --web-port 3000
# Or from project root
make ui-dev
Web (Production Build)
# Build for production
flutter build web --release
# Serve the built files
cd build/web
python -m http.server 3000
Desktop
# Run on desktop
flutter run -d macos # macOS
flutter run -d windows # Windows
flutter run -d linux # Linux
Using Docker
# Build and run
docker-compose up rippler-ui
# Access at http://localhost:18000
Project Structure
lib/
├── main.dart # Application entry point
├── app/
│ ├── app.dart # App configuration
│ └── routes.dart # Route definitions
├── screens/
│ ├── dashboard/ # Dashboard screen
│ ├── repositories/ # Repository management
│ ├── analysis/ # Impact analysis views
│ ├── graph/ # Dependency graph visualization
│ └── settings/ # Settings screen
├── widgets/
│ ├── common/ # Reusable widgets
│ ├── charts/ # Chart components
│ └── cards/ # Card components
├── services/
│ ├── api_service.dart # API client
│ └── auth_service.dart # Authentication
├── models/
│ ├── repository.dart # Data models
│ ├── analysis.dart
│ └── service.dart
└── utils/
├── constants.dart # App constants
└── helpers.dart # Helper functions
Features
Dashboard
The main dashboard provides:
- Recent impact analyses
- System health metrics
- Quick actions
- Service status overview
Repository Management
- Browse repositories
- Onboard new repositories
- Configure webhooks
- View repository settings
Dependency Graph
Interactive visualization showing:
- Service dependencies
- Impact paths
- Circular dependencies
- Service metadata
Impact Analysis View
Detailed PR analysis including:
- Summary of changes
- Affected services
- Risk assessment
- Recommendations
- Stakeholder notifications
Service Monitor
Real-time monitoring:
- Service health status
- Response times
- Error rates
- Resource usage
Configuration
Environment Configuration
Create .env file in the project root:
# API Gateway URL
API_BASE_URL=http://localhost:18000
# Feature Flags
ENABLE_ANALYTICS=true
ENABLE_NOTIFICATIONS=true
# UI Configuration
DEFAULT_PAGE_SIZE=20
REFRESH_INTERVAL=30000
API Integration
The UI connects to backend services through the API Gateway:
// lib/services/api_service.dart
class ApiService {
static const String baseUrl = 'http://localhost:18000';
Future<List<Repository>> getRepositories() async {
final response = await http.get(
Uri.parse('$baseUrl/api/v1/repositories'),
);
// Handle response
}
}
Development
Running Tests
# Run all tests
flutter test
# Run with coverage
flutter test --coverage
# Run integration tests
flutter drive --target=test_driver/app.dart
# Or from project root
make test-ui
Code Quality
# Analyze code
flutter analyze
# Format code
flutter format lib/
# Or from project root
make ui-analyze
Building
# Build for web
flutter build web --release
# Build for desktop
flutter build macos --release # macOS
flutter build windows --release # Windows
flutter build linux --release # Linux
# Or from project root
make ui-build
Deployment
Web Deployment
Using Docker
# Build Docker image
docker build -t rippler-ui .
# Run container
docker run -p 18000:80 rippler-ui
Static Hosting
The web build generates static files that can be hosted on:
- GitHub Pages
- Netlify
- Vercel
- AWS S3 + CloudFront
- Any static file server
# Build production files
flutter build web --release
# Deploy build/web directory
Desktop Deployment
Desktop applications can be distributed as:
- Installers (MSI, DMG, DEB)
- Standalone executables
- App Store packages
Usage
Connecting to Backend
- Ensure API Gateway is running on port 18000
- Configure API_BASE_URL in environment
- Start the UI application
- Navigate to http://localhost:3000
Viewing Impact Analysis
- Navigate to "Repositories"
- Select a repository
- Click on a pull request
- View impact analysis results
Visualizing Dependencies
- Navigate to "Dependencies"
- Select services to visualize
- Interact with the graph
- View dependency paths
Troubleshooting
Connection Errors
- Verify API Gateway is running
- Check API_BASE_URL configuration
- Review CORS settings
- Check browser console for errors
Build Failures
- Clean build artifacts:
flutter clean - Get dependencies:
flutter pub get - Check Flutter version:
flutter doctor - Review build logs
Related Documentation
Repository
GitHub: rippler-ui