Introduce Admin UI: SQLite config, REST API, and Nuxt frontend - #38
Introduce Admin UI: SQLite config, REST API, and Nuxt frontend#38andreaslampe with Copilot wants to merge 7 commits into
Conversation
- Change SDK from Microsoft.NET.Sdk.Worker to Microsoft.NET.Sdk.Web
- Add EF Core SQLite, Swashbuckle, AspNetCore.OpenApi, SpaProxy packages
- Add SPA build/publish MSBuild targets for AdminUI
- Add Data layer: Entities, AppDbContext, DatabaseConfigurationProvider
- Custom IConfigurationProvider reads settings from SQLite DB
- ImportFromConfiguration migrates existing appsettings.json on first boot
- SeedDefaults seeds fresh installations
- Add REST API endpoints (SettingsEndpoints, AuthEndpoints)
- CRUD for general settings, mailboxes, and pattern settings
- POST /api/settings/import to migrate from appsettings.json
- POST /api/auth/o365/{id} to trigger O365 interactive auth from UI
- Rewrite Program.cs: HostBuilder -> WebApplicationBuilder
- Kestrel on port 5050
- Swagger/OpenAPI at /swagger
- CORS restricted to localhost origins
- EF migrations + seed/import on startup
- Browser auto-open on start
- Windows Service support via builder.Host.UseWindowsService()
- Add EF Core InitialCreate migration
- Add settings.db to .gitignore
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add AdminUI project with Nuxt 3 + @nuxt/ui v3 + Tailwind CSS - Responsive sidebar layout with mobile drawer (default.vue) - Dashboard page with section status cards and first-run setup banner - General settings page (polling, process/email mode, PGP, heartbeat, O365) - Email accounts page with full CRUD and O365 OAuth2 auth trigger - Pattern page with regex editor, inline tester, and additional properties - useSettings composable for API calls with toast notifications - devProxy configured to forward /api to .NET backend on :5050 - Replace browser confirm() with UModal for delete confirmation - Extract PatternField type alias for readability - Update root .gitignore with Nuxt build artifacts and *.db wildcard Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… auth Co-authored-by: andreaslampe <68891717+andreaslampe@users.noreply.github.com>
|
@copilot please resolve the conflicts |
| entity.IgnoreCertificateErrors = dto.IgnoreCertificateErrors; | ||
| entity.HeartbeatInterval = dto.HeartbeatInterval; | ||
| entity.HeartbeatUrl = dto.HeartbeatUrl; | ||
| entity.O365ClientId = dto.O365ClientId; |
There was a problem hiding this comment.
@copilot Setting the O365ClientId is part of the release process and should not be configurable by the end user. Setting it in the config is only for developer testing purposes.
There was a problem hiding this comment.
Done in 08a4b26. O365ClientId has been removed from the DB entity, the PUT /api/settings/general endpoint, the config provider, and the frontend general settings page. The build-time value from BuildSecrets.FallbackClientId (set via /p:O365ClientId during release) will always be used.
Co-authored-by: andreaslampe <68891717+andreaslampe@users.noreply.github.com>
Resolved in 2c4c7bc. The conflict was in |
…g only) Co-authored-by: andreaslampe <68891717+andreaslampe@users.noreply.github.com>
MailAgent.csprojData/Entities.cs,Data/AppDbContext.cs,Data/DatabaseConfigurationProvider.csEndpoints/SettingsEndpoints.cs,Endpoints/AuthEndpoints.csProgram.csO365ClientIdfrom DB entity, REST endpoint, and config provider (build-time only)RemoveO365ClientIdEF Core migration to drop the columnsettings/general.vue.gitignoreOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.