Skip to content

Add blog management - #131

Open
albx wants to merge 26 commits into
mainfrom
130-add-blog-management
Open

albx wants to merge 26 commits into
mainfrom
130-add-blog-management

Conversation

@albx

@albx albx commented Sep 8, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a set of significant enhancements and refactorings to the API layer of the CMS, focusing on modularizing endpoints, adding new blog post and content management endpoints, and updating dependencies. The most notable changes are the introduction of new endpoints for blog posts and content, improved internal service abstractions, and a general refactor to organize endpoint files by feature area. Additionally, several package dependencies have been updated to their latest versions.

API Endpoint Additions and Refactoring

  • Introduced new endpoints for blog post management, including listing, detail retrieval, publishing, drafting, importing, and updating blog posts (BlogPostsEndpoints, BlogPostsEndpointsServices, BlogPostQueryParameters, and mapping extensions). [1] [2] [3] [4]
  • Added endpoints for content publishing and deletion, along with their supporting service class (ContentsEndpoints, ContentsEndpointsServices). [1] [2]
  • Refactored endpoint files to be grouped by feature (e.g., moved streaming and settings endpoints and services to dedicated folders/namespaces). [1] [2] [3]

Dependency and Project File Updates

  • Updated multiple NuGet package dependencies to their latest versions across several projects, including Aspire, Azure, and CommunityToolkit packages. [1] [2] [3]

Program Startup and Service Registration

  • Registered new endpoint services (BlogPostsEndpointsServices, ContentsEndpointsServices) and mapped new endpoints in the application startup (Program.cs). [1] [2] [3]

Model Mapping Utilities

  • Added model mapping extensions to convert between API models and domain entities for SEO data and blog post details.

These changes collectively improve the modularity, maintainability, and capabilities of the CMS API, making it easier to extend and manage content and blog posts programmatically.

@albx albx linked an issue Sep 8, 2026 that may be closed by this pull request
@albx
albx marked this pull request as ready for review September 27, 2026 10:05
@albx
albx requested a lite review from Copilot September 27, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved authorization flaws allow cross-user content mutation, alongside pagination, UI, and response correctness issues.

Review effort: Lite
Findings: 4 High severity · 7 Medium severity · 3 Low severity

Open (14)
What changed in this PR

Adds blog post and content management across the CMS domain, API, persistence layer, clients, and Blazor UI.

Changes:

  • Adds blog post creation, import, listing, editing, publishing, and deletion.
  • Adds content publishing/deletion workflows and Markdown editing.
  • Refactors endpoint organization and updates dependencies, migrations, localization, and tests.
File Summary
tests/​KITT.Web.Testing/​KITT.Web.Testing.csproj Updates authentication dependencies.
tests/​KITT.Core.Test/​Models/​StreamingTests.cs Removes obsolete streaming coverage.
tests/​KITT.Core.Test/​KITT.Core.Test.csproj Updates test dependencies.
tests/​KITT.Core.Test/​Fixtures/​KittDbContextFixture.cs Isolates in-memory databases.
tests/​KITT.Core.Test/​Commands/​StreamingCommandsTest.cs Updates fixtures and constructor tests.
tests/​KITT.Core.Test/​Commands/​ContentCommandsTest.cs Adds content command tests.
tests/​KITT.Core.Test/​Commands/​BlogPostCommandsTest.cs Adds blog post command tests.
tests/​KITT.Cms.Web.Api.Test/​SettingsEndpointsTest.cs Removes settings endpoint tests.
tests/​KITT.Cms.Web.Api.Test/​KITT.Cms.Web.Api.Test.csproj Updates API test dependencies.
src/​KITT.Web.Shared/​KITT.Web.Shared.csproj Updates shared dependencies.
src/​KITT.Web.App/​KITT.Web.App/​KITT.Web.App.csproj Updates web app dependencies.
src/​KITT.Web.App/​KITT.Web.App/​Endpoints/​CmsEndpoints.cs Adds CMS proxy routes.
src/​KITT.Web.App/​KITT.Web.App.Client/​Layout/​NavMenu.razor Adds blog navigation.
src/​KITT.Web.App/​KITT.Web.App.Client/​KITT.Web.App.Client.csproj Updates client dependencies.
src/​KITT.Web.App.UI/​KITT.Web.App.UI.csproj Adds Markdown editor support.
src/​KITT.Telegram.Messages/​KITT.Telegram.Messages.csproj Updates messaging dependencies.
src/​KITT.Support.Seeder/​KITT.Support.Seeder.csproj Updates seeder dependencies.
src/​KITT.ServiceDefaults/​KITT.ServiceDefaults.csproj Updates service dependencies.
src/​KITT.Proposals.Web.App/​KITT.Proposals.Web.App.csproj Updates proposal app dependencies.
src/​KITT.Proposals.Web.Api/​KITT.Proposals.Web.Api.csproj Updates proposal API dependencies.
src/​KITT.Core/​ReadModels/​IDatabase.cs Exposes blog post queries.
src/​KITT.Core/​ReadModels/​Extensions/​StreamingsExtensions.cs Removes duplicate user filtering.
src/​KITT.Core/​ReadModels/​Extensions/​ContentExtensions.cs Adds content filtering and sorting.
src/​KITT.Core/​ReadModels/​Database.cs Adds blog post read access.
src/​KITT.Core/​Persistence/​Mapping/​BlogPostMapper.cs Maps the blog post table.
src/​KITT.Core/​Persistence/​KittDbContext.cs Registers blog posts.
src/​KITT.Core/​Models/​BlogPost.cs Adds the blog post domain model.
src/​KITT.Core/​Migrations/​KittDbContextModelSnapshot.cs Updates the EF model snapshot.
src/​KITT.Core/​Migrations/​20260721061538_Add-BlogPosts.Designer.cs Adds migration metadata.
src/​KITT.Core/​Migrations/​20260721061538_Add-BlogPosts.cs Creates the blog post table.
src/​KITT.Core/​KITT.Core.csproj Updates core dependencies.
src/​KITT.Core/​DependencyInjection/​ServiceCollectionExtensions.cs Registers blog and content commands.
src/​KITT.Core/​Commands/​StreamingCommands.cs Refactors constructor injection.
src/​KITT.Core/​Commands/​SettingsCommands.cs Removes obsolete settings commands.
src/​KITT.Core/​Commands/​ISettingsCommands.cs Removes obsolete settings interface.
src/​KITT.Core/​Commands/​IContentCommands.cs Defines content operations.
src/​KITT.Core/​Commands/​IBlogPostCommands.cs Defines blog post operations.
src/​KITT.Core/​Commands/​ContentCommands.cs Implements content operations.
src/​KITT.Core/​Commands/​BlogPostCommands.cs Implements blog post operations.
src/​KITT.Cms.Web.Models/​Streamings/​StreamingsQueryModel.cs Uses shared sort direction.
src/​KITT.Cms.Web.Models/​Streamings/​StreamingsListModel.cs Updates collection initialization.
src/​KITT.Cms.Web.Models/​SortDirection.cs Adds shared sorting enum.
src/​KITT.Cms.Web.Models/​QueryModel.cs Adds query model base type.
src/​KITT.Cms.Web.Models/​KITT.Cms.Web.Models.csproj Adds result handling dependency.
src/​KITT.Cms.Web.Models/​ContentStatus.cs Adds content status enum.
src/​KITT.Cms.Web.Models/​Contents/​PublishContentModel.cs Adds publish request model.
src/​KITT.Cms.Web.Models/​BlogPosts/​UpdateBlogPostModel.cs Adds update request model.
src/​KITT.Cms.Web.Models/​BlogPosts/​PublishBlogPostModel.cs Adds publish request model.
src/​KITT.Cms.Web.Models/​BlogPosts/​ImportBlogPostModel.cs Adds import request model.
src/​KITT.Cms.Web.Models/​BlogPosts/​DraftBlogPostModel.cs Adds draft request model.
src/​KITT.Cms.Web.Models/​BlogPosts/​BlogPostsQueryModel.cs Adds blog query parameters.
src/​KITT.Cms.Web.Models/​BlogPosts/​BlogPostListModel.cs Adds list response model.
src/​KITT.Cms.Web.Models/​BlogPosts/​BlogPostDetailModel.cs Adds detail response model.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Write.resx Adds English write-page resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Write.it.resx Adds Italian write-page resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Write.Designer.cs Generates write-page resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​PostDetail.resx Adds English detail resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​PostDetail.it.resx Adds Italian detail resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​PostDetail.Designer.cs Generates detail resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Index.resx Adds English blog-list resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Index.it.resx Adds Italian blog-list resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Index.Designer.cs Generates blog-list resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Import.resx Adds English import resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Import.it.resx Adds Italian import resources.
src/​KITT.Cms.Web.App/​Resources/​Pages/​Blog/​Import.Designer.cs Generates import resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​PublishContentDialog.resx Adds publish-dialog resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​PublishContentDialog.it.resx Adds Italian publish resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​PublishContentDialog.Designer.cs Generates publish-dialog resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​ContentStatusControl.resx Adds status-control resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​ContentStatusControl.it.resx Adds Italian status resources.
src/​KITT.Cms.Web.App/​Resources/​Components/​ContentStatusControl.Designer.cs Generates status resources.
src/​KITT.Cms.Web.App/​Pages/​Streamings/​StreamingDetail.razor Uses Markdown editing.
src/​KITT.Cms.Web.App/​Pages/​Streamings/​Index.razor.cs Uses shared sorting.
src/​KITT.Cms.Web.App/​Pages/​Streamings/​Index.razor Uses shared sorting in the UI.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Write.razor.cs Implements draft creation.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Write.razor Adds blog writing UI.
src/​KITT.Cms.Web.App/​Pages/​Blog/​PostDetail.razor.cs Implements detail behavior.
src/​KITT.Cms.Web.App/​Pages/​Blog/​PostDetail.razor Adds blog detail UI.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Index.razor.cs Implements blog listing behavior.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Index.razor Adds blog listing UI.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Import.razor.cs Implements import behavior.
src/​KITT.Cms.Web.App/​Pages/​Blog/​Import.razor Adds blog import UI.
src/​KITT.Cms.Web.App/​KITT.Cms.Web.App.csproj Registers resources and updates dependencies.
src/​KITT.Cms.Web.App/​Components/​StreamingForm.razor Adds Markdown editing.
src/​KITT.Cms.Web.App/​Components/​PublishContentDialog.razor.cs Implements publishing dialog logic.
src/​KITT.Cms.Web.App/​Components/​PublishContentDialog.razor Adds publishing dialog UI.
src/​KITT.Cms.Web.App/​Components/​ContentStatusControl.razor.cs Implements status actions.
src/​KITT.Cms.Web.App/​Components/​ContentStatusControl.razor Adds publish status UI.
src/​KITT.Cms.Web.App/​Clients/​IContentClient.cs Defines content client operations.
src/​KITT.Cms.Web.App/​Clients/​IBlogClient.cs Defines blog client operations.
src/​KITT.Cms.Web.App/​Clients/​Http/​ContentHttpClient.cs Implements content HTTP calls.
src/​KITT.Cms.Web.App/​Clients/​Http/​BlogHttpClient.cs Implements blog HTTP calls.
src/​KITT.Cms.Web.App/​Clients/​ClientsServiceCollectionExtensions.cs Registers HTTP clients.
src/​KITT.Cms.Web.App/​_Imports.razor Adds shared UI imports.
src/​KITT.Cms.Web.Api/​Streamings/​StreamingsEndpointsServices.cs Refactors streaming services.
src/​KITT.Cms.Web.Api/​Streamings/​StreamingsEndpoints.cs Refactors streaming endpoints.
src/​KITT.Cms.Web.Api/​Settings/​SettingsEndpoints.cs Refactors settings endpoints.
src/​KITT.Cms.Web.Api/​Settings/​ChannelsEndpointsServices.cs Refactors channel services.
src/​KITT.Cms.Web.Api/​Program.cs Registers and maps endpoint groups.
src/​KITT.Cms.Web.Api/​Mapping/​ModelMappingExtensions.cs Adds SEO mappings.
src/​KITT.Cms.Web.Api/​KITT.Cms.Web.Api.csproj Updates API dependencies.
src/​KITT.Cms.Web.Api/​Contents/​ContentsEndpointsServices.cs Adds content endpoint services.
src/​KITT.Cms.Web.Api/​Contents/​ContentsEndpoints.cs Adds content endpoints.
src/​KITT.Cms.Web.Api/​BlogPosts/​MappingExtensions.cs Adds blog DTO mappings.
src/​KITT.Cms.Web.Api/​BlogPosts/​BlogPostsEndpointsServices.cs Implements blog queries and commands.
src/​KITT.Cms.Web.Api/​BlogPosts/​BlogPostsEndpoints.cs Adds blog post endpoints.
src/​KITT.Cms.Web.Api/​BlogPosts/​BlogPostQueryParameters.cs Adds API query binding.
src/​KITT.Cms.Settings/​KITT.Cms.Settings.csproj Updates Azure Tables dependency.
src/​KITT.AppHost/​KITT.AppHost.csproj Updates Aspire and AppHost dependencies.
Files not reviewed (7)
  • src/KITT.Cms.Web.App/Resources/Components/ContentStatusControl.Designer.cs: Generated file
  • src/KITT.Cms.Web.App/Resources/Components/PublishContentDialog.Designer.cs: Generated file
  • src/KITT.Cms.Web.App/Resources/Pages/Blog/Import.Designer.cs: Generated file
  • src/KITT.Cms.Web.App/Resources/Pages/Blog/Index.Designer.cs: Generated file
  • src/KITT.Cms.Web.App/Resources/Pages/Blog/PostDetail.Designer.cs: Generated file
  • src/KITT.Cms.Web.App/Resources/Pages/Blog/Write.Designer.cs: Generated file
  • src/KITT.Core/Migrations/20260721061538_Add-BlogPosts.Designer.cs: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/KITT.Cms.Web.Api/BlogPosts/BlogPostsEndpoints.cs
Comment thread src/KITT.Cms.Web.Api/Contents/ContentsEndpoints.cs
Comment thread src/KITT.Cms.Web.Api/Contents/ContentsEndpointsServices.cs Outdated
Comment thread src/KITT.Core/Commands/ContentCommands.cs Outdated
Comment thread src/KITT.Cms.Web.Api/BlogPosts/BlogPostsEndpointsServices.cs
Comment thread src/KITT.Cms.Web.App/Pages/Blog/Index.razor.cs
Comment thread src/KITT.Cms.Web.App/Pages/Blog/PostDetail.razor Outdated
Comment thread src/KITT.Cms.Web.App/Resources/Pages/Blog/Index.it.resx Outdated
Comment thread src/KITT.Cms.Web.App/Resources/Pages/Blog/Index.resx Outdated
Comment thread tests/KITT.Core.Test/Commands/ContentCommandsTest.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add blog management

2 participants