Starfish is a lightweight powerful distributed configuration server for .NET application.
Starfish is a lightweight but powerful distributed .NET application configuration center.
Completed/Completed⌛ In progress/Planned
Paypal
https://www.paypal.me/realzharong
If you like my work, you can support me by donation. / If you like my work, you can support me by donation.
Any feedback is welcome, you can create a issue, or contact us by email, thank you.
Wonderful to receive any feedback from you, you can create an issue, or contact us by email, thank you.
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
This project adopts the AGPL-3.0 protocol, you can view LICENSE for more details.
Starfish
├──Source
├ ├──Starfish.Client
├ ├──~~Starfish.Agent~~
├ ├──Starfish.Common
├ ├──Starfish.Service
├ ├──Starfish.Transit
├ ├──Starfish.Webapi
├ ├──Starfish.Webapp
├──Tests
├ ├──Starfish.Client.Tests
├ ├──Starfish.Service.Tests
graph TD
Starfish.Webapi --> Starfish.Service
Starfish.Service --> Starfish.Transit
Starfish.Service --> Starfish.Common
Starfish.Client --> Starfish.Common
Starfish.Webapp --> Starfish.Client
Starfish.Webapp --> Starfish.Common
Starfish.Webapp --> Starfish.Transit
IDE/Development Environment
Dependencies/Dependencies
Deploy & Run/Deploy & Run
Runtime/runtime environment
Dependencies/Dependencies
Deploy & Run/Deploy & Run
{
"ConnectionStrings" : {
"Default" : " "
},
"DatabaseType" : " " ,
"JwtBearerOptions" : {
"Scheme" : " Bearer " ,
"RequireHttpsMetadata" : false ,
"ApiName" : " starfish_api " ,
"AuthorityUrl" : " http://localhost:5229 " ,
"TokenIssuer" : " localhost " ,
"TokenKey" : " NEROSOFT-STARFISH-WEBAPI "
},
"CorsOrigins" : [
" https://localhost "
],
"ServiceBus" : {
"Provider" : " inmemory " ,
"InMemory" : {
"MultipleSubscriberInstance" : false
}
},
"InitializeUser" : {
"UserName" : " admin " ,
"Password" : " Starfish.8888 "
},
"ReservedUsernames" : [
" starfish " ,
" admin " ,
" administrator " ,
" root "
],
"FeatureManagement" : {
"UserRegistration" : true
},
"Logging" : {
"LogLevel" : {
"Default" : " Information " ,
"Microsoft.AspNetCore" : " Warning "
}
},
"AllowedHosts" : " * "
}| Key | Description | Type | Options |
|---|---|---|---|
| ConnectionStrings | Database connection string | Object | N/A |
| - Default | Default database connection string | String | N/A |
| DatabaseType | Database type | String | mysql/sqlite/sqlserver/mongo/postgresql |
| JwtBearerOptions | JWT Bearer options | Object | N/A |
| - Scheme | Scheme | String | Bearer |
| - RequireHttpsMetadata | Require HTTPS metadata | Boolean | true/false |
| - ApiName | API name | String | starfish_api |
| - AuthorityUrl | Authority URL | String | http://localhost:5229 |
| - TokenIssuer | Token issuer | String | localhost |
| - TokenKey | String | N/A | |
| CorsOrigins | CORS origins | String array | N/A |
| ServiceBus | Service bus options | Object | N/A |
| - Provider | Message transport provider | String | income/rabbitmq |
| - InMemory | InMemory options | Object | N/A |
| - - MultipleSubscriberInstance | N/A | Boolean | true/false |
| InitializeUser | Options to initialize user | Object | N/A |
| - UserName | Username | String | N/A |
| - Password | Password | String | N/A |
| ReservedUsernames | Reserved usernames | String array | N/A |
| FeatureManagement | Feature management | Object | N/A |
| - UserRegistration | A value indicates whether user registration is enabled or not | Boolean | true/false |
dotnet add package Starfish.Clientor
Install-Package Starfish.Clientor
< PackageReference Include = " Starfish.Client " Version = " 1.0.0 " /> // .NET 5
public static IHostBuilder CreateHostBuilder ( string [ ] args ) =>
Host . CreateDefaultBuilder ( args )
. ConfigureAppConfiguration ( ( hostingContext , config ) =>
{
config . AddStarfish ( ConfigurationClientOptions . Load ( config ) ) ;
} )
. ConfigureWebHostDefaults ( webBuilder =>
{
webBuilder . UseStartup < Startup > ( ) ;
} ) ; // .NET 6 and above
var builder = WebApplication . CreateBuilder ( args ) ;
builder . Configuration . AddStarfish ( ConfigurationClientOptions . Load ( builder . Configuration ) ) ;
// ...
var app = builder . Build ( ) ;
// ...
app . Run ( ) ;{
"Starfish" : {
"Host" : " http://localhost:5000 " ,
"Id" : " 5lNc9zQGdG7 " ,
"Secret" : " 123456 "
}
}See the Swagger UI at http://localhost:5229/swagger after running the server.
Thanks to JetBrains for supporting the project through All Products Packs within their Free Open Source License program.
Thanks to JetBrains for supporting the project through all product packages in its free open source licensing program.