Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .ai/other/nugets.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
nuget_categories:
General:
- name: MediatR
- name: TimeWarp.Mediator
for: CQRS and mediator pattern
- name: Riok.Mapperly
for: object-object mapping
Expand Down
5 changes: 2 additions & 3 deletions .ai/other/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ references:
resources:
- Official Documentation: https://playwright.dev/dotnet/docs/intro

- name: MediatR NuGet Library
- name: TimeWarp.Mediator NuGet Library
relationship: Used extensively by TimeWarp.State
resources:
- Official Documentation: https://github.com/jbogard/MediatR/wiki
- Authors Blog: https://www.jimmybogard.com/
- Official Repository: https://github.com/TimeWarpEngineering/timewarp-mediator

- name: AnyClone NuGet Library
relationship: Used as the default cloning ability if ICloneable has not been implemented.
Expand Down
6 changes: 3 additions & 3 deletions Claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

**TimeWarp.State** is a state management library for Blazor applications implementing the Flux pattern using MediatR pipeline. It handles both client-side (WebAssembly) and server-side Blazor with async state management.
**TimeWarp.State** is a state management library for Blazor applications implementing the Flux pattern using Mediator pipeline. It handles both client-side (WebAssembly) and server-side Blazor with async state management.

## Development Commands

Expand Down Expand Up @@ -74,7 +74,7 @@ dotnet build --project <ProjectPath> --configuration Release

### Key Patterns
- **CQRS/Flux**: Unidirectional data flow with Actions/ActionHandlers
- **MediatR Pipeline**: Middleware-driven architecture
- **TimeWarp.Mediator Pipeline**: Middleware-driven architecture
- **Async-First**: All operations are async by design
- **TypeScript Integration**: Strong typing for JavaScript interop

Expand Down Expand Up @@ -163,7 +163,7 @@ Follow structured task workflow using Kanban approach:
## Essential Dependencies

- **Blazor**: UI framework (Server/WebAssembly)
- **MediatR**: CQRS/mediator pattern implementation
- **TimeWarp.Mediator**: CQRS/mediator pattern implementation
- **Microsoft.JSInterop**: JavaScript interop for browser features
- **Fixie**: Testing framework
- **NetArchTest**: Architecture testing
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<TimeWarpStateVersion>11.0.3</TimeWarpStateVersion>
<TimeWarpStateVersion>12.0.0-beta.1</TimeWarpStateVersion>
<Authors>Steven T. Cramer</Authors>
<Product>TimeWarp State</Product>
<PackageVersion>$(TimeWarpStateVersion)</PackageVersion>
<PackageProjectUrl>https://timewarpengineering.github.io/timewarp-state/</PackageProjectUrl>
<PackageTags>TimeWarp.State; TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Redux; Flux</PackageTags>
<PackageTags>TimeWarp.State; TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; TimeWarp.Mediator; Pipeline; Redux; Flux</PackageTags>
<PackageIcon>Logo.png</PackageIcon>
<RepositoryUrl>https://github.com/TimeWarpEngineering/timewarp-state.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageVersion Include="Fixie.TestAdapter" Version="3.4.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageVersion Include="MediatR" Version="12.4.1" />
<PackageVersion Include="TimeWarp.Mediator" Version="13.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.17" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.17" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.17" />
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Images/TimeWarpStateOneWayFlow.drawio
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<mxCell id="pQi_TNxkMac2TIVI0rjQ-33" value="" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="110" y="280" width="20" height="440" as="geometry" />
</mxCell>
<mxCell id="pQi_TNxkMac2TIVI0rjQ-36" value="MediatR Pipeline" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxCell id="pQi_TNxkMac2TIVI0rjQ-36" value="Mediator Pipeline" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry y="485" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="pQi_TNxkMac2TIVI0rjQ-42" value="SubscriptionNotification" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Images/TimeWarpStateOneWayFlow.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ or move the GetState functionality into your component

### Pipeline

**TimeWarp.State** utilizes the MediatR pipeline which allows for middleware integration
**TimeWarp.State** utilizes the TimeWarp.Mediator pipeline which allows for middleware integration
by registering an interface with the dependency injection container [^4].
TimeWarp.State provides the extension method [^5] , `AddTimeWarpState`, which registers behaviors on the pipeline.

Expand Down Expand Up @@ -94,7 +94,7 @@ if the developer chose they could mark the Requests as such. For example **IActi

#### Footnotes:

[^1]: https://github.com/jbogard/MediatR
[^1]: https://github.com/TimeWarpEngineering/timewarp-mediator

[^2]: https://redux.js.org/

Expand Down
10 changes: 2 additions & 8 deletions Documentation/Partials/Acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ title: Acknowledgements

## Acknowledgements

Jimmy Bogard ([MediatR](https://github.com/jbogard/MediatR)).
Jimmy is an amazing developer and knowledge sharer.
Through his course at [11x Engieering](https://11xengineering.com/),
his many blog posts on Los Techies and now [JimmyBogard.com](https://jimmybogard.com/),
I have learned a great amount.

Peter Morris and I have been friends for many years.
He is an amazing developer and a person who has taught me a great deal.
Not surprisingly, Pete and I think a lot alike.
Not surprisingly, Pete and I think a lot a like.
We both, independently, started working on our own State Management
components. Although I started first. :P
Pete's component attempts to solve most of the same problems.
TimeWarp.State draws on the strengths of a proven async pipeline in MediatR, where as Fluxor
TimeWarp.State draws on the strengths of a proven async pipeline in Mediator, where as Fluxor
implements its own middleware.
If TimeWarp.State does not meet your needs be sure to checkout Fluxor.
4 changes: 2 additions & 2 deletions Documentation/Partials/Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ title: Summary

**TimeWarp.State** (previously known as Blazor-State [![nuget](https://img.shields.io/nuget/dt/Blazor-State?logo=nuget)](https://www.nuget.org/packages/Blazor-State/) )
is a fully asynchronous state management library for Blazor applications,
leveraging the MediatR pipeline to implement the Flux pattern.
leveraging the Mediator pipeline to implement the Flux pattern.
It handles both Reducers and Effects consistently using async Handlers,
simplifying the management of asynchronous operations throughout your app.

By utilizing the MediatR pipeline, TimeWarp.State enables a flexible,
By utilizing the Mediator pipeline, TimeWarp.State enables a flexible,
middleware-driven architecture for managing state,
similar to the request-processing pipeline in ASP.NET.
This approach allows developers to inject custom behaviors, such as logging,
Expand Down
6 changes: 3 additions & 3 deletions Documentation/Partials/Terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ title: Terminology

## Terminology

The pattern used by TimeWarp.State and MediatR has been around for many years and goes by different names.
The pattern used by TimeWarp.State and TimeWarp.Mediator have been around for many years and goes by different names.
We list various related terms here and **Bold** indicates the term used in TimeWarp.State.

### Signals/**Actions**/**Requests**/Commands/

In Redux they call them "Action".
In UML they are "Signal".
In Command Pattern they are "Command"
In MediatR they are `Request`
In Mediator they are `Request`
In TimeWarp.State we call them `Actions` when they are handled on the Client and `Requests` if they handled on the Server.

### Reducer/**Handler**/Executor
Expand All @@ -22,7 +22,7 @@ This is the code that processes the `Request/Action` and returns the `Response`.

In Redux they call them "Reducer".
In Command Pattern we call them "Executor".
In MediatR they are `Handler`.
In Mediator they are `Handler`.
In TimeWarp.State we call them `Handler`.

### Feature
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

# TimeWarp.State

**TimeWarp.State** (previously known as Blazor-State) is a fully asynchronous state management library for Blazor applications, leveraging the MediatR pipeline to implement the Flux pattern. It handles both Reducers and Effects consistently using async Handlers, simplifying the management of asynchronous operations throughout your app.
**TimeWarp.State** (previously known as Blazor-State) is a fully asynchronous state management library for Blazor applications, leveraging the res pipeline to implement the Flux pattern. It handles both Reducers and Effects consistently using async Handlers, simplifying the management of asynchronous operations throughout your app.

By utilizing the MediatR pipeline, TimeWarp.State enables a flexible, middleware-driven architecture for managing state, similar to the request-processing pipeline in ASP.NET. This approach allows developers to inject custom behaviors, such as logging, validation, and caching, directly into the state management flow.
By utilizing the TimeWarp.Mediator pipeline, TimeWarp.State enables a flexible, middleware-driven architecture for managing state, similar to the request-processing pipeline in ASP.NET. This approach allows developers to inject custom behaviors, such as logging, validation, and caching, directly into the state management flow.

In addition to the core library, we offer **[TimeWarp.State.Plus](/Source/TimeWarp.State.Plus)**, which extends the functionality with enhanced middleware, components, and tools to further streamline state management in complex Blazor applications.

Expand Down
2 changes: 1 addition & 1 deletion RunTestApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ try {
# The analyzer is not directly referenced by the test app, so we need to build it first
dotnet build ./Source/TimeWarp.State.Analyzer/TimeWarp.State.Analyzer.csproj
dotnet build ./Source/TimeWarp.State.SourceGenerator/TimeWarp.State.SourceGenerator.csproj
dotnet watch --project ./Tests/Test.App/Test.App.Server/Test.App.Server.csproj
dotnet run --project ./Tests/Test.App/Test.App.Server/Test.App.Server.csproj --launch-profile http
}
finally {
Pop-Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
<PackageReference Include="TimeWarp.State.Plus" Version="11.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
global using TimeWarp.State;
global using TimeWarp.Features.ActionTracking;
global using Sample02Wasm;
global using MediatR;
2 changes: 2 additions & 0 deletions Samples/02-ActionTracking/Wasm/Sample02Wasm/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Sample02Wasm;

using TimeWarp.Mediator;

public class Program
{
public static async Task Main(string[] args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State.Plus" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
<PackageReference Include="TimeWarp.State.Plus" Version="12.0.0-beta.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Samples/03-Routing/Wasm/Sample03Wasm/Sample03Wasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="TimeWarp.State" Version="11.0.0" />
<PackageReference Include="TimeWarp.State" Version="12.0.0-beta.1" />
<PackageReference Include="TimeWarp.State.Plus" Version="11.0.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Source/TimeWarp.State.Plus/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
global using TimeWarp.State;
global using TimeWarp.Features.Persistence;
global using JetBrains.Annotations;
global using MediatR;
global using MediatR.Pipeline;
global using TimeWarp.Mediator;
global using TimeWarp.Mediator.Pipeline;
global using Microsoft.AspNetCore.Components;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
Expand Down
2 changes: 1 addition & 1 deletion Source/TimeWarp.State.Plus/TimeWarp.State.Plus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Title>TimeWarp.State.Plus</Title>
<Description>TimeWarp.State.Plus extends TimeWarp.State with additional, features, middleware and components to simplify and enhance your Blazor applications.</Description>
<PackageId>TimeWarp.State.Plus</PackageId>
<PackageTags>TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Middleware; Redux; Flux; Features; Plus</PackageTags>
<PackageTags>TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; TimeWarp.Mediator; Mediator; Pipeline; Middleware; Redux; Flux; Features; Plus</PackageTags>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
Expand Down
Loading
Loading