Content Management System
MIT license
Developer Friendly
DragonFly is an open source content management system based on ASP.NET Core and Blazor for the admin interface.
- Define schema with custom fields
- Create, update, delete and publish/unpublish content items based on schema
- Create new fields with FieldGenerator
- Create typed content items with ModelGenerator
- BlockField for structured page content
- TextBlock, HtmlBlock, ColumnBlock, GridBlock, AssetBlock, YouTubeBlock, CodeBlock,..
- Asset management
- Folder tree
- Asset metadata like ImageMetadata and PdfMetadata
- Use IAssetProcessing after asset upload
- Create thumbnails for image and pdf files with ImageWizard
- REST API
- Permissions for content, schema, asset, asset folder, webhooks
- Dynamic permissions for every schema
- Background tasks
- WebHooks
- MongoDB storage
- Create proxies with ProxyGenerator
- Admin interface with Blazor
Decoupled
Use Controllers, Razor Page or Razor Components.
Headless
Use REST API to query content and assets.
Admin interface (Blazor)
Create your custom fields, modules and blocks.
Getting started
- .NET 8.0 SDK
- Visual Studio 2022
- MongoDB instance
To use the project template you need first to download and install it from NuGet.
dotnet new install DragonFly.Templates
After this you can create the project with:
dotnet new DragonFly
If you have a remote MongoDB instance, you need to add some appsettings:
"MongoDB": {
"Hostname": "localhost",
"Database": "DragonFly_App",
"Port": 27017,
"Username": "",
"Password": ""
},
- Create nested folder structure
- Preview for image, video, pdf and svg files
- Custom metadata for different mime types
- Image: width, height, bits per pixel
- PDF: number of pages, PDF version
- Video: codec for video and audio, channels, duration
- Available blocks:
- HeadingBlock,
- TextBlock,
- HtmlBlock,
- CodeBlock,
- ContainerBlock,
- ColumnBlock,
- AssetBlock,
- ReferenceBlock,
- GridBlock
- Use DisplayTemplates as block view
[ContentItem]
public partial class StandardPageModel
{
[StringField(Required = true, ListField = true)]
private string? _title;
[SlugField(Required = true, Index = true)]
private string? _slug;
[BoolField(Required = true, Index = true)]
private bool? _noFollow;
[BoolField(Required = true, Index = true)]
private bool? _noIndex;
[BoolField(Required = true, Index = true)]
private bool? _isStartPage;
[BoolField(Required = true, Index = true)]
private bool? _isFooterPage;
[BlockField]
private BlockField _mainContent;
}
builder.Services.AddDragonFly()
.AddModels(x => x.Add<StandardPageModel>());
var result = await ContentStorage.QueryAsync<StandardPageModel>(x => x
.Published(true)
.Top(10)
.Slug(x => x.Slug, "my-product")
.Integer(x => x.Quantity, 10, NumberQueryType.Equal)
.String(x => x.Title, "Test", StringQueryType.Equal)
);