diff --git a/Moonlight/Features/ServiceManagement/UI/Views/View.razor b/Moonlight/Features/ServiceManagement/UI/Views/View.razor
index 06b172e5..695244ca 100644
--- a/Moonlight/Features/ServiceManagement/UI/Views/View.razor
+++ b/Moonlight/Features/ServiceManagement/UI/Views/View.razor
@@ -3,8 +3,7 @@
@using Microsoft.EntityFrameworkCore
@using MoonCore.Abstractions
@using MoonCoreUI.Helpers
-
-
+@using Moonlight.Features.ServiceManagement.UI.Components
@using Moonlight.Core.Services
@using Moonlight.Features.ServiceManagement.Entities
@using Moonlight.Features.ServiceManagement.Models.Abstractions
diff --git a/Moonlight/Moonlight.csproj b/Moonlight/Moonlight.csproj
index 95e40650..18a8ea85 100644
--- a/Moonlight/Moonlight.csproj
+++ b/Moonlight/Moonlight.csproj
@@ -52,7 +52,8 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
@@ -90,43 +91,4 @@
-
-
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoCrud.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoForm.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoProperty.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\ChatFileSelect.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\ConfirmButton.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\DynamicTypedAutoForm.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartCustomFileSelect.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartDropdown.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartEnumSelect.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartFileSelect.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartForm.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartSelect.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\TextEditor.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Forms\WButton.razor" />
- <_ContentIncludedByDefault Remove="Shared\Layouts\DefaultLayout.razor" />
- <_ContentIncludedByDefault Remove="Shared\Layouts\MainLayout.razor" />
- <_ContentIncludedByDefault Remove="Shared\Layouts\OverlayLayout.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Auth\ChangePassword.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Auth\Login.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Auth\MailVerify.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Auth\PasswordReset.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Auth\Register.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Alerts\NotFoundAlert.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Alerts\RestartAlert.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Navigations\AccountNavigation.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Navigations\AdminSysNavigation.razor" />
- <_ContentIncludedByDefault Remove="Shared\Components\Navigations\AdminUsersNavigation.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Index.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Services\Index.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Services\View.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Diagnose.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Index.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Settings.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\Index.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\Sessions.razor" />
- <_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\View.razor" />
-
diff --git a/Moonlight/Program.cs b/Moonlight/Program.cs
index 6e7d4093..88a08857 100644
--- a/Moonlight/Program.cs
+++ b/Moonlight/Program.cs
@@ -1,9 +1,12 @@
using BlazorTable;
+using MoonCore.Abstractions;
using MoonCore.Helpers;
using MoonCore.Extensions;
using MoonCore.Services;
+using MoonCoreUI.Services;
using Moonlight.Core.Configuration;
using Moonlight.Core.Database;
+using Moonlight.Core.Repositories;
using Moonlight.Core.Services;
using Moonlight.Features.Servers.Actions;
using Moonlight.Features.Servers.Http.Middleware;
@@ -38,15 +41,25 @@ builder.Services.AddSingleton(pluginService);
await pluginService.Load(builder);
await pluginService.RunPreInit();
-// TODO: Add automatic assembly scanning
-// dependency injection registration
-// using attributes
-
builder.Services.AddDbContext();
// Services
+builder.Services.AddScoped(typeof(Repository<>), typeof(GenericRepository<>));
+builder.Services.AddScoped();
+builder.Services.AddScoped();
+builder.Services.AddScoped();
+builder.Services.AddScoped();
+builder.Services.AddScoped();
+builder.Services.AddScoped();
builder.Services.AddSingleton(configService);
+// Configure interop
+ToastService.Prefix = "moonlight.toasts";
+ModalService.Prefix = "moonlight.modals";
+AlertService.Prefix = "moonlight.alerts";
+ClipboardService.Prefix = "moonlight.clipboard";
+FileDownloadService.Prefix = "moonlight.utils";
+
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddHttpContextAccessor();