Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
298cc99
feat: begin development of version 0.0.9-alpha
ReneSchwarzer Apr 18, 2025
0dccf68
add: reference to WebExpress.Tutorial.WebUI
ReneSchwarzer Apr 21, 2025
6c394c6
feat: general improvements
ReneSchwarzer Apr 27, 2025
d2cb473
add: implement method chaining for fluent interface
ReneSchwarzer Apr 29, 2025
9639583
feat: general improvements
ReneSchwarzer May 4, 2025
300f973
add: new css concatenate method
ReneSchwarzer May 10, 2025
3641428
feat: general improvements
ReneSchwarzer May 11, 2025
a416a87
add: find method
ReneSchwarzer May 12, 2025
1be0919
add: new web ui interface for ui elements like fragments or controls
ReneSchwarzer May 18, 2025
3fc6086
feat: improved the web ui interface
ReneSchwarzer May 18, 2025
77d17bf
feat: improved the html elements
ReneSchwarzer May 25, 2025
2f693c6
feat: general improvements
ReneSchwarzer Jun 7, 2025
5966e5d
feat: general improvements
ReneSchwarzer Jun 10, 2025
7b08372
fix: base header
ReneSchwarzer Jun 11, 2025
4ce98a7
feat: improved the uri
ReneSchwarzer Jun 12, 2025
ca6eed5
feat: introduced typed API responses for better result handling
ReneSchwarzer Jun 20, 2025
c5e095a
add: rest api validator
ReneSchwarzer Jun 22, 2025
ed2ba1d
feat: updated AssetManager
ReneSchwarzer Jun 23, 2025
41531cf
add: support for DebugLocal configuration
ReneSchwarzer Jul 6, 2025
789cac1
feat: removed Markdig dependency and implemented custom markdown
ReneSchwarzer Jul 13, 2025
1246aa9
add: smart editcontrol
ReneSchwarzer Jul 31, 2025
7492a8d
update: dependent package
ReneSchwarzer Aug 27, 2025
2706f03
feat: improved breadcrumb control and minor bugs
ReneSchwarzer Sep 7, 2025
6ca7dc1
feat: general improvements and minor bugs
ReneSchwarzer Sep 7, 2025
397a9a0
feat: general improvements and minor bugs
ReneSchwarzer Sep 10, 2025
c2b6326
feat: add avatar input control, general improvements and minor bugs
ReneSchwarzer Sep 14, 2025
d982940
feat: add RestProgressTask control, general improvements and minor bugs
ReneSchwarzer Sep 15, 2025
20ee76f
feat: add fragment page, general improvements and minor bugs
ReneSchwarzer Sep 17, 2025
58ebab6
- refactor: restructure WebExpress
ReneSchwarzer Sep 20, 2025
d6688e5
refactor: restructure WebExpress
ReneSchwarzer Sep 20, 2025
56de7f4
feat: add responsive control, general improvements and minor bugs
ReneSchwarzer Sep 24, 2025
704a50e
add: GitHub actions workflow for C# build and xUnit tests
ReneSchwarzer Sep 28, 2025
fa16f3f
fix: GitHub actions workflow for C# build and xUnit tests
ReneSchwarzer Sep 28, 2025
f527af3
add: enable manual trigger via workflow_dispatch
ReneSchwarzer Sep 28, 2025
0730534
fix: GitHub actions workflow for C# build and xUnit tests
ReneSchwarzer Sep 28, 2025
2976d9d
feat: general improvements and minor bugs
ReneSchwarzer Sep 29, 2025
72a539d
fix: documentation build
ReneSchwarzer Sep 30, 2025
9ca43d5
fix: general improvements and minor bugs
ReneSchwarzer Sep 30, 2025
43ace7b
fix: general improvements and minor bugs
ReneSchwarzer Sep 30, 2025
938ed24
feat: general improvements and minor bugs
ReneSchwarzer Sep 30, 2025
73dd2b8
feat: improved reverse index and minor bugs
ReneSchwarzer Oct 5, 2025
5583017
feat: general improvements and minor bugs
ReneSchwarzer Oct 7, 2025
4308260
feat: add include manager, general improvements and minor bugs
ReneSchwarzer Oct 12, 2025
e8bb24e
refactor: replace role terminology with policy
ReneSchwarzer Oct 14, 2025
ee1b6a6
fix: include manager improvements
ReneSchwarzer Oct 14, 2025
b3e8778
feat: add rest dropdown control, general improvements and minor bugs
ReneSchwarzer Oct 22, 2025
17d293a
feat: general improvements and minor bugs
ReneSchwarzer Oct 23, 2025
48da9a7
feat: general improvements and minor bugs
ReneSchwarzer Oct 23, 2025
094cdd9
fix: applied improvements from code review
ReneSchwarzer Oct 30, 2025
fc6d3a8
fix: applied improvements from code review
ReneSchwarzer Oct 30, 2025
7a8996b
fix: applied improvements from code review
ReneSchwarzer Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,34 @@ jobs:
- name: Add DocFX to PATH
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH

- name: Create wwwroot directory for WebCore
run: mkdir -p ./src/WebExpress.WebCore/wwwroot

- name: Build WebExpress.WebCore
run: |
dotnet build ./src/WebExpress.WebCore/WebExpress.WebCore.csproj -c Release

- name: Generate documentation
run: |
cd docs
docfx metadata
docfx build

- name: Generate API toc.yaml
run: |
echo "### YamlMime:TableOfContent" > docs/api/toc.yaml
echo "[" >> docs/api/toc.yaml
find docs/_site/api -maxdepth 1 -type f -name '*.html' | sort | while read file; do
name=$(basename "$file" .html)
echo " { \"name\": \"$name\", \"href\": \"$name.html\" }," >> docs/api/toc.yaml
done
sed -i '$ s/},/}/' docs/api/toc.yaml
echo "]" >> docs/api/toc.yaml

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'
path: './docs/_site'

- name: Deploy to GitHub Pages
id: deployment
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: UnitTests

on:
workflow_dispatch:
pull_request:
branches:
- main
- develop

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.x

- name: Restore dependencies
run: dotnet restore

- name: Build project
run: dotnet build --no-restore --configuration Release

- name: Run xUnit tests
run: dotnet test --no-build --configuration Release --logger "trx"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 René Schwarzer
Copyright (c) 2025 René Schwarzer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![WebExpress](https://raw.githubusercontent.com/ReneSchwarzer/WebExpress/main/assets/banner.png)
![WebExpress-Framework](https://raw.githubusercontent.com/webexpress-framework/.github/main/docs/assets/img/banner.png)

# WebExpress
`WebExpress` is a lightweight web server optimized for use in low-performance environments (e.g. Raspberry PI). By providing a powerful plugin system and a comprehensive API, web applications can be easily and quickly integrated into a .net language (e.g. C#). Some advantages of `WebExpress` are:
Expand All @@ -10,34 +10,35 @@

The `WebExpress` family includes the following projects:

- [WebExpress](https://github.com/ReneSchwarzer/WebExpress#readme) - The web server for `WebExpress` applications and the documentation.
- [WebExpress.WebCore](https://github.com/ReneSchwarzer/WebExpress.WebCore#readme) - The core for `WebExpress` applications.
- [WebExpress.WebUI](https://github.com/ReneSchwarzer/WebExpress.WebUI#readme) - Common templates and controls for `WebExpress` applications.
- [WebExpress.WebIndex](https://github.com/ReneSchwarzer/WebExpress.WebIndex#readme) - Reverse index for `WebExpress` applications.
- [WebExpress.WebApp](https://github.com/ReneSchwarzer/WebExpress.WebApp#readme) - Business application template for `WebExpress` applications.
- [WebExpress](https://github.com/webexpress-framework/WebExpress#readme) - The web server for `WebExpress` applications and the documentation.
- [WebExpress.WebCore](https://github.com/webexpress-framework/WebExpress.WebCore#readme) - The core for `WebExpress` applications.
- [WebExpress.WebUI](https://github.com/webexpress-framework/WebExpress.WebUI#readme) - Common templates and controls for `WebExpress` applications.
- [WebExpress.WebIndex](https://github.com/webexpress-framework/WebExpress.WebIndex#readme) - Reverse index for `WebExpress` applications.
- [WebExpress.WebApp](https://github.com/webexpress-framework/WebExpress.WebApp#readme) - Business application template for `WebExpress` applications.

# WebExpress.WebCore
`WebCore` is part of the `WebExpress` family and includes the basic elements of a `WebExpress` application.

# Download
The current binaries are available for download [here](https://github.com/ReneSchwarzer/WebExpress/releases).
The current binaries are available for download [here](https://github.com/webexpress-framework/WebExpress/releases).

# Start
If you're looking to get started with `WebExpress`, we would recommend using the following documentation. It can help you understand the platform.

- [Installation Guide](https://github.com/ReneSchwarzer/WebExpress/blob/main/doc/installation_guide.md)
- [Development Guide](https://github.com/ReneSchwarzer/WebExpress/blob/main/doc/development_guide.md)
- [WebExpress.WebCore API Documentation](https://reneschwarzer.github.io/WebExpress.WebCore/)
- [WebExpress.WebUI API Documentation](https://reneschwarzer.github.io/WebExpress.WebUI/)
- [WebExpress.WebApp API Documentation](https://reneschwarzer.github.io/WebExpress.WebApp/)
- [WebExpress.WebIndex API Documentation](https://reneschwarzer.github.io/WebExpress.WebIndex/)
- [Installation Guide](https://github.com/webexpress-framework/WebExpress/blob/main/doc/installation_guide.md)
- [Development Guide](https://github.com/webexpress-framework/WebExpress/blob/main/doc/development_guide.md)
- [WebExpress.WebCore API Documentation](https://webexpress-framework.github.io/WebExpress.WebCore/)
- [WebExpress.WebUI API Documentation](https://webexpress-framework.github.io/WebExpress.WebUI/)
- [WebExpress.WebApp API Documentation](https://webexpress-framework.github.io/WebExpress.WebApp/)
- [WebExpress.WebIndex API Documentation](https://webexpress-framework.github.io/WebExpress.WebIndex/)

# Learning
The following tutorials illustrate the essential techniques of `WebExpress`. These tutorials are designed to assist you, as a developer, in understanding the various aspects of `WebExpress`. Each tutorial provides a detailed, step-by-step guide that you can work through using an example. If you re interested in beginning the development of `WebExpress` components, we would recommend you to complete some of these tutorials.

- [HelloWorld](https://github.com/ReneSchwarzer/WebExpress.Tutorial.HelloWorld#readme)
- [WebApp](https://github.com/ReneSchwarzer/WebExpress.Tutorial.WebApp#readme)
- [WebIndex](https://github.com/ReneSchwarzer/WebExpress.Tutorial.WebIndex#readme)
- [HelloWorld](https://github.com/webexpress-framework/WebExpress.Tutorial.HelloWorld#readme)
- [WebUI](https://github.com/webexpress-framework/WebExpress.Tutorial.WebUI#readme)
- [WebApp](https://github.com/webexpress-framework/WebExpress.Tutorial.WebApp#readme)
- [WebIndex](https://github.com/webexpress-framework/WebExpress.Tutorial.WebIndex#readme)

# Tags
#WebCore #WebExpress #DotNet #NETCore
2 changes: 1 addition & 1 deletion docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"xref": [
"../.xrefmap.json"
],
"output": "../_site",
"output": "_site",
"template": [
"default",
"modern",
Expand Down
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![WebExpress](https://raw.githubusercontent.com/ReneSchwarzer/WebExpress/main/assets/banner.png)
![WebExpress](https://raw.githubusercontent.com/webexpress-framework/WebExpress/main/assets/banner.png)

# WebExpress
WebExpress is a lightweight web server optimized for use in low-performance environments (e.g. Raspberry PI). By providing
Expand All @@ -12,17 +12,17 @@ language (e.g. C#). Some advantages of WebExpress are:

The `WebExpress` family includes the following projects:

- [WebExpress](https://github.com/ReneSchwarzer/WebExpress#readme) - The web server for `WebExpress` applications and the documentation.
- [WebExpress.WebCore](https://github.com/ReneSchwarzer/WebExpress.WebCore#readme) - The core for `WebExpress` applications.
- [WebExpress.WebUI](https://github.com/ReneSchwarzer/WebExpress.WebUI#readme) - Common templates and controls for `WebExpress` applications.
- [WebExpress.WebIndex](https://github.com/ReneSchwarzer/WebExpress.WebIndex#readme) - Reverse index for `WebExpress` applications.
- [WebExpress.WebApp](https://github.com/ReneSchwarzer/WebExpress.WebApp#readme) - Business application template for `WebExpress` applications.
- [WebExpress](https://github.com/webexpress-framework/WebExpress#readme) - The web server for `WebExpress` applications and the documentation.
- [WebExpress.WebCore](https://github.com/webexpress-framework/WebExpress.WebCore#readme) - The core for `WebExpress` applications.
- [WebExpress.WebUI](https://github.com/webexpress-framework/WebExpress.WebUI#readme) - Common templates and controls for `WebExpress` applications.
- [WebExpress.WebIndex](https://github.com/webexpress-framework/WebExpress.WebIndex#readme) - Reverse index for `WebExpress` applications.
- [WebExpress.WebApp](https://github.com/webexpress-framework/WebExpress.WebApp#readme) - Business application template for `WebExpress` applications.

# WebExpress.WebCore
WebCore is part of the WebExpress family and includes the basic elements of a WebExpress application.

# Download
The current binaries are available for download [here](https://github.com/ReneSchwarzer/WebExpress/releases).
The current binaries are available for download [here](https://github.com/webexpress-framework/WebExpress/releases).

# Tags
#Raspberry #Raspbian #IoT #NETCore #WebExpress
2 changes: 1 addition & 1 deletion docs/toc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: Home
href: index.md
- name: API Documentation
href: api/WebExpress.WebCore.html
href: api/
- name: User Guide
href: user-guide.md
- name: Tutorials
Expand Down
9 changes: 5 additions & 4 deletions docs/tutorials.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![WebExpress](https://raw.githubusercontent.com/ReneSchwarzer/WebExpress/main/assets/banner.png)
![WebExpress](https://raw.githubusercontent.com/webexpress-framework/WebExpress/main/assets/banner.png)

# Tutorials
Welcome to the `WebExpress` Tutorials! Here, you'll find step-by-step guides and helpful resources to get the most out
Expand All @@ -7,9 +7,10 @@ our tutorials offer something for everyone.

# Getting Started
Begin with our basic tutorial:
- [HelloWorld](https://github.com/ReneSchwarzer/WebExpress.Tutorial.HelloWorld#readme)
- [WebApp](https://github.com/ReneSchwarzer/WebExpress.Tutorial.WebApp#readme)
- [WebIndex](https://github.com/ReneSchwarzer/WebExpress.Tutorial.WebIndex#readme)
- [HelloWorld](https://github.com/webexpress-framework/WebExpress.Tutorial.HelloWorld#readme)
- [WebUI](https://github.com/webexpress-framework/WebExpress.Tutorial.WebUI#readme)
- [WebApp](https://github.com/webexpress-framework/WebExpress.Tutorial.WebApp#readme)
- [WebIndex](https://github.com/webexpress-framework/WebExpress.Tutorial.WebIndex#readme)

This tutorial will guide you through the initial steps of creating and running your first `WebExpress` application.

Expand Down
14 changes: 7 additions & 7 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![WebExpress](https://raw.githubusercontent.com/ReneSchwarzer/WebExpress/main/assets/banner.png)
![WebExpress](https://raw.githubusercontent.com/webexpress-framework/WebExpress/main/assets/banner.png)

# User guide
Welcome to the `WebExpress.WebCore` User Guide. This guide will help you get started with `WebExpress.WebCore` and make the most out of its
Expand All @@ -7,11 +7,11 @@ features. Follow the links below to begin your journey.
# Getting started
To get started with `WebExpress.WebCore`, use the following guides:

- [Installation Guide](https://github.com/ReneSchwarzer/WebExpress/blob/main/doc/installation_guide.md)
- [Development Guide](https://github.com/ReneSchwarzer/WebExpress/blob/main/doc/development_guide.md)
- [WebExpress.WebCore API Documentation](https://reneschwarzer.github.io/WebExpress.WebCore/)
- [WebExpress.WebUI API Documentation](https://reneschwarzer.github.io/WebExpress.WebUI/)
- [WebExpress.WebApp API Documentation](https://reneschwarzer.github.io/WebExpress.WebApp/)
- [WebExpress.WebIndex API Documentation](https://reneschwarzer.github.io/WebExpress.WebIndex/)
- [Installation Guide](https://github.com/webexpress-framework/WebExpress/blob/main/doc/installation_guide.md)
- [Development Guide](https://github.com/webexpress-framework/WebExpress/blob/main/doc/development_guide.md)
- [WebExpress.WebCore API Documentation](https://webexpress-framework.github.io/WebExpress.WebCore/)
- [WebExpress.WebUI API Documentation](https://webexpress-framework.github.io/WebExpress.WebUI/)
- [WebExpress.WebApp API Documentation](https://webexpress-framework.github.io/WebExpress.WebApp/)
- [WebExpress.WebIndex API Documentation](https://webexpress-framework.github.io/WebExpress.WebIndex/)

We hope you enjoy using `WebExpress.WebCore` and find it valuable for your projects. Happy coding!
14 changes: 14 additions & 0 deletions src/WebExpress.WebCore.Test/Assets/css/my-css.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* This CSS file styles the "Hello World" text */

/* Style for the body */
body {
background-color: #f0f0f0; /* Light grey background for the entire page */
font-family: Arial, sans-serif; /* Set font to Arial */
}

/* Style for the heading */
h1 {
color: #333; /* Dark grey color for the text */
text-align: center; /* Center the text */
margin-top: 20%; /* Add space at the top */
}
4 changes: 2 additions & 2 deletions src/WebExpress.WebCore.Test/Data/MockIdentityFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public static IIdentityGroup GetIdentityGroup(string name)
private static IEnumerable<MockIdentityGroup> CreateTestGroups()
{
var group1 = new MockIdentityGroup(id: Guid.NewGuid(), name: "Admins");
group1.Assign(["webexpress.webcore.test.testidentityrolea", "webexpress.webcore.test.testidentityroleb"]);
group1.Assign(["webexpress.webcore.test.testidentitypolicya", "webexpress.webcore.test.testidentitypolicyb"]);

yield return group1;

var group2 = new MockIdentityGroup(id: Guid.NewGuid(), name: "Users");
group2.Assign(["webexpress.webcore.test.testidentityroleb"]);
group2.Assign(["webexpress.webcore.test.testidentitypolicyb"]);

yield return group2;

Expand Down
2 changes: 1 addition & 1 deletion src/WebExpress.WebCore.Test/Data/MockIdentityGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class MockIdentityGroup : IIdentityGroup
/// <summary>
/// Returns the roles associated with the group.
/// </summary>
public IEnumerable<string> Roles => _roles;
public IEnumerable<string> Policies => _roles;

/// <summary>
/// Initializes a new instance of the class with the specified id and name.
Expand Down
89 changes: 89 additions & 0 deletions src/WebExpress.WebCore.Test/Fixture/AssertExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
using System.Text.RegularExpressions;
using WebExpress.WebCore.WebHtml;

namespace WebExpress.WebCore.Test.Fixture
{
/// <summary>
/// Provides extension methods for assertions.
/// </summary>
public static partial class AssertExtensions
{
/// <summary>
/// Gets a regular expression that matches whitespace between '>' and '<' characters.
/// </summary>
/// <returns>A <see cref="Regex"/> object that matches whitespace between '>' and '<' characters.</returns>
[GeneratedRegex(@">\s+<")]
private static partial Regex WhitespaceRegex();

/// <summary>
/// Asserts that the actual string is equal to the expected string, allowing for placeholders.
/// </summary>
/// <param name="assert">The Assert instance (not used, but required for extension method).</param>
/// <param name="expected">The expected string with placeholders.</param>
/// <param name="actual">The actual string to compare.</param>
public static void EqualWithPlaceholders(string expected, string actual)
{
var str = RemoveLineBreaks(actual?.ToString());
Assert.True(AreEqualWithPlaceholders(expected, str), $"Expected: {expected}{Environment.NewLine}Actual: {str}");
}

/// <summary>
/// Asserts that the actual node is equal to the expected string, allowing for placeholders.
/// </summary>
/// <param name="assert">The Assert instance (not used, but required for extension method).</param>
/// <param name="expected">The expected string with placeholders.</param>
/// <param name="actual">The actual string to compare.</param>
public static void EqualWithPlaceholders(string expected, IHtmlNode actual)
{
var str = RemoveLineBreaks(actual?.ToString());
Assert.True(AreEqualWithPlaceholders(expected, str), $"Expected: {expected}{Environment.NewLine}Actual: {str}");
}

/// <summary>
/// Compares two strings, allowing for placeholders in the expected string.
/// </summary>
/// <param name="expected">The expected string, which may contain '*' as a wildcard character.</param>
/// <param name="actual">The actual string to compare against the expected string.</param>
/// <returns>True if the actual string matches the expected string with placeholders; otherwise, false.</returns>
private static bool AreEqualWithPlaceholders(string expected, string actual)
{
if (expected == null && actual == null)
{
return true;
}
else if (expected != null && actual == null)
{
return false;
}
else if (expected == null && actual != null)
{
return false;
}

var pattern = "^" + Regex.Escape(expected).Replace(@"\*", ".*") + "$";

return Regex.IsMatch(actual, pattern);
}

/// <summary>
/// Removes all line breaks from the input string.
/// </summary>
/// <param name="input">The input string from which to remove line breaks.</param>
/// <returns>A string with all line breaks removed.</returns>
public static string RemoveLineBreaks(string input)
{
if (string.IsNullOrEmpty(input))
{
return input;
}

// remove all line breaks
string result = input.Replace("\r\n", "").Replace("\r", "").Replace("\n", "");

// remove whitespace of any length between '>' and '<'
result = WhitespaceRegex().Replace(result, "><");

return result;
}
}
}
Loading
Loading