RadegastWeb is a modern, web-based Second Life client inspired by the original Radegast client. It supports multiple concurrent accounts, each running in isolated threads with their own cache and log directories.
- Multi-Account Management: Run multiple Second Life accounts simultaneously
- Isolated Environments: Each account has its own thread, cache, and logs
- Real-time Communication: Built with SignalR for instant updates
- Web-Based Interface: Access from any modern web browser
- RESTful API: Complete API for account and chat management
- Responsive Design: Works on desktop and mobile devices
- Database Integration: SQLite database with Entity Framework Core
- Display Name Support: Full display name resolution and management
- Notice System: Group notices and attachment handling
- Presence Management: Automatic presence updates and status tracking
- Region Information: Real-time region statistics and details
- Dark Mode: Toggle between light and dark themes
- Chat History: Persistent chat logging with database storage
- Swagger API Documentation: Complete API documentation and testing interface
- AI Chat Bot Plugin: Intelligent chat responses with configurable AI providers (OpenAI, Anthropic, local models)
- Corrade Plugin: Remote control via whisper commands for message relaying and bot functionality
- Framework: ASP.NET Core 8.0
- Database: SQLite with Entity Framework Core 9.0
- Real-time: SignalR with enhanced message handling
- Protocol: LibreMetaverse (OpenMetaverse) 2.4.10
- Logging: Serilog with structured logging and file rotation
- Frontend: Bootstrap 5 + Vanilla JavaScript with FontAwesome icons
- Background Services: Isolated background services for SL protocol events
- Dependency Injection: Full DI container with singleton and scoped services
- Validation: FluentValidation for input validation
- Auto Mapping: AutoMapper for object-to-object mapping
- .NET 8.0 SDK
For linux
see https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install
apt-get install -y dotnet-sdk-8.0
- Visual Studio Code (recommended)
-
Clone and Navigate
git clone https://github.com/JaraLowell/RadeWeb.git
cd RadeWeb
-
Restore Dependencies
dotnet restore RadeWeb.sln
-
Build the Project
dotnet build RadeWeb.sln
-
Update Database (if upgrading from older version)
./update-database.ps1
Or manually:
dotnet ef database update --project RadegastWeb.csproj -
Run the Application
dotnet run
-
Open in Browser
- Main application:
http://localhost:15269 - Login page:
http://localhost:15269/login.html - Statistics dashboard:
http://localhost:15269/stats.html
- Main application:
- Open the project in VS Code
- Use
Ctrl+Shift+Pβ "Tasks: Run Task" β "Run RadegastWeb" - Or press
F5to start debugging
The application uses SQLite database stored in ./data/radegast.db. The database is automatically created on first run with Entity Framework migrations.
RadegastWeb/
βββ Controllers/ # API Controllers
β βββ AccountsController.cs # Account management API
β βββ AuthController.cs # Authentication API
β βββ ChatLogsController.cs # Chat logging API
β βββ CorradeController.cs # Corrade plugin API
β βββ GroupsController.cs # Group management API
β βββ PresenceController.cs # Presence/status management
β βββ RegionController.cs # Region information API
β βββ StatsController.cs # Statistics API
β βββ TestController.cs # Testing and debug API
βββ Core/ # Core Second Life logic
β βββ WebRadegastInstance.cs # Main SL client wrapper
βββ Data/ # Database context and migrations
β βββ RadegastDbContext.cs # Entity Framework context
β βββ DbContextFactory.cs # Context factory
β βββ Migrations/ # EF database migrations
βββ Hubs/ # SignalR Hubs
β βββ RadegastHub.cs # Real-time communication hub
βββ Models/ # Data models and DTOs
β βββ Account.cs # Account entity
β βββ ChatMessage.cs # Chat message entity
β βββ DisplayName.cs # Display name entity
β βββ Notice.cs # Group notice entity
β βββ Dto.cs # Data transfer objects
β βββ NoticeDto.cs # Notice DTOs
β βββ RegionStatsDto.cs # Region statistics DTOs
βββ Services/ # Business logic services
β βββ AccountService.cs # Account management
β βββ AiChatService.cs # AI Chat Bot service
β βββ AuthenticationService.cs # User authentication
β βββ ChatHistoryService.cs # Chat logging and history
β βββ ChatLogService.cs # Chat log management
β βββ CorradeService.cs # Corrade plugin service
β βββ DisplayNameService.cs # Display name resolution
β βββ GlobalDisplayNameCache.cs # Global display name caching
β βββ GroupService.cs # Group management
β βββ NameResolutionService.cs # Name resolution utilities
β βββ NoticeService.cs # Group notice handling
β βββ PeriodicDisplayNameService.cs # Periodic name updates
β βββ PresenceService.cs # Presence management
β βββ RadegastBackgroundService.cs # Background SL processing
β βββ RegionInfoService.cs # Region information
β βββ RegionMapCacheService.cs # Region map caching
β βββ SlUrlParser.cs # SL URL parsing
β βββ StatsService.cs # Statistics collection
βββ wwwroot/ # Static web files
β βββ css/
β β βββ main.css # Main stylesheet
β β βββ region-info.css # Region info styling
β βββ js/
β β βββ main.js # Main application logic
β β βββ presence-client.js # Presence management client
β β βββ region-info.js # Region info client
β βββ index.html # Main web interface
β βββ login.html # Authentication page
β βββ corrade.html # Corrade plugin management interface
β βββ stats.html # Statistics dashboard
βββ data/ # Runtime data
β βββ radegast.db # SQLite database
β βββ aibot.json # AI Chat Bot configuration
β βββ AIBot_README.md # AI Bot setup documentation
β βββ corrade.json # Corrade plugin configuration
β βββ Corrade_README.md # Corrade plugin documentation
β βββ accounts/ # Per-account data
β βββ {accountId}/
β βββ cache/ # Asset cache
β βββ logs/ # Chat logs
βββ logs/ # Application logs
β βββ radegast-web-{date}.log # Daily log files
βββ bin/ # Compiled binaries
βββ obj/ # Build artifacts
βββ Properties/ # Project properties
βββ Migrations/ # Entity Framework migrations
RadegastWeb uses SQLite by default with Entity Framework Core:
- Database Location:
./data/radegast.db - Migrations: Automatic creation and updates
- Supported Entities: Accounts, ChatMessages, DisplayNames, Notices
RadegastWeb supports multiple grids:
- Second Life Main Grid (Agni)
- Second Life Beta Grid (Aditi)
- Custom OpenSimulator Grids
Each account gets:
- Isolated Thread: Independent processing with background services
- Cache Directory:
./data/accounts/{accountId}/cache/ - Log Files:
./data/accounts/{accountId}/logs/ - Session State: Separate connection state and database records
- Display Names: Cached display name resolution
- Chat History: Persistent chat logging
Application uses Serilog with:
- Console Output: For development debugging
- File Logging: Daily rolling log files in
./logs/ - Structured Logging: JSON-structured log entries
- Log Levels: Configurable via appsettings.json
- Click the "Add Account" button in the top-right corner
- Enter your Second Life credentials:
- First Name: Your avatar's first name
- Last Name: Your avatar's last name
- Password: Your account password
- Grid: Select grid (Second Life, Beta Grid, or custom)
- Save the account - it will appear in the accounts sidebar
- Login: Select account and click "Login" to connect
- Logout: Click "Logout" to disconnect
- Delete: Remove account from the system
- Status: Real-time connection status updates
- Select a connected account from the sidebar
- Use the chat interface to:
- Send messages: Type and press Enter or click Send
- Chat types: Normal, Whisper, Shout
- View history: Scroll through persistent chat history
- Real-time updates: Receive messages instantly via SignalR
- Automatic display name resolution for all users
- Cached display names for performance
- Real-time updates when display names change
- Receive group notices automatically
- View notice details and attachments
- Persistent storage of notice history
- View detailed region statistics
- Monitor region performance metrics
- Real-time updates of region data
- Automatic presence detection
- Browser close detection sets accounts to "Away"
- Manual presence control
RadegastWeb includes two powerful plugin systems that extend functionality:
The AI Chat Bot plugin adds intelligent chat responses to your Second Life avatar. Features include:
- Multiple AI Providers: Support for OpenAI, Anthropic Claude, OpenRouter, and local Ollama models
- Configurable Personality: Customize system prompts and behavior
- Smart Triggering: Respond to name mentions, questions, or specific keywords
- Chat Context: Include recent chat history for contextual responses
- Security Features: UUID-based ignore lists and permission controls
- Natural Delays: Randomized response delays for realistic behavior
- Resource Management: Message size limits and history controls
Configuration: Edit data/aibot.json or see data/AIBot_README.md for detailed setup instructions.
Quick Setup:
- Set your avatar name in the configuration
- Add your AI provider API key
- Configure response triggers and personality
- Set
enabled: trueand restart RadegastWeb
The Corrade plugin enables remote control of your avatar through whisper commands, inspired by the Corrade bot system:
π This plugin is still under construction and more functions might be added.
- Whisper Command Processing: Execute commands via whispered messages
- Multi-Entity Support: Send messages to local chat, groups, or individual avatars
- Group-Based Security: Commands must be authorized by configured groups
- Password Protection: Each group requires a password for command execution
- Permission System: Fine-grained control over allowed message types
- Web Management: Full configuration through web interface at
/corrade.html - Automatic Activation: Plugin enables when groups are configured
Configuration: Use the web interface at /corrade.html or edit data/corrade.json directly. See data/Corrade_README.md for complete documentation.
Command Examples:
- Local chat:
command=tell&group=GROUP_UUID&password=PASS&entity=local&message=Hello! - Group message:
command=tell&group=GROUP_UUID&password=PASS&entity=group&message=Group hello! - Private message:
command=tell&group=GROUP_UUID&password=PASS&entity=avatar&target=AVATAR_UUID&message=Hi there!
The Avatar Command Relay feature provides direct avatar control through IM commands from a designated relay avatar:
- Direct Avatar Control: Sit, stand, say, and send IMs through simple commands
- Relay Avatar Security: Only commands from the configured AvatarRelayUuid are processed
- Simple Command Syntax: Easy-to-remember commands like
//sit <uuid>,//stand,//say <message> - Real-time Feedback: Success/error messages sent back to the relay avatar
- No Group Setup Required: Works independently of Corrade groups and passwords
- Immediate Response: Commands are processed instantly when received
Supported Commands:
//sit <uuid>- Sit on specified object//stand- Stand up from current position//say <message>- Say message in local chat//im <uuid> <message>- Send instant message to avatar
Configuration: Set the AvatarRelayUuid field in account settings to the UUID of the controlling avatar. See AVATAR_COMMAND_RELAY.md for complete documentation and examples.
Both plugins are designed with security in mind and include comprehensive logging and error handling.
π Interactive API Documentation: Visit
/swaggerfor complete API documentation with testing capabilities (need be loged in)
POST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/status- Check authentication status
GET /api/accounts- List all accounts with statusPOST /api/accounts- Create new accountGET /api/accounts/{id}- Get account detailsDELETE /api/accounts/{id}- Delete accountPOST /api/accounts/{id}/login- Login accountPOST /api/accounts/{id}/logout- Logout accountPOST /api/accounts/{id}/chat- Send chat messageGET /api/accounts/{id}/chat- Get chat historyPUT /api/accounts/{id}/appearance- Update avatar appearance
GET /api/chatlogs/{accountId}- Get chat logs for accountGET /api/chatlogs/{accountId}/history- Get chat history with paginationDELETE /api/chatlogs/{accountId}- Clear chat logs for account
GET /api/groups/{accountId}- Get groups for accountPOST /api/groups/{accountId}/join- Join a groupPOST /api/groups/{accountId}/leave- Leave a groupPOST /api/groups/{accountId}/chat- Send group messageGET /api/groups/{accountId}/{groupId}/notices- Get group notices
POST /api/presence/browser-close- Handle browser close (set all to away)POST /api/presence/{accountId}/status- Update presence statusGET /api/presence/{accountId}- Get current presence
GET /api/region/{accountId}/stats- Get detailed region statisticsGET /api/region/{accountId}/info- Get region informationPOST /api/region/{accountId}/teleport- Teleport to location
GET /api/stats/visitors- Get visitor statisticsGET /api/stats/accounts- Get account statisticsGET /api/stats/system- Get system performance statistics
GET /api/corrade/status- Get plugin status and configurationGET /api/corrade/config- Get current configuration (passwords hidden)POST /api/corrade/config- Update entire configurationPOST /api/corrade/config/groups- Add new group configurationDELETE /api/corrade/config/groups/{groupUuid}- Remove group configurationPOST /api/corrade/test-command- Test command syntax without execution
GET /api/displaynames/{accountId}- Get cached display namesPOST /api/displaynames/{accountId}/resolve- Resolve specific display name
GET /api/notices/{accountId}- Get group noticesGET /api/notices/{accountId}/{noticeId}- Get specific notice details
GET /api/test/ping- Health check endpointGET /api/test/auth- Test authenticationPOST /api/test/simulate- Simulate various test scenariosPOST /api/test/command-relay/test-command- Test avatar command relayGET /api/test/command-relay/config/{accountId}- Get command relay configurationGET /api/test/command-relay/commands- List available relay commands
/radegasthub- SignalR hub for real-time events:- Chat messages
- Login/logout status
- Presence updates
- Region information
- Group notices
- Display name updates
/swagger- Interactive Swagger/OpenAPI documentation/swagger/v1/swagger.json- OpenAPI JSON specification
- .NET 8.0 SDK or later
- Visual Studio Code with C# extension (recommended)
- Git for version control
dotnet build RadeWeb.slndotnet testUse VS Code's built-in debugger or:
dotnet run --environment Developmentdotnet watch rundotnet ef migrations add MigrationNamedotnet ef database updateWhen updating to a new version, apply any pending migrations:
# Windows
./update-database.ps1
# Linux/macOS
./update-database.shQuick Migration Fix (for "table already exists" errors):
# Linux/macOS
./fix-migration.sh
# Windows
./fix-migration.ps1Advanced Database Reset Utility:
# Linux/macOS
./reset-database.sh
# Windows
./reset-database.ps1The reset utility provides options to:
- Fix migration history while preserving data
- Backup and recreate the database
- Force recreation without backup
Manual Reset (if scripts are unavailable):
Remove-Item ./data/radegast.db
dotnet run- Located in
appsettings.Development.json - Swagger UI enabled
- Detailed error messages
- Console and file logging
- Located in
appsettings.json - Optimized logging levels
- Security headers enabled
- Controllers: Thin controllers with minimal logic
- Services: Business logic and SL protocol handling
- Models: Data entities and DTOs
- Background Services: Long-running SL protocol tasks
- Dependency Injection: All services registered in Program.cs
- Password Security: Passwords are stored in memory only during runtime
- Account Isolation: Each account runs in complete isolation
- No Persistent Passwords: No password storage in database or files
- Local-only Default: Configured for localhost access (configure CORS for remote)
- HTTPS Support: SSL/TLS encryption available (port 7077)
- Input Validation: FluentValidation for all user inputs
- SQL Injection Protection: Entity Framework with parameterized queries
- XSS Protection: Proper output encoding in web interface
- Code-First: Database schema from C# models
- Migrations: Automatic database updates
- SQLite: Lightweight, embedded database
- Connection Pooling: Optimized database connections
- Real-time Updates: Instant chat and status updates
- Connection Management: Automatic reconnection handling
- Message Size Limits: 1MB maximum message size
- Error Handling: Detailed errors in development mode
- Isolated Processing: Each account in separate background service
- Graceful Shutdown: Proper cleanup on application stop
- Error Recovery: Automatic reconnection and error handling
- Resource Management: Efficient memory and connection usage
- Full SL Protocol: Complete Second Life protocol support
- Asset Handling: Avatar assets and textures
- Group Support: Group chat and notices
- Teleportation: Region and landmark teleporting
- Inventory Management: Basic inventory operations
- AI Chat Bot: Configurable AI-powered chat responses with multiple provider support
- Corrade System: Remote command execution via whisper commands
- Modular Design: Plugins can be enabled/disabled independently
- Configuration Management: Web-based configuration interfaces
- Security Framework: Group-based permissions and authentication
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Application logs are written to:
- Console: Real-time development output
- File System:
./logs/radegast-web-{date}.log(daily rotation) - Structured Format: JSON-structured logs with Serilog
Each account maintains separate chat logs:
- Location:
./data/accounts/{accountId}/logs/ - Database: Persistent chat history in SQLite
- Real-time: Live chat updates via SignalR
- Information: Normal application flow
- Warning: Potential issues or unusual conditions
- Error: Error conditions that don't stop the application
- Critical: Serious errors that may cause the application to terminate
Configure logging levels in appsettings.json:
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.AspNetCore": "Warning"
}
}
}
}This project is based on the excellent Radegast Second Life client. Key differences:
- Removed WinForms GUI: Complete removal of desktop UI components
- Added ASP.NET Core: Modern web framework with dependency injection
- SignalR Integration: Real-time web communication replacing desktop events
- Multi-account Support: Concurrent account management with isolation
- Database Integration: Entity Framework Core with SQLite for persistence
- RESTful API: Complete REST API for all operations
- Modern Web UI: Bootstrap 5 responsive interface with dark mode
- Background Services: Isolated background processing per account
- Enhanced Logging: Structured logging with Serilog
When contributing:
- Follow Architecture: Use dependency injection and service patterns
- Database First: Use Entity Framework migrations for schema changes
- API Design: RESTful endpoints with proper HTTP status codes
- Real-time Updates: Use SignalR for live updates
- Documentation: Update Swagger documentation for API changes
- Testing: Include unit tests for business logic
- Logging: Use structured logging for debugging
- C# 12: Use latest C# features and patterns
- Async/Await: Proper async patterns for I/O operations
- SOLID Principles: Clean architecture and separation of concerns
- Error Handling: Comprehensive error handling and logging
- Radegast Team: For the original Second Life client
- LibreMetaverse: For the Second Life protocol implementation
- Second Life: For the virtual world platform
- Check Credentials: Ensure correct SL username and password
- Grid Status: Verify Second Life grid is online
- Network: Check internet connection and firewall settings
- Logs: Review application logs for detailed error messages
Migration Conflicts ("table already exists" error):
- Quick Fix: Use the migration fix script:
./fix-migration.sh(Linux/macOS) or./fix-migration.ps1(Windows) - Manual Fix: Run
./reset-database.shand choose option 1 to fix migration history - Last Resort: Backup and recreate database with option 2
General Database Issues:
- Reset Database: Delete
./data/radegast.dband restart application - Migration Errors: Run
dotnet ef database update - Permissions: Ensure write access to
./data/directory - Schema Conflicts: Use the database reset utility:
./reset-database.shor./reset-database.ps1
- JavaScript: Ensure JavaScript is enabled in browser
- Cache: Clear browser cache and refresh
- Console: Check browser developer console for errors
- SignalR: Verify WebSocket support in browser
- Multiple Accounts: Each account uses additional resources
- Chat History: Large chat history may slow interface
- Region Load: High-traffic regions may cause delays
- AI Bot Usage: AI responses consume API credits and may have rate limits
- AI Bot Not Responding: Check configuration file, API keys, and account login status
- Corrade Commands Failing: Verify group membership, passwords, and permissions
- Plugin Configuration: Use web interfaces for easier configuration management
- API Rate Limits: Monitor AI provider usage and adjust response frequencies
For issues related to:
- Second Life connectivity: Check account credentials and grid status
- Web interface: Ensure modern browser with JavaScript enabled
- Multiple accounts: Each account needs unique, valid credentials
- API usage: Refer to Swagger documentation at
/swagger
- Logs: Enable detailed logging in
appsettings.Development.json - Debugging: Use VS Code debugger with breakpoints
- Hot Reload: Use
dotnet watch runfor development - Database: Use SQLite browser tools to inspect database
- Radegast - Original desktop client
- LibreMetaverse - Second Life protocol library
- OpenSimulator - Open source virtual world server
RadegastWeb v1.2Γ - Bringing Second Life to the modern web with AI and automation πβ¨π€
- v1.2Γ: Current version with AI Chat Bot plugin, Corrade plugin, enhanced authentication, and web management interfaces
- v1.1Γ: Database integration, display names, notices, and region information
- v1.0: Initial release with basic multi-account support and web interface
This project maintains compatibility with the original Radegast licensing terms.