Exploring a new web architecture with React, Redux, Orleans and Dotnet Core
This project is an eploration of next-generation architecture based on Dotnet Core and Javascript. When I started this, it was all very bleeding edge, but I have maintained this repositories as these products matured, and now everything is released and ready for production!
Here is the introductory blogpost. There are follow-up posts on my implementation of Let's Encrypt Certificates, the React, Redux, and Typescript-based frontend, and the Orleans Actor-based backend. I also added Dockerfiles and deployed this solution to a Kubernetes cluster. The config files for that (minus secrets) are in the deploy folder.
This project demonstrates many technologies in context:
%AppData%\Roaming\Microsoft\UserSecrets\rrod-secrets\secrets.json
, on OSX, it's in ~/.microsoft/usersecrets/rrod-secrets/secrets.json
).
A storage account first has to be created in Microsoft Azure. On Windows, you can alternatively install the Azure Storage Emulator and put "UseDevelopmentStorage=true" for the storage connection strings. The SMTP connection string is not really necessary.
It is possible to configure Orleans with other types of clustering that do not use Azure Storage (such as native Kubernetes Clustering) with a few code changes. The ReduxGrain base class (used for storing users and counter values) is hardcoded against Azure storage and really needs the ReduxConnectionString.
The minimum secrets file contains:{
"ConnectionStrings": {
"DataConnectionString": "DefaultEndpointsProtocol=https;AccountName=[AZURE STORAGE ACCOUNT];AccountKey=[STORAGE KEY];EndpointSuffix=core.windows.net",
"ReduxConnectionString": "DefaultEndpointsProtocol=https;AccountName=[AZURE STORAGE ACCOUNT];AccountKey=[STORAGE KEY];EndpointSuffix=core.windows.net",
"SmtpConnectionString": "Host=[SMTP HOST];UserName=[SMTP USERNAME];Password=[SMTP PASSWORD]"
},
"AcmeSettings": {
"EmailAddress": "[YOUR EMAIL]",
"PfxPassword": "[A RANDOM PASSWORD]"
}
}
dotnet run
npm install
(or yarn
), then dotnet run
Using VS Code or Visual Studio you can also do this from inside the IDE.
This code should be considered experimental. It works, however the project may have rough edges and has not been thoroughly tested. I welcome feedback!
-- Maarten