Releases: fluentcms/FluentCMS
Releases · fluentcms/FluentCMS
Release 0.0.5
What's Changed
- #2336 Add try catch block for dispose methods by @TheHadiAhmadi in #2337
- #2333 Add layouts folder for templates by @TheHadiAhmadi in #2334
- #2340 Refactor tailwind blocks and current templates by @TheHadiAhmadi in #2341
- #2342 add TailwindStyleBuilder project by @TheHadiAhmadi in #2343
Full Changelog: v0.0.4...v0.0.5
Release 0.0.4
What's Changed
- #2325 add Readme for components project and cleanup Main readme by @TheHadiAhmadi in #2326
- #2324 Move Html content outside of site.json file by @TheHadiAhmadi in #2331
- #2327 Rename Shared project to FluentCMS.Shared by @TheHadiAhmadi in #2332
- #2328 Add
TailwindStyles
andTailwindStyleBuilder
components by @TheHadiAhmadi in #2329
Full Changelog: v0.0.3...v0.0.4
First try to deploy to Nuget
Full Changelog: v0.0.2...v0.0.3
v0.0.2
What's Changed
- #2 create contributing md file including code of conduct by @pournasserian in #6
- #3 Update LICENSE by @pournasserian in #7
- add basic structure by @MostafaTech in #16
- 39 setup editorconfig by @ParsaGachkar in #42
- 25 implement litedb integration by @ParsaGachkar in #29
- Implement User as the first entity by @MostafaTech in #54
- Sprint 1 by @MostafaTech in #26
- add coding conventions section in contributing doc by @MostafaTech in #46
- #51 add simple UI and API with initial projects layered and structure by @pournasserian in #72
- Initial Content Type Implementation by @ParsaGachkar in #58
- add application layer and add user basic actions by @MostafaTech in #87
- 73 add simple crud for site from sprint 2 by @ParsaGachkar in #90
- Add simple crud for users in ui by @MostafaTech in #92
- 73 implement Site List by @ParsaGachkar in #93
- add create and edit user pages and delete by @MostafaTech in #95
- set Repository GetById as nullable by @MostafaTech in #97
- 75 add simple crud for role by @MostafaTech in #105
- refactor user entity to store userRoles inside its document in litedb by @MostafaTech in #108
- 100 delete weatherforcast controller and model by @MostafaTech in #109
- put all admin pages inside /admin route by @MostafaTech in #111
- Refactor project architecture based on tech meeting by @MostafaTech in #113
- 112 refactor based on sunday meeting by @MostafaTech in #116
- 74 add simple crud for page by @ParsaGachkar in #104
- Sprint 2 by @MostafaTech in #85
- 117 rd on audit entity permissions and security requirements and implementation by @pournasserian in #123
- 130 implement web api authentication using mongodb repository by @pournasserian in #132
- Sprint 3 by @pournasserian in #133
- 127 code and namespace cleanup by @ParsaGachkar in #131
- remove Ardalis.GuardClauses by @ParsaGachkar in #139
- 135 review and update tests for litedb repositories by @ParsaGachkar in #140
- debug fix litedb configs by @MostafaTech in #145
- 134 add tests for mongodb repositories by @ParsaGachkar in #143
- 136 add test for hostservice by @ParsaGachkar in #144
- 137 add test for siteservice by @ParsaGachkar in #147
- Refactor AppContext Tests by @ParsaGachkar in #146
- Implementing error handling by @MostafaTech in #141
- 150 jwt token is not validate while generating in service authenticate by @pournasserian in #151
- #152
IHostRepository
cleanup by @pournasserian in #153 - 154 upgrade net 8 release version and all dependencies by @pournasserian in #166
- Remove Microsoft.AspNetCore.Identity Nuget package (deprecated) by @pournasserian in #170
- #171 Program.cs cleanup and default page revision by @pournasserian in #172
- 138 revise pageservice based on latest changes for siteservice and hostservice by @ParsaGachkar in #148
- #173 add Shouldly by @pournasserian in #174
- implement litedb repository for user,role and host by @MostafaTech in #159
- Merging Sprint 4 to dev by @pournasserian in #167
- 178 change namespace for
FluentCMS.Repositories.Abstractions
toFluentCMS.Repositories
by @pournasserian in #179 - #180 change MongoDb prefix by @pournasserian in #182
- #183 default data loader by @pournasserian in #187
- #186 delete
UserToken
class by @pournasserian in #188 - 175-review-tests by @ParsaGachkar in #189
- 176 develop tests for new pageservice related rules by @ParsaGachkar in #191
- 177 review litedbrepositories by @ParsaGachkar in #190
- 176 develop tests for new page service-related rules by @ParsaGachkar in #192
- 184 refactor role properties service and repository by @pournasserian in #193
- Initialize flowbite and add some components by @TheHadiAhmadi in #196
- #195 fix npm run build problem by @TheHadiAhmadi in #198
- 155 move default values for
iauditentity
to repository layer by @pournasserian in #204 - #199 add JWT to swagger by @pournasserian in #205
- update mapping profile by @ParsaGachkar in #208
- #211 superadmin permission issue resolved by @pournasserian in #212
- #213 AddJwtAuthentication by @pournasserian in #214
- #195 add static folder and build js and css using node by @TheHadiAhmadi in #221
- 200 implement resource base authorization instead of current authorization method by @pournasserian in #225
- #226 rename PagesController to PageController by @pournasserian in #227
- 228 add plugin definition feature by @pournasserian in #232
- change all backslash to slash to fix mac os build problem by @babakhani in #239
- 233 layout rendering engine enhancement by @ParsaGachkar in #240
- 241 render engine breaks if there is a commented fluentcms tag by @ParsaGachkar in #242
- 235 develop primary blazor components by @TheHadiAhmadi in #248
- 243 add plugin as cascadeparameter in section component for each plugin by @pournasserian in #255
- #256 update temporary layout by @pournasserian in #257
- #259 change Content to Body in Layout by @pournasserian in #260
- #264 update AppState by @pournasserian in #265
- #253 add plugin html structure and CSS by @pournasserian in #266
- 262 develop edit mode for plugin by @pournasserian in #267
- Issue on rendering dynamic layout by regex by @ParsaGachkar in #272
- 271 dynamic content builder feature by @pournasserian in #274
- #276 disable dynamic layout rendering by @pournasserian in #277
- 281 add layouts and sample auth pages by @babakhani in #282
- 290 Add previews by @babakhani in #291
- 275 develop texthtml plugin by @pournasserian in #280
- 287 move api models to shared project by @pournasserian in #289
- 298 enable dynamic layout rendering and remove html remarks from source by @pournasserian in #299
- 300 razor application level component cleanup by @pournasserian in #301
- #302 major refactor on AppState (not completed) by @pournasserian in #303
- #321 Add Icon component by @TheHadiAhmadi in #322
- 314 add badge component by @TheHadiAhmadi in #325
- #323 Add Button component by @TheHadiAhmadi in #324
- #249 Add Base Component by @TheHadiAhmadi in #320
- 306 text html refactor 1 by @pournasserian in #327
- #328 Button ty...
First version of deployment to Nuget
Initial release for testing Nuget (#2318) * Update README.md (#1689) * #1665 Add Multi select field type (#1677) * #1665 Add Multi select field type * #1665 Cleanup Multi select field type * Update DictionaryJsonConverter.cs --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1680 Add RadioGroup component (#1690) * #1680 Add RadioGroup component * Update FormRadioGroup.razor.cs * #1680 run code analyser --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1679 cleanup Markdown editor (#1691) Co-authored-by: Amir Pournasserian <[email protected]> * #1669 use select component for date formats (#1676) * #1669 work on Date formats * Fix error * #1669 fix date formats * #1678 Add RichText editor component (#1692) * #1678 Add RichText editor component * #1678 use rich text for content * Update README.md * #1678 build styles, code analyser --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1666 Add single selection field type (#1675) * #1666 Add single selection field type * #1666 update Single select field type * #1666 use RadioGroup for Single select * #1666 code analyser --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1696 Apply UI Changes (#1697) * #1699 add more content types and fix some minor bugs (#1700) * #1699 add more content types and fix some minor bugs * #1699 update styles --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1698 Use int instead of decimal for FieldModel (#1701) * #1698 Use int instead of decimal for FieldModel * #1698 type conversion from decimal to in in FormColWidth --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update PluginLoader.cs (#1708) * Update README.md (#1709) * #1710 run code analyzer (#1711) * #1694 initial API model (#1695) * #1694 initial API model * #1694 develop initial CRUD for File/Folder * Update AssetRepository.cs * #1694 initial version for file upload * #1694 add file provider and configuration * #1694 file service enhancement * #1694 swagger enum type generator * #1694 file upload api should support null folder (root) * #1694 develop another approach for file and folders * #1694 update api client * 1703 develop UI of file and folder management (#1713) * #1703 add initial codes for File management * #1703 Add File Upload and cleanup Folder CRUD * #1703 Update ui based on new Api changes * Update MappingProfile.cs --------- Co-authored-by: Hadi Ahmadi <[email protected]> * 1714 run code analyzer (#1715) * #1714 run code analyzer * #1714 build styles * Update SlugAttribute.cs (#1716) * Update IPluginDefinitionRepository.cs (#1717) * Update IPluginDefinitionRepository.cs * Update _GlobalUsings.cs * Update README.md (#1719) * #1720 action buttons change in fields modal (#1721) * #1718 UI enhancements for datatable header etc (#1723) * #1718 Fix policy of GetAll Folders API * #1718 Use Modals for File & Folder CRUD * #1718 Add download file button * #1718 Disable Multiple file upload * #1725 update Nuget packages (#1726) * Update manifest.json (#1727) * #1706 Update Logo (#1729) * #1732 Add Action Buttons (#1734) * #1730 Add `FormFileUpload` and remove `Browse` component (#1731) * #1730 Add FormFileUpload and remove Browse component * #1730 build styles --------- Co-authored-by: Amir Pournasserian <[email protected]> * 1728 pagecontroller has many bugs specially in dynamic mode (#1736) * #1728 page controller cleanup * Update _GlobalUsings.cs * Update IQueryableRepository.cs * Update PageController.cs * #1728 plugin loader refactoring * 1745 refactor contenttype and content plugins (#1746) * #1745 extract Shared project * #1745 resolve deserializing bug in content api and cleanup * #1745 add model prop for contentType field settings * Update ContentTypeService.cs * Remove ContentRequest classes; update BooleanFieldSettings - Removed `ContentCreateRequest` class and its references from `ContentCreateRequest.cs`. - Removed `ContentUpdateRequest` class, which inherited from `ContentCreateRequest`, along with its references from `ContentUpdateRequest.cs`. - Updated `BooleanFieldSettings.razor` to change the generic type parameter for `FieldSettingForm` from nullable to non-nullable boolean. * Refactor and enhance label handling in Razor components This commit includes several key changes aimed at improving the handling and display of labels within Razor component files and enhancing overall code quality. Specifically, the changes are as follows: - Refactored code to access the `Label` property from `ContentTypeField` across various Razor components, ensuring labels are consistently retrieved from the correct source. This enhances code reliability and maintainability. - Added a new `DataTableItem` for "Label" in `ContentTypeDetailPlugin.razor`, improving the user interface by providing more descriptive information about each field in the content type detail view. - Updated the `ModelHelpers.cs` file, specifically the `ToFieldModel` method, to enforce non-nullable properties for `Name`, `Type`, `Description`, and `Label` by removing the null-coalescing operator and adding the null-forgiving operator (`!`). This change strengthens data integrity and minimizes the risk of runtime errors. - Implemented general improvements across multiple component files for cleaner code and safer handling of nullable properties, making the codebase more robust and reducing the likelihood of null reference exceptions. * Delete ContentTypeFieldHelper.cs --------- Co-authored-by: TheHadiAhmadi <[email protected]> * #1735 add initial ui of site builder (#1738) * #1735 add initial ui of site builder * Enhance UI with new components and attributes - Added `PluginContainerActions.razor` to FluentCMS.Web.UI.csproj for runtime modification. - Enhanced `PluginContainer.razor` with `data-id` for plugin identification and added `<PluginContainerActions />` for interactive plugin management. - Updated `PluginsSection.razor` with `data-name` for improved section manageability. - Introduced `PageEditorSidebar` component for displaying plugin definitions and added `PageEditorToggler.razor` for UI mode toggling. - Created `PluginContainerActions.razor` component for direct plugin interaction through UI. - Minor placeholder changes in CSS and JavaScript files to support the above enhancements. * #1735 Update Site builder * #1735 update styles * #1735 remove index.html * #1735 cleanup * #1735 add styles for dark mode * #1735 update * #1735 update styles * #1735 add page edit view context * #1735 use iframe for site builder * #1735 fix javascript enhaced events * #1735 Update Drag and drop editor and add responsive * #1735 code cleanup * #1735 cleanup * #1735 run analyzer * #1735 css js cleanup --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update styles of site builder (#1750) Co-authored-by: TheHadiAhmadi <[email protected]> * #1752 build styles (#1753) * Major restructuring in FluentCMS project (#1756) This commit represents a significant overhaul within the FluentCMS project, focusing on the reorganization of error handling mechanisms, project and solution structure adjustments, and the reconsideration of authentication context management. Key changes include the removal and subsequent re-addition of the `AppApiClientException`, `AppError`, `AppException` classes, and the `ExceptionCodes` constants file, indicating a major revision in how errors and exceptions are handled. The `FluentCMS.Common.csproj` project file was deleted, and the project was removed from the `FluentCMS.sln` solution file, suggesting a consolidation or restructuring of the project. Adjustments in project GUIDs, configurations, and references reflect an optimization of the project dependencies and architecture. The `IAuthContext` interface was also removed and then re-added, highlighting a reevaluation of the authentication context within the application. These changes collectively aim to enhance the maintainability, error handling, and overall structure of the FluentCMS project. * Refactor DI and update `Default.razor.cs` (#1762) - Removed `UserLogin` injection in `Default.razor.cs` and replaced it with `LayoutProcessor` to enhance modularity and service-oriented architecture. - Updated `RenderDynamicContent` method to use the injected `LayoutProcessor` directly, improving testability and maintainability by adhering to dependency injection principles. - Added `FluentCMS.Web.UI.DynamicRendering` namespace and registered `LayoutProcessor` as a scoped service in `ServiceExtensions.cs`, facilitating its use across the application and ensuring efficient resource management per client request. - These changes signify a strategic shift towards better architecture practices by utilizing dependency injection, thereby making the application more modular, easier to test, and maintain. * #1761 move all admin plugins to Admin project (#1763) * Implement ILayoutProcessor interface (#1765) - Introduced ILayoutProcessor interface in FluentCMS.Web.UI.DynamicRendering, making LayoutProcessor adhere to this new abstraction for better flexibility and future extensibility. - Updated dependency injection in Default.razor.cs to use ILayoutProcessor, aligning with the Dependency Inversion Principle. Changed the access modifier of the LayoutProcessor property from public to private to enhance encapsulation. - Modified service registration in ServiceExtensions.cs to register ILayoutProcessor as the service type and LayoutProcessor as the implementation, promoting decoupling and ease of future modifications. * #1766 extract interface for SetupManager (#1767) * Refactor API client access and management (#1769) This commit significantly overhauls the application's approach to API client management by introducing a centralized `ApiClientFactory` for streamlined access and instantiation of API clients. Key changes include: - Removal of `JsonSerializerOptions.PropertyNamingPolicy` initialization for simplification. - Introduction of `HTTP_CLIENT_API_NAME` constant in `ApiClientServiceExtensions.cs` for standardized HttpClient naming. - New dependency injection setup for `ApiClientFactory`, including automatic registration of API client interfaces and their implementations, enhancing the application's extensibility and maintainability. - Removal of `HttpClientFactoryHelper.cs` in favor of the more robust `ApiClientFactory` approach. - Addition of `IApiClient` marker interface to clearly identify API client interfaces, facilitating easier and more intuitive API client management. - Insertion of a TODO in `MappingProfile.cs` to suggest future architectural improvements. - Refactoring of `SetupManager` and `BasePlugin`, along with various plugin components, to utilize `ApiClientFactory` instead of `IHttpClientFactory`, reducing direct HttpClient creation and streamlining API client usage. - Updates to Razor component files, such as `PageEditorForms.razor.cs`, to use `ApiClientFactory` for API calls, promoting code consistency and reducing boilerplate. - Removal of unnecessary `HttpClientFactory` and `UserLogin` injections across several components, further simplifying the codebase. - Standardization of `FORM_NAME` access level in `RegisterViewPlugin.razor.cs` to align with conventions. These changes collectively enhance the application's code quality by reducing boilerplate, centralizing API client management, and improving maintainability and readability. * 1770 configure and run analyzer (#1771) * #1770 run analyser * #1770 run analyser * Major overhaul and plugin architecture intro This commit represents a significant pivot in the FluentCMS application's architecture and UI strategy, with a dual focus on streamlining the application and introducing a new plugin architecture. On one hand, we've removed outdated or redundant components, including specific plugins (`FluentCMS.Web.Plugins` and its subprojects) and various UI components (e.g., `ActionButton.razor` and related files), indicating a move towards simplifying the application's structure and improving maintainability. This includes adjustments in project references and configurations to ensure coherence and buildability post-changes. On the other hand, we've introduced a comprehensive set of components and classes that lay the groundwork for a robust plugin architecture. This includes the introduction of a `BasePlugin` class, various form and action button components (`FormActions`, `PluginForm`, `ActionButton`, etc.), and UI components for plugin content (`PluginBody`, `ActionButtons`). These additions are designed to facilitate the development of rich plugin functionalities within the FluentCMS Web application, leveraging dependency injection, parameter passing, and error handling to enhance component reusability and user experience. Together, these changes mark a major shift towards enhancing the application's flexibility, performance, and strategic alignment with future development goals. * Refactor AuthManager for ApiClientFactory (#1773) Refactored `AuthManager` to utilize `ApiClientFactory` instead of `IHttpClientFactory`, streamlining the creation and usage of API clients within the class. The constructor now accepts an `ApiClientFactory` instance, enhancing the instantiation process of API clients. Additionally, the `Login` method has been simplified by directly using the `apiClient` to access an `Account` client for authentication, removing the need to manually create `HttpClient` and `AccountClient` instances. This change aims to simplify and improve the efficiency of the authentication process. * Implement Container system without using any library (#1774) * Implement Container system without any library * Cleanup * #1774 update swagger client --------- Co-authored-by: Amir Pournasserian <[email protected]> * Delete PageEditorToggler.razor (#1776) * 1777 refactor viewcontext and develope viewstate avoid pageplugin editing for admin (#1783) * Refactor state management and enhance plugins This commit represents a significant overhaul in the application's state management by transitioning from the `ViewContext` model to a new `ViewState` model across various components. Key changes include the introduction of the `ViewState` class along with related classes (e.g., `SiteViewState`, `LayoutViewState`) designed to encapsulate UI state information more effectively. This shift aims to improve the architecture by providing a more structured and flexible system for managing state within the application. Additionally, the commit includes the setup and configuration of AutoMapper to facilitate efficient mapping between DTOs and the new ViewState classes, enhancing object mapping processes. The removal of `ViewContext` and related enums underscores the move towards a more secure and maintainable codebase, potentially improving both security and ease of future enhancements. Plugin management has also been enhanced through adjustments in the handling and filtering of locked plugins, leveraging the capabilities of the new `ViewState` model for a more robust framework in managing plugin states. Other changes encompass code cleanup, such as the removal of unused directives and obsolete script references, and adjustments in Razor components to align with the new state management model. This refactor not only aims at improving the application's functionality and security but also sets a foundation for more efficient and flexible future developments. * Enhance dynamic content handling and fix SVG tags This commit introduces several key updates aimed at improving the application's flexibility and consistency in handling dynamic content, as well as correcting SVG icon markup in the AdminLayout. Specifically, changes include: - Updated variable naming for user display in AdminLayout.body.html from `{{user.username}}` to `{{user.user_name}}` for consistency. - Corrected SVG `<path>` tags in the AdminLayout for "Content Builder" and "Sites" links from self-closing to explicitly closed, enhancing consistency and possibly compliance with standards. - Enhanced `RenderDynamicContent` in Default.razor.cs to accept dynamic parameters through a new `parameters` dictionary, populated with data from `ViewState` for more adaptable content rendering. - Modified the `ILayoutProcessor` interface and `LayoutProcessor` implementation in LayoutProcessor.cs to accept a dictionary of key-value pairs, enabling more dynamic content processing. - Updated `LayoutProcessor` to make the `PreProcess` method static and capable of initializing a `ScriptObject` with values from the `keyValues` dictionary, further supporting dynamic content processing. - Removed a constructor in `LayoutProcessor` that accepted a `UserLoginResponse` object, moving towards a more flexible parameter handling approach. These changes collectively enhance the application's dynamic content handling capabilities and ensure greater consistency in UI component rendering. * Add plugin category support across entities This commit introduces the concept of categorizing plugins within the FluentCMS project. Key changes include: - Added a `Category` property to the `PluginDefinition` class in the `FluentCMS.Entities` namespace to categorize plugins. - Updated the `PluginDefinitionCreateRequest` and `PluginDefinitionDetailResponse` classes in the `FluentCMS.Web.Api.Models` namespace to support category specification and retrieval in API operations. - Modified the `PluginDefinitionTemplate` class in the `FluentCMS.Web.Api.Setup.Models` namespace and the `SetupManager` class to handle categories during plugin setup. - Updated the `manifest.json` file to categorize existing plugins under "Auth" and "Admin". - Enhanced the `GeneratedApiClients.cs` file to ensure category information is correctly serialized and deserialized in API interactions. These changes collectively enhance the organization and management of plugins by introducing a categorization system. Further details on the implications of modifying the `config.nswag` file are not included due to the absence of specific diff changes. * #1778 use tailwind cdn (#1780) * #1778 use tailwind cdn * Update app.min.css and map for optimization This commit includes significant updates to the `app.min.css` and its corresponding `.map` file. The primary focus of these changes is on optimization, bug fixes, feature updates, and refactoring. Specifically, the updates aim to reduce the overall file size by removing unused styles and combining similar rules, thereby improving the efficiency of the CSS. Additionally, several bug fixes have been implemented to correct visual and functional issues within the web application's UI. New styles have been added to support the introduction of additional components or pages, enhancing the application's feature set. Lastly, the CSS has undergone a thorough refactoring process to improve maintainability, including the grouping of similar styles and the use of CSS variables for consistent theming across the application. --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update MongoDB.Driver to 2.27.0 in FluentCMS project (#1786) Updated the MongoDB.Driver package from version 2.26.0 to 2.27.0 in the FluentCMS.Repositories.MongoDB.csproj file to ensure compatibility and leverage new features and bug fixes. * #1781 implement texthtml plugin (#1784) * #1781 Working on TextHTML plugin * #1781 Add TextHTML Plugin * #1781 Cleanup * remove news link * #1781 remove news page * #1781 fix hover problem * #1781 remove OneColumnLayout file * #1781 remove Plugin components * #1781 update render mode --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1754 Fix edit user button (#1788) * #1790 add crud actions for plugin (#1791) Co-authored-by: Amir Pournasserian <[email protected]> * #1793 Add Page and External links for rich text editor (#1794) * #1793 Add Page and External links for rich text editor * #1793 use Rich Text Editor for TextHTML plugin * #1793 fix toolbar --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1793 [RichTextEditor] add link to file and fix edit/delete link features (#1795) * #1793 [RichTextEditor] add link to file and fix edit/remove feature of links * #1793 add image for rich Text editor * #1793 add file upload feature for modal * #1793 built styles --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1681 cleanup autocomplete component (#1789) * #1681 work on Autocomplete * #1681 Cleanup Autocomplete (Single) * #1681 add missing files * #1681 Add Autocomplete Multiple component * #1681 build styles --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1792 make column resizer wider and update responsive system (#1796) Co-authored-by: Amir Pournasserian <[email protected]> * #1705 file selector UI (#1740) * #1705 initial commit * #1705 initial commit for file picker modal * #1705 Add Single File selector + file upload * #1705 resolve issue for null reference in file * #1705 working on File selector * #1705 fix update content and fix download links * #1705 remove fileType from SingleFile * #1705 update * #1705 Move SingleFile field to ContentType project * #1705 move AssetDetail to shared * #1705 run analyzer --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor AuditableEntity inheritance (#1800) - AuditableEntity now extends Entity, incorporating its properties and behaviors, including a potentially common `Id` property. This adjustment aligns with the goal of reducing redundancy and ensuring consistency in entity identification across the application. The explicit `Id` property declaration within AuditableEntity has been removed, leveraging inheritance from the Entity class to maintain a consistent identifier property framework. * #1743 implement breadcrumbs and use in file list plugin (#1797) * #1743 implement breadcrumbs and use in file list plugin * #1743 fix errors and warnings * #1743 cleanup * #1743 resolve warnings of Single file picker --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor configs, update entities, enhance audit (#1804) - Refactored configuration classes in `GlobalSettings.cs`, renaming `SmtpServerConfiguration` to `SmtpServerConfig` and `FileUploadConfiguration` to `FileUploadConfig`. Updated references in `GlobalSettingsUpdateRequest.cs` and `SmtpEmailProvider.cs`. - Re-added `Layout`, `PluginDefinition`, and `PluginDefinitionType` classes, indicating a possible restructuring or reversal of their removal. - Removed `GetByIds` method from `IRoleService` interface and its implementation in `RoleService.cs`, streamlining role retrieval. - Introduced `AuditableEntityLog` class in `AuditableEntityLog.cs` to enhance system auditing capabilities, tracking actions on entities with detailed information. * #1801 Make working with site builder easier and add a sample bootstrap page (#1802) * #1808 fix link of logo (#1809) * #1810 fix dark mode flicker and initial load of styles (#1811) * #1810 fix dark mode flicker and initial load of styles * Update Default.razor --------- Co-authored-by: Amir Pournasserian <[email protected]> * Some Improvements (#1807) * replace new regex with static generatedRegex attribute to care about mem performance * change return type of void to task on Accordion.razor.cs update method * remove duplicate selector in Accordion.razor.scss * tiny changes for better readability * replace argument null exception with invalid operation exception that is more suitable * tiny improvements on ApiClientServiceExtensions.cs * some improvements based on sonar cube results * Reverting a few changes --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor and clean up Razor component files (#1817) - Removed unused `System.Globalization` in `FormAutocompleteMultiple.razor.cs`. - Adjusted and standardized brace formatting in `FileListPlugin.razor.cs`. - Removed unnecessary spaces before braces in `FileListPlugin.razor.cs`. - Corrected spacing around `if` statements in `FileListPlugin.razor.cs` for better readability. * #1814 fix some admin panel issues (#1815) * #1814 fix header size * #1814 make auth pages locked * #1814 fix error of API token and Role create/update pages * #1814 fix page title and delete texts and update breadcrumb position * #1814 build styles --------- Co-authored-by: Amir Pournasserian <[email protected]> * Move ChildComponent parameter from BaseComponent to components that use them (fixes #1577) (#1822) * Move ChildComponent parameter from BaseComponent to components that use them (fixes #1577) * Add ChildContent to FieldSettingForm * Fix weird formatting * Fix formatting part 2 * #1822 run code formatter --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update README.md (#1825) * #1831 make litedb as default database provider (#1832) * #1831 make litedb as default database provider * Update Program.cs --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update README.md (#1833) * Update README.md * Update README.md * #1826 Remove login button from DefaultLayout when user is logged in (#1827) * #1826 Remove login button from DefaultLayout * #1826 Update logo --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1830 add Hint property for Form elements (#1835) * #1828 add admin toolbar for page and plugin (#1829) * #1828 add admin toolbar for page and plugin * #1828 fix responsive * #1828 fix js error * #1828 fix style of toolbar * #1828 break some textHTMLs to multiple plugins, and cleanup * #1828 cleanup * #1828 style cleanup * #1828 add todo --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1837 move scss files to Flowbite folder (#1838) Co-authored-by: Amir Pournasserian <[email protected]> * Correct installation instruction (#1840) Corrects and simplifies installation instructions * Update README.md (#1841) * #1839 Fix TextEditor issue and remove usused files (#1842) * #1843 add initial docs (#1844) * #1843 add initial docs * #1843 link correction * Update README.md * #1848 remove warnings of RichTextEditor component (#1849) * #1848 remove warnings of RichTextEditr component * Improve code readability with consistent if statement spacing Enhanced code readability by adding spaces after the `if` keyword and before the opening parenthesis. Specific changes include: - Reformatted `if(string.IsNullOrEmpty(value.Href))` to `if (string.IsNullOrEmpty(value.Href))` - Reformatted `if(page != null)` to `if (page != null)` - Reformatted `if(FileUploadConfig != null)` to `if (FileUploadConfig != null)` --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor site builder javascript code (#1847) * Working on cleaning up SiteBuilder * cleanup * cleanup * Add DI for NavigationManager and ApiClientFactory Updated SiteBuilder class to include injected dependencies: - Added public NavigationManager property for external access. - Added private ApiClientFactory property for internal use. --------- Co-authored-by: Amir Pournasserian <[email protected]> * Update Site.md (#1856) change site props * Update Page.md (#1861) * Update Page.md (#1860) * #1467 Implement Page management (#1852) Co-authored-by: Amir Pournasserian <[email protected]> * #1854 add page update plugin orders api (#1857) * #1854 add api controller * #1854 generate api client * #1854 update frontend to use PageUpdatePluginOrders api * Refactor formatting and initialization in multiple files Refactored code formatting and initialization across several files: - Updated `PageController` to improve mapping and loop formatting. - Modified `PageCreatePlugin` and `PageUpdatePlugin` to use list initialization shorthand and adjusted loop formatting. - Improved `PageListPlugin` loop and condition formatting. - Enhanced `SelectOption` class readability with better formatting. --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1853 Implement Edit and Detail Layouts for site and page (#1858) Co-authored-by: Amir Pournasserian <[email protected]> * Add Settings property to Plugin classes; update SetupManager (#1864) * Add Settings property to Plugin classes; update SetupManager Added a Settings property of type Dictionary<string, string> to the Plugin, PluginCreateRequest, PluginDetailResponse, and PluginUpdateRequest classes to support additional configuration or metadata for plugins. Reformatted the initialization of the site object in the SetupManager class for better readability and maintainability. * Fix create plugin error * #1863 fix plugin update --------- Co-authored-by: TheHadiAhmadi <[email protected]> * Update README.md (#1869) * Update README.md * Update README.md * 1820 api authorizatrion by babak (#1866) * #1820 added the new field 'ApiKey' to ApiToken as client entity. Also added it to service and presentation layer * #1820 moved the ApiKey generation to the service layer as it is a bussiness logic rather that database logic * #1820 Filter for APIKey header and validating it * #1820 removed PolicyAll as all clients including the UI have to use new ClientId model * #1820 rename refactoring * #1820 merged the functionality of ApiAuth into PolicyAuth * #1820 use PolicyAll again as some parts needs to be rendered before initilize happens * Refactor API token handling and policy attributes Refactored the `ApiToken` class to replace `Token` and `ExpiredAt` with `Key`, `Secret`, and `ExpireAt`. Removed `ApiKey` property. Replaced `ApiTokenProvider` with a new HMACSHA256-based implementation. Updated `ApiTokenService` to use new methods, added `RegenerateSecret` and `Validate` methods. Simplified `PolicyAttribute` by removing `Microsoft.AspNetCore.Authorization` dependency. Removed `Constants` class. Updated controllers to use `PolicyAll` attribute. Updated `PolicyAuthorizeFilter` to use `X-API-AUTH` header and new `ApiTokenService` methods. Updated `IApiTokenRepository` and implementations to use `Key` property. Added new exception codes for token issues. Added `JwtApiTokenProvider` and updated `IApiTokenProvider` interface. * Refactor: Code reformatting and cleanup Reformatted code in ApiTokenProvider.cs and RoleController.cs to improve readability and maintain consistent formatting. Removed an unnecessary blank line in ApiTokenRepository.cs. No functional changes were made. * Refactor ApiToken handling and update mappings - Modify `Update` method in `ApiTokenController` to use `mapper` for mapping `ApiTokenUpdateRequest` to `ApiToken`. - Update `apiTokenService.Update` to accept `ApiToken` and `CancellationToken`. - Add mapping configuration in `MappingProfile` for `ApiTokenUpdateRequest` to `ApiToken`. - Replace `Token` and `ExpiredAt` with `Key`, `Secret`, and `ExpireAt` in `ApiTokenDetailResponse`. - Include `ExpireAt` and reorder `Description` in `ApiTokenUpdateRequest`. * Update NSwag/NJsonSchema versions and improve serialization Updated GeneratedApiClients.cs to use newer versions of NSwag (14.1.0.0) and NJsonSchema (11.0.2.0). Introduced instance-specific JsonSerializerOptions for flexible serialization settings. Added Initialize method in constructors and partial methods for customization. Updated pragma directives and renamed classes/properties for consistency. Renamed FileUploadConfiguration to FileUploadConfig in multiple files. Updated labels in ApiTokenListPlugin.razor and fixed formatting in SingleFileFieldFormFilePicker.razor.cs. * Refactor configuration management system Introduced `ConfigManager` and `IConfigManager` for improved configuration handling. Updated `SetupManager` to initialize the database and API token using the new configuration system. Removed `ConfigurationExtensions` class and its methods. Updated `ApiClientServiceExtensions` to use `ApiSettings` configuration. Modified `appsettings.json` to reflect the new configuration structure. * adding api token to appsettings.json * some changes in policy authorizefilter using mongodb is started * policy check filter is refactored and some logic are added apisetting.url is updated. newtonsoft.json is removed * #1820 resolve conflicts * #1820 update api client * Switch from MongoDB to LiteDB and update config setup Removed explicit addition of appsettings.json configuration file. Enabled LiteDB by uncommenting its service registration. Disabled MongoDB by commenting out its service registration. * #1820 remove unused ConfigManager * Switch to ApiTokenAuthorizeFilter for authorization Updated BaseController to use ApiTokenAuthorizeFilter instead of PolicyAuthorizeFilter. Removed PolicyAuthorizeFilter.cs and added ApiTokenAuthorizeFilter.cs, which replicates the functionality of the removed class. * Uncomment setup reset logic in DEBUG block Uncommented the `using var scope = app.Services.CreateScope();` line and subsequent lines within the `#if DEBUG` block. This ensures that the setup reset logic, including retrieving the `ISetupManager` service and calling its `Reset` method, is executed during the development phase. This change is useful for resetting the database or other setup tasks during development. * Update IApiTokenRepository.cs * Removing AnyPolicy Solving appsettings reload on change issue formatting json on save some change in policyfilter * Remove extra line * Remove extra line * Remove extra line * Remove unused section * Remove unused class * appsettings clenaup --------- Co-authored-by: afshar <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> Co-authored-by: root <[email protected]> * Fix typos in supported databases and roadmap sections (#1875) Corrected the spelling of "coming soon" in the list of supported databases. Fixed the spelling of "Administration Dashboard" in the roadmap section. Corrected the spelling of "Headless CMS Features" in the roadmap section. * 1806 refactor role management by babak (#1874) * role CRUD is refactored default roles are going to be added in setup process some tiny refactors * role CRUD is refactored default roles are going to be added in setup process some tiny refactors are done * Update Program.cs * base folder is removed from Entities project some commented codes are deleted from front-end roleManagement * base folder is removed from Entities project some commented codes are deleted from front-end roleManagement * Remove extra lines * removing some extra lines some renaming nswag config has been updated * removing some extra lines formating some razor pages * GetAllForSite is added to RoleManagement(Repo, Service, Controller) --------- Co-authored-by: root <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> * #1878 Remove unused component and set OnClose event handler for modals (#1879) * #1704 implement redirectTo query parameter (#1880) * #1704 remove unused component * #1704 implement redirectTo query parameter * #1865 add enability field to apitoken creation and update form front (#1876) * #1865 working on ApiTokens plugin * #1865 complete api token plugin * resolve secret regenerate problem * role creation and update is finalized * Update appsettings.json --------- Co-authored-by: B.Davoodi <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> * #1861 run code analyzer (#1882) * MessageBus Concept And Primary Roles Creation Per Site Is Added (#1883) * messageBus concept is added primary roles creation is implemented * primary roles create and delete will be executed on repository * Run code cleanup * Update role name and description in RoleService Renamed the "Super Admin" role to "Administrators" in the AddPrimaryRolesForSite method of the RoleService class. Updated the description to reflect full access to the site instead of the system. * Optimize role creation in RoleService Refactor RoleService to use _roleRepository.CreateMany instead of iterating through primaryRoles and calling _roleRepository.Create for each role. This change reduces the number of individual create operations, potentially improving performance. * Optimize role deletion with bulk operations Enhanced RoleService to use bulk deletion for roles, improving efficiency. Added DeleteMany method to IEntityRepository interface. Implemented DeleteMany in EntityRepository for both general and MongoDB contexts, enabling bulk deletion and returning deleted entities. * Refactor site update error handling and publish action Ensure immediate exception if site update fails by throwing AppException with code SiteUnableToUpdate directly during assignment. Remove redundant null check and exception handling. Publish SiteUpdated action after successful update. --------- Co-authored-by: root <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> * Fix routing problem after form submit (#1888) * #1877 secret-key-regeneration-generates-same-secret (#1890) * regenerate secret is done Validate method is added to apiTokenProvider perevent to add duplicated apiToken (based on Name) * unique api token name is added to update * some renames * Refactor ApiTokenService and update policy actions Refactored `ApiTokenService` to use `GetByName` instead of `TokenBySameNameIsExist` for checking token existence in `Create` and `Update` methods. Simplified `Delete` method by removing redundant existence check. Updated `ApiTokenController` to insert a new policy with area "Global" and action "All Actions". Changed `_anyPolicyAction` in `ApiTokenAuthorizeFilter` and policy action in `SetupManager` to "All Actions". Updated `IApiTokenRepository` and `ApiTokenRepository` to use `GetByName` method. Renamed `ApiTokenNameIsDuplicated` to `ApiToken.NameIsDuplicated` in `ExceptionCodes`. * Refactor ApiTokenAuthorizeFilter for DI simplification Refactored the `ApiTokenAuthorizeFilter` class to remove the constructor dependency injection of `IApiTokenProvider`. The `ValidateApiToken` method is now static and retrieves the `IApiTokenProvider` instance from `HttpContext.RequestServices`. The `CheckSignature` method has been removed, with its functionality integrated into `ValidateApiToken`. This change simplifies the class structure and improves maintainability. * Add expiration date display to API token data table Introduced a new <DataTableItem> labeled "Expire At" in the ApiTokenListPlugin.razor file to display the expiration date (@context.ExpireAt) of the API token. Existing functionality remains unchanged. * Refactor API token provider and fix method name typo Updated IApiTokenProvider to correct method name typo from Valiadate to Validate. Removed JwtApiTokenProvider class. Added DefaultApiTokenProvider class with methods to generate and validate JWT tokens, replicating the functionality of the removed JwtApiTokenProvider class. --------- Co-authored-by: root <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> * Update token provider and fix typo in method name (#1895) The `ServiceExtensions` class now registers `DefaultApiTokenProvider` instead of `JwtApiTokenProvider` for the `IApiTokenProvider` interface. The `ApiTokenAuthorizeFilter` class has a corrected method name from `Valiadate` to `Validate` for the `apiTokenProvider`'s method call. * #1891 Update site builder based on figma design (#1893) * #1891 Update site builder based on figma design * apply some changes and fix bugs * #1891 allow drag and drop between sections * Refactor class locations and update property initializations - Moved `PageUpdatePluginOrdersRequest` and `PagePluginDetail` classes within the file. - Removed default value assignment for `Id` property in `PagePluginDetail`. - Updated `PageUpdatePluginOrdersRequest` to initialize `Plugins` property with new syntax (`= []`). --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1909 run analyser (#1910) * #1911 update Nuget packages (#1912) * #1900 implement message bus using MediatR (#1914) * #1900 implement message bus using MediatR * Fix action name in SiteService Delete method Updated the `Delete` method in the `SiteService` class to change the action name from `SiteUpdated` to `SiteDeleted` when publishing a message after a site is deleted. * Refactor service registration for message bus Refactored the `AddApplicationServices` method in `ServiceExtensions` by moving MediatR and `InMemoryMessagePublisher` registration to a new `AddInMemoryMessageBus` method in `MessageBusServiceExtensions`. This improves code organization and maintains existing functionality. * Set Page Management feature enabled in Readme file (#1916) * Expires field is added to ApiToken generation (#1908) * 1885 role feature enhancement amir (#1917) * role changes(need to merge dev before coding) * UserRole is added to Backend * UserRole is added to front * appsetting apisetting key value is removed * IMessageSubscriber is added to UserRoleService * code review and some file movement * #1885 apply some code cleanup, remove unnecessary changes * removing UserRoleAssigment Modal * Refactor services and controllers for dependency injection Refactored `RoleService` and `UserRoleService` to use constructor injection for their dependencies, replacing private fields with new ones. Updated methods to use these new fields. Renamed `OnRoleMessageReceived` to `Handle` in `UserRoleService` and updated it to handle `Message<Role>` notifications. Refactored `RoleController` to remove `IEnumerable<EndpointDataSource>` dependency and `UserRoleController` to include `IMapper` dependency. Updated `GetUserRoles` method in `UserRoleController` to return `RoleDetailResponse` instead of `UserRoleDetailResponse`. Deprecated `UserRoleDetailResponse` class and updated `GeneratedApiClients` accordingly. Updated `UserRoleUpdateRequest` to require `RoleIds` property. Made minor formatting and whitespace changes. In `ServiceExtensions.cs`, added a commented-out line for role mapping. Updated `RoleListPlugin.razor` to control `ActionButtonDelete` visibility based on role type. Removed redundant line break in `UserUpdatePlugin.razor`. Changed `Roles` property type in `UserUpdatePlugin.razor.cs` to `List<RoleDetailResponse>`. Added new `Roles` property to `SiteViewState` and introduced `RoleViewState` class and `RoleTypesViewState` enum in `ViewState.cs`. * Refactor RoleService and update UserRole classes Refactored the `RoleService` class by modifying the `IRoleService` interface to include a new `GetById` method. Updated the `RoleService` constructor to accept an `IMessagePublisher` and removed the `_roleRepository` and `_roleMessagePublisher` fields. The constructor that only took `IRoleRepository` has been removed, and `GetAllForSite` now uses `roleRepository` directly. Removed the `UserRoleUpdateRequest` class from `RoleCreateRequest.cs` and the `UserRoleDetailResponse` class from `UserRoleDetailResponse.cs`. Re-added the `UserRoleUpdateRequest` class in `UserRoleUpdateRequest.cs` with the same required properties: `SiteId`, `UserId`, and `RoleIds`. * #1885 add user/role features to ViewState * #1885 undo icon changes * Update IconResource.resx * #1885 fix navigation problem --------- Co-authored-by: root <[email protected]> Co-authored-by: B.Davoodi <[email protected]> Co-authored-by: TheHadiAhmadi <[email protected]> * 1885 role feature enhancement amir (#1919) * role changes(need to merge dev before coding) * UserRole is added to Backend * UserRole is added to front * appsetting apisetting key value is removed * IMessageSubscriber is added to UserRoleService * code review and some file movement * #1885 apply some code cleanup, remove unnecessary changes * removing UserRoleAssigment Modal * Refactor services and controllers for dependency injection Refactored `RoleService` and `UserRoleService` to use constructor injection for their dependencies, replacing private fields with new ones. Updated methods to use these new fields. Renamed `OnRoleMessageReceived` to `Handle` in `UserRoleService` and updated it to handle `Message<Role>` notifications. Refactored `RoleController` to remove `IEnumerable<EndpointDataSource>` dependency and `UserRoleController` to include `IMapper` dependency. Updated `GetUserRoles` method in `UserRoleController` to return `RoleDetailResponse` instead of `UserRoleDetailResponse`. Deprecated `UserRoleDetailResponse` class and updated `GeneratedApiClients` accordingly. Updated `UserRoleUpdateRequest` to require `RoleIds` property. Made minor formatting and whitespace changes. In `ServiceExtensions.cs`, added a commented-out line for role mapping. Updated `RoleListPlugin.razor` to control `ActionButtonDelete` visibility based on role type. Removed redundant line break in `UserUpdatePlugin.razor`. Changed `Roles` property type in `UserUpdatePlugin.razor.cs` to `List<RoleDetailResponse>`. Added new `Roles` property to `SiteViewState` and introduced `RoleViewState` class and `RoleTypesViewState` enum in `ViewState.cs`. * Refactor RoleService and update UserRole classes Refactored the `RoleService` class by modifying the `IRoleService` interface to include a new `GetById` method. Updated the `RoleService` constructor to accept an `IMessagePublisher` and removed the `_roleRepository` and `_roleMessagePublisher` fields. The constructor that only took `IRoleRepository` has been removed, and `GetAllForSite` now uses `roleRepository` directly. Removed the `UserRoleUpdateRequest` class from `RoleCreateRequest.cs` and the `UserRoleDetailResponse` class from `UserRoleDetailResponse.cs`. Re-added the `UserRoleUpdateRequest` class in `UserRoleUpdateRequest.cs` with the same required properties: `SiteId`, `UserId`, and `RoleIds`. * #1885 add user/role features to ViewState * #1885 undo icon changes * Update IconResource.resx * #1885 fix navigation problem * Update PageController.cs * remove extra files GeneratedApiClient is updated --------- Co-authored-by: root <[email protected]> Co-authored-by: B.Davoodi <[email protected]> Co-authored-by: TheHadiAhmadi <[email protected]> * #1915 permission implementation (#1920) * permission is added * permission manage is added * some propery movement * permission manager is finilized generated api client is updated * Update appsettings.json * Update PageService.cs * Update PermissionManager.cs --------- Co-authored-by: root <[email protected]> Co-authored-by: Amir Pournasserian <[email protected]> * #1923 use separate project for RichText plugin (#1925) * #1906 roleduplication name bug babak (#1929) * roletype is set to old value in update role duplication check bug is fixed * UserRole assignment bug is fixed * #1921 Setup Manager is moved to service layer (#1941) * Setup Manager is moved to service layer * code cleanup --------- Co-authored-by: Amir Pournasserian <[email protected]> * Restore FluentCMS.Entities namespace and class definitions (#1947) Reintroduced the `namespace FluentCMS.Entities;` declaration and restored class definitions for `Page`, `Permission`, `Plugin`, `PluginContent`, `Role`, `Site`, `SiteAssociatedEntity`, and `UserRole`. Ensured all properties and methods are consistent with the original implementation. Also reintroduced the `Role` class and `RoleTypes` enum, and restored the `SiteAssociatedEntity` class and `ISiteAssociatedEntity` interface. These changes maintain the organization and structure of the codebase without adding new functionality. * #1949 Remove bootstrap page and layout (#1950) * #1928 implement content list viewer plugin (#1948) * #1928 Implement Content list plugin * #1928 update styles * #1928 apply new changes * Rename Edit to settings * Add Blog link - Added a new navigation link for "Blog" in `DefaultLayout.body.html`. * Reformat appsettings.json and clear ApiSettings Key Reformatted the `ApiSettings` section in `appsettings.json` for better readability and cleared the `Key` value. The `Url` property remains unchanged. Additionally, reformatted the `ConnectionStrings` section without altering the `LiteDb` and `MongoDb` values. --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor: Introduce new provider architecture (#1944) * Refactor: Introduce new provider architecture Refactored the project to introduce a new provider architecture for API tokens, email, file storage, and message bus functionalities. Key changes include: - Removed `SmtpServerConfig` property from `GlobalSettings` and `GlobalSettingsUpdateRequest`. - Removed `SmtpServerConfig` class and several provider-related classes. - Updated multiple service files to include `using` statements for `FluentCMS.Providers` namespaces. - Updated `FluentCMS.Services.csproj` to remove `MediatR` and add provider project references. - Updated `ServiceExtensions.cs` to remove old provider registrations. - Updated `FluentCMS.sln` to add new provider projects and remove old references. - Added new provider projects and interfaces for API tokens, email, file storage, and message bus. - Added new configuration classes and service extension methods for the new providers. - Updated `Program.cs` to register new providers. - Updated `manifest.json` and `appsettings.json` to reflect new provider configurations. * Enhance MediatR service registration in ServiceExtensions Updated AddInMemoryMessageBusProvider to dynamically find and register MediatR services from all assemblies in the current application domain whose names start with "FluentCMS". This improves flexibility and dynamic service registration. * Refactor using directives in global and filter files Removed `FluentCMS.Providers` from `_GlobalUsings.cs` as it is no longer needed globally. Cleaned up `ApiTokenAuthorizeFilter.cs` by removing unnecessary `FluentCMS.Providers` and re-adding only `FluentCMS.Providers.ApiTokenProviders`. * Add TemplateRenderingProviders and update project references (#1952) * Add TemplateRenderingProviders and update project references - Updated `FluentCMS.sln` to replace project type GUIDs. - Added new `TemplateRenderingProviders` projects. - Updated `GlobalSection` in `FluentCMS.sln` for new projects. - Added project reference to `FluentCMS.Providers.TemplateRenderingProviders` in `FluentCMS.csproj`. - Registered `ScribanTemplateRenderingProvider` in `Program.cs`. - Updated `appsettings.json` with new API key for `ApiSettings`. - Refactored `LayoutProcessor.cs` to use `ITemplateRenderingProvider`. - Updated `FluentCMS.Web.UI.csproj` to remove Scriban and add project reference. - Updated `ContentListViewPlugin.razor.cs` to use `ITemplateRenderingProvider`. - Updated `FluentCMS.Web.Plugins.Contents.ContentViewer.csproj` to add project reference and remove Scriban. - Added new project files for `TemplateRenderingProviders` and `TemplateRenderingProviders.Abstractions`. - Added `ITemplateRenderingProvider` interface. - Added `ScribanTemplateRenderingProvider` class. - Added `ServiceExtensions` for registering `ScribanTemplateRenderingProvider`. * #1942 fix exception in blog edit page * Update Blog section link and manifest configuration - Changed "Blog" link to "Blogs" in DefaultLayout.body.html - Updated manifest.json to remove old "Blogs" config - Added new "Blogs" config with detailed settings for content display --------- Co-authored-by: TheHadiAhmadi <[email protected]> * #1953 regenerate api clients (#1954) * Improve code readability and formatting (#1956) Updated `ContentListSettingsPlugin.razor.cs`: - Reformatted `if` condition checking `contentTypeResponse?.Data`. - Properly indented `Model` initialization within `if (Model is null)` block. - Reformatted `SettingsModel` class definition to follow C# conventions. Updated `ScribanTemplateRenderingProvider.cs`: - Reordered `using` directives. - Reformatted `if` condition checking `string.IsNullOrEmpty(content)`. * #1934 develop global setting management plugin - BABAK (#1958) * global setting update is added * superadmin permission is applied * setup manager is removed from permission manager * some code cleanup * Refactor GlobalSettings handling and update API responses Enhanced validation and exception handling for the SuperAdmins list in GlobalSettingsService. Updated SetupManager to initialize SuperAdmins correctly and removed unused InitLayouts method. Refactored UserService to improve exception messages and added cancellationToken parameter. Changed GlobalSettingsController methods to return GlobalSettingsResponse and updated mapping configurations accordingly. Updated GeneratedApiClients to reflect changes in response types and serialization properties. Refactored GlobalSettingsPlugin to use a new GlobalSettingsUpdateModel class for form data management. Updated form binding, initialization, and submission logic. Added and renamed exception codes for clarity. --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1918 Seperate UserRoleDelete from UserDelete method in UserService (#1959) * the task is done * Remove IUserRoleRepository and add user action messages Removed IUserRoleRepository from UserService constructor. Added message publishing in Create and Update methods to indicate user creation and update actions using messagePublisher.Publish with ActionNames.UserCreated and ActionNames.UserUpdated respectively. --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1960 Applying PermissionManager for Page and Plugin (#1961) * applying permissionManager * Improve permission checks and error handling - Update `PageService` to check `SiteContributor` permissions in `Create` and optimize `GetBySiteId` with `HasAccess`. - Extend `IPermissionManager` with `HasAccess` method for collections. - Implement `HasAccess` in `PermissionManager` to check permissions on entity collections. - Refactor `PluginService` to enhance permission checks and error handling, including new `pageRepository` parameter in constructor and optimized `GetByPageId` method. * permissionManager is refactored --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1968 add AdminSidebar and secondary sidebar for content types (#1969) Co-authored-by: Amir Pournasserian <[email protected]> * #1957 implement Plugins.Base project and BasePlugin component (#1967) * #1957 cleanup admin plugins and add base plugin project * cleanup manifest.json * #1957 cleanup TextHTML plugin * Cleanup ContentList and RichText plugins * add UpdateSettings api for Plugins * Update project GUIDs and rename BasePlugin project Updated project type GUIDs in FluentCMS.sln for several projects: - FluentCMS.Providers.TemplateRenderingProviders.Abstractions - FluentCMS.Providers.TemplateRenderingProviders - FluentCMS.Web.Plugins.BasePlugin (renamed to FluentCMS.Web.Plugins.Base) Renamed FluentCMS.Web.Plugins.BasePlugin to FluentCMS.Web.Plugins.Base. Updated solution configuration mappings and nested project structure to reflect new project GUIDs and project name. Modified ContentListSettingsPlugin.razor to change namespace to FluentCMS.Web.Plugins.Contents.ContentViewer. --------- Co-authored-by: Amir Pournasserian <[email protected]> * #1968 Remove nested sidebar from admin panel (#1970) * first step of refactoring is done (#1963) Chain Of Responsibility design pattern is used * Refactor JWT auth and middleware, update access levels (#1978) Removed JwtAuthorizeAttribute class and attribute usage. Changed ADMIN_TEMPLATE_PHYSICAL_PATH to public. Added JwtAuthorizationMiddleware for JWT processing. Reintroduced ApplicationExecutionContextMiddleware with docs. * #1975 Implement Blocks API (#1976) * #1975 Implement Blocks API * #1975 Add Block Management Plugins and add /admni/blocks page * Refactor Block class and update related services - Updated `Block` class to inherit from `SiteAssociatedEntity`. - Modified `IBlockService` to replace `GetAll` with `GetAllForSite`. - Updated `BlockService` to reflect interface changes and refactored `Delete` method. - Changed `BlockController` to use `GetAllForSite` method. - Added `SiteId` property to `BlockCreateRequest`. - Refactored `BlockUpdateRequest` to explicitly include properties. - Updated `IBlockRepository` to extend `ISiteAssociatedRepository`. - Changed `BlockRepository` classes to inherit from `SiteAssociatedRepository`. - Removed unused constants from `ExceptionCodes`. - Redefined `Block` class in `FluentCMS.Entities` namespace. * Refactor BlockDetailResponse inheritance Changed BlockDetailResponse to inherit from BaseSiteAssociatedResponse instead of BaseAuditableResponse in the FluentCMS.Web.Api.Models namespace. * Refactor API clients for improved readability and functionality Enhanced response handling by changing the response type in the ProcessResponse method from BooleanIApiResult to BlockDetailResponseIApiPagingResult. Improved code formatting and readability by adding spaces around keywords, ensuring consistent indentation, reformatting foreach loops, and aligning #pragma warning directives with method declarations. Added comments to indicate operation paths for various API endpoints. Replaced GetAllAsync method in BlockClient with CreateAsync, UpdateAsync, and DeleteAsync methods. Introduced new properties (siteId) to BlockCreateRequest and BlockUpdateRequest classes, and removed the id property from BlockUpdateRequest. Introduced a new ObjectResponseResult<T> struct and a ReadObjectResponseAsync<T> method for HTTP response deserialization. Added a ConvertToString method for URL parameter conversion. Added a new IGetAllClient interface and its implementation GetAllClient to handle GetAll operations, including a SiteIdAsync method. Updated boolean to string conversion to ensure lowercase results and adjusted byte array to Base64 string conversion for consistent formatting. * #1975 use SiteId for block plugins --------- Co-authored-by: Amir Pournasserian <[email protected]> * Refactor async method signatures and add new features (#1981) Refactored the `Handle` method signatures in various handler classes to place the `async` keyword after `virtual` or `override`. Added a new `HttpPut` method `UpdateSettings` to `PluginController`. Updated `JwtAuthorizationMiddleware` to reorder `using` statements. Added `Description` and `Content` properties to `BlockCreateRequest`. Introduced a new `Inject` property `ApiClient` in `AdminSidebar.razor.cs` and made formatting changes. Removed a redundant closing brace in `BlockListPlugin.razor.cs`. Cleaned up `_GlobalUsings.cs` by removing several `global using` directives. * Refactor AuthContext to ApiExecutionContext (#1985) * Refactor AuthContext to ApiExecutionContext Replaced IAuthContext with IApiExecutionContext across the codebase. Enhanced ApiExecutionContext with additional properties and documentation. Removed AuthContext and its usages. Updated services, repositories, and controllers to use IApiExecutionContext. Registered ApiExecutionContext as a scoped service. Removed ApplicationExecutionContextMiddleware, functionality now in ApiExecutionContext. Updated filters and mapping profiles to use IApiExecutionContext. Replaced ApplicationExecutionContextMiddleware with JwtAuthorizationMiddleware. Updated repository classes to use IApiExecutionContext for audit fields. * Remove default initialization of role ID arrays The default initialization of the `ViewRoleIds`, `ContributorRoleIds`, and `AdminRoleIds` properties in the `PageCreateRequest` class has been removed. Previously, these properties were initialized to empty arrays (`[]`). Now, they are no longer initialized with a default value. * 1892 setup initialization is chaned (#1971) * first step of refactoring is done Chain Of Responsibility design pattern is used * ServerSettings is added to appsettings.json appsettings.development.json is added * appsettings.development.json is added isInitialized is implementaded * using System.Text.Json.Nodes * Standardize modifier order in async method declarations Reordered the `async` keyword in method declarations to ensure a consistent coding style across the codebase. Changes include: - `BaseSetupHandler` class: `Handle` method - Derived classes: `Handle` method in `ApiTokenHandler`, `ContentTypeHandler`, `GlobalSettingsHandler`, `LayoutHandler`, `PageHandler`, `PluginHandler`, `SetInitializedHandler`, `SiteHandler`, `SuperAdminHandler` - `ApiTokenAuthorizeFilter` class: `CheckValidityToSetup` method --------- Co-authored-by: Amir Pournasserian <[email protected]> * globalSettings superadmin is filled in setup (#1993) * #1995 add logout button and theme switcher to default layout (#1996) * ApiSettings is renamed to ClientSettings (#1994) Co-authored-by: Amir Pournasserian <[email protected]> * Hide Admin Toolbar and Admin Panel button from un-authenticated users (#2002) * #1998 add "Add page" button to toolbar. and update layout styles (#2001) * 2000 when i submit setup form sometimes it doesnt redirect automatically (#2009) * Refactor services and remove setup-related code Major refactor of services to include IMessagePublisher dependency and publish messages on CRUD operations. Removed setup-related classes, interfaces, and methods. Updated layout and content templates, and modified service registrations in Program.cs. Enhanced HTML layouts with new meta tags, styles, and scripts. Removed obsolete configuration and methods, and introduced new methods and properties for improved functionality. * Enhance layouts with dark mode, meta tags, and scripts AdminLayout.body.html: - Added sticky navigation bar with dark mode support. - Included loading bar, sidebar toggles, and theme toggle. - Added user menu, main content area, and plugins section. - Included JavaScript files for additional functionality. AdminLayout.head.html: - Added meta tags for charset, viewport, description, author, and app names. - Included links for Google Fonts, CSS files, and icons. - Added JavaScript files for app configuration and Tailwind CSS. AuthLayout.body.html: - Added loading bar and two-column layout for authentication. - Included welcome message and JavaScript files. AuthLayout.head.html: - Added meta tags for charset, viewport, and app names. - Included links to CSS files and icons. - Added JavaScript files for Tailwind CSS configuration. DefaultLayout.head.html & EditLayout.head.html: - Enhanced with meta tags, Google Fonts, stylesheets, and Tailwind CSS scripts. EditLayout.body.html: - Introduced dark mode section and plugin section. - Added scripts for Flowbite, app-specific JavaScript, and loading bar. manifest.json: - Defined global settings, plugin definitions, and site structure. * Refactor setup and permission handling - Added `Initialized` property to `GlobalSettings` to track initialization status. - Removed old setup-related constants and added `SetupCompleted` in `ActionNames`. - Introduced `SetInitialized` method in `IGlobalSettingsService` and its implementation. - Removed `using FluentCMS.Services.Models.Setup` directive from several files. - Updated me…