Dashboard
SmartRAG Dashboard - browser-based document management and chat UI
Overview
SmartRAG includes a built-in browser-based web UI (Dashboard). When you enable the dashboard, you get:
- Document management: List, upload, and delete documents from the browser
- Supported types: Only SmartRAG-supported document types can be uploaded (PDF, Word, Excel, text, images, audio, etc.)
- Chat: Chat with the currently configured AI model (the same provider and model as in your SmartRAG configuration)
The dashboard is served at a configurable path (default: /smartrag) and is intended for development or trusted environments. Do not expose it publicly in production without adding your own authentication or authorization.
Installation
Add the SmartRAG package to your ASP.NET Core project (Dashboard is included):
dotnet add package SmartRAG
Configuration
In Program.cs (or your startup), register SmartRAG and the dashboard:
using SmartRAG.Extensions;
using SmartRAG.Dashboard;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSmartRag(builder.Configuration);
builder.Services.AddSmartRagDashboard(options =>
{
options.Path = "/smartrag";
options.EnableInDevelopmentOnly = true;
});
var app = builder.Build();
app.UseRouting();
app.UseSmartRagDashboard("/smartrag");
app.MapSmartRagDashboard("/smartrag");
app.MapControllers();
app.Run();
- Path: Base path for the dashboard (default
/smartrag). All UI and API routes are under this path. - EnableInDevelopmentOnly: When
true, the dashboard returns 404 in non-Development environments. Set tofalseonly if you explicitly want the dashboard in production and will protect it yourself. - AuthorizationFilter: Optional
Func<HttpContext, bool>. When set, the dashboard calls it for each request; if it returnsfalse, the response is 403.
Dashboard Options
| Option | Type | Default | Description |
|---|---|---|---|
Path |
string |
"/smartrag" |
Base path for the dashboard UI and all API endpoints. |
EnableInDevelopmentOnly |
bool |
true |
When true, the dashboard returns 404 in non-development environments. |
AuthorizationFilter |
Func<HttpContext, bool> |
null |
Optional filter that runs for every dashboard request; return false to block access with HTTP 403. |
Security and Production
- The dashboard has no built-in authentication. Anyone who can reach the URL can list, upload, delete documents and use the chat.
- Development: With
EnableInDevelopmentOnly = true, the dashboard is only available whenIHostEnvironment.IsDevelopment()is true. - Production: If you enable the dashboard in production:
- Use a reverse proxy or middleware to restrict access (IP allowlist, VPN, etc.), or
- Integrate with your app’s auth (e.g. require a role or policy for the dashboard path), or
- Use the
AuthorizationFilteroption to implement custom checks.
Example: restrict dashboard to a specific path and require authorization:
builder.Services.AddSmartRagDashboard(options =>
{
options.Path = "/smartrag";
options.EnableInDevelopmentOnly = false;
options.AuthorizationFilter = ctx => ctx.User.Identity?.IsAuthenticated == true;
});
// Then ensure the dashboard path is under your auth middleware/policy.
API Endpoints (under the dashboard path)
All endpoints are relative to the configured path (e.g. /smartrag).
| Method | Path | Description |
|---|---|---|
| GET | /api/documents |
List documents (query: skip, take) |
| GET | /api/documents/{id} |
Get one document by ID |
| DELETE | /api/documents/{id} |
Delete a document |
| POST | /api/documents |
Upload a document (multipart: file, uploadedBy, optional language) |
| GET | /api/upload/supported-types |
Supported file extensions and MIME types |
| GET | /api/chat/config |
Active AI provider and model name |
| POST | /api/chat/messages |
Send a chat message (JSON: message, optional sessionId) |
| GET | /api/chat/sessions |
List chat sessions |
| GET | /api/chat/sessions/{sessionId} |
Get one chat session with messages |
| DELETE | /api/chat/sessions |
Delete all chat sessions |
| DELETE | /api/chat/sessions/{sessionId} |
Delete one chat session |
| GET | /api/settings |
Dashboard configuration (providers, features, chunking, etc.) |
Usage
- Run your ASP.NET Core app (e.g.
dotnet run). - Open the dashboard in a browser:
https://localhost:5000/smartrag(or your app’s URL and path). - Use the Documents panel to upload files (with supported types), view the list, and delete documents.
- Use the Chat panel to send messages to the currently configured AI model; the active provider/model is shown in the header.
The dashboard uses the same SmartRAG services (IDocumentService, IAIService, etc.) as the rest of your application, so documents and chat are consistent with your existing configuration.
Screenshots
- Documents panel: Upload, list, and manage documents.
- Chat panel: Send messages and view conversation history.
- Settings panel: View configuration (providers, features, chunking).
The examples below use real screenshots from the SmartRAG dashboard:
Documents Panel
List, upload, and manage documents that are available for RAG queries.
Chat Panel
Converse with the active AI model using natural language, with full conversation history.
Settings Panel
Inspect core configuration such as AI providers, storage options, and enabled features.
For a complete visual tour (including database and schema views), see the
Full Dashboard Gallery.
Next Steps
Basic Configuration
Core SmartRAG options for AI providers, storage, and features.
Basic ConfigurationDatabase Configuration
Configure multi-database connections and schema analysis.
Database Configuration