{"id":25869833,"url":"https://github.com/nerosoftdev/starfish","last_synced_at":"2025-03-02T05:26:56.162Z","repository":{"id":206388800,"uuid":"715662046","full_name":"NerosoftDev/Starfish","owner":"NerosoftDev","description":"A lightweight powerful distributed configuration server for .NET application.","archived":false,"fork":false,"pushed_at":"2024-09-14T00:34:57.000Z","size":1657,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T21:33:57.056Z","etag":null,"topics":["appsettings","asp-net","asp-net-core","aspnet-core","configuration","configuration-center","configuration-management","configuration-server","configuration-service","net","netcore"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NerosoftDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T15:29:29.000Z","updated_at":"2024-06-02T17:09:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"4877699d-8c67-45ac-ae0f-b98e51edeaf1","html_url":"https://github.com/NerosoftDev/Starfish","commit_stats":null,"previous_names":["nerosoftdev/starfish"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerosoftDev%2FStarfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerosoftDev%2FStarfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerosoftDev%2FStarfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerosoftDev%2FStarfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NerosoftDev","download_url":"https://codeload.github.com/NerosoftDev/Starfish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241464242,"owners_count":19967198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appsettings","asp-net","asp-net-core","aspnet-core","configuration","configuration-center","configuration-management","configuration-server","configuration-service","net","netcore"],"created_at":"2025-03-02T05:26:55.664Z","updated_at":"2025-03-02T05:26:56.147Z","avatar_url":"https://github.com/NerosoftDev.png","language":"C#","funding_links":["https://www.paypal.me/realzhaorong"],"categories":[],"sub_categories":[],"readme":"# Overview/概览 ⚡\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/NerosoftDev/Starfish/dotnet.yml)](https://github.com/NerosoftDev/Starfish/actions)\n[![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)\n[![GitHub release](https://img.shields.io/github/release/NerosoftDev/Starfish.svg)](https://github.com/NerosoftDev/Starfish/releases)\n[![GitHub stars](https://img.shields.io/github/stars/NerosoftDev/Starfish.svg)](https://github.com/NerosoftDev/Starfish/stargazers)\n\nStarfish is a lightweight powerful distributed configuration server for .NET application.\n\nStarfish是一个轻量但功能强大的分布式 .NET 应用程序配置中心。\n\n## ⌨️ Features/功能\n\n\u003e 💚 Completed/已完成 ⌛ In progress/进行中 🕝 Planned/计划中\n\n- [ ] ⌛ Support multiple data sources/支持多种数据源\n    - [x] 💚 MySQL\n    - [x] 💚 SqlServer\n    - [x] 💚 PostgreSQL\n    - [ ] 🕝 MongoDB\n    - [x] 💚 Sqlite\n- [x] 💚 Support multiple platforms/支持多种平台\n    - [x] 💚 Web API/Web Application/gRPC Service in .NET6/7/8\n    - [x] 💚 .NET MAUI\n    - [x] 💚 WPF application\n- [ ] 🕝 Support multiple node deployment/支持多节点部署\n- [x] 💚 Support multiple environments/支持多环境\n- [ ] ⌛ Deploy with docker/支持Docker部署\n- [x] 💚 Support client cache/支持客户端缓存\n- [ ] ⌛ Multiple protocols support/支持多种协议\n    - [x] 💚 HTTP\n    - [ ] 🕝 gRPC\n    - [x] 💚 WebSocket\n- [x] 💚 Sync configuration to Redis server. / 同步配置到Redis服务器。\n- [ ] 🕝 Rollback to history version/回滚到历史版本\n- [ ] 🕝 Role-based access control/基于角色的访问控制\n- [x] 💚 Support multiple languages admin panel/支持多语言管理面板\n    - [x] 💚 en/英语\n    - [x] 💚 zh-Hans/简体中文\n    - [x] 💚 zh-Hant/繁体中文\n    \n## 💰 Donate/捐助 \n\u003cimg alt=\"\" title=\"donate\" width=\"512\" src=\"https://qiniu-cdn.zhaorong.pro/images/donate.png\" /\u003e \n\n**Paypal**\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/realzhaorong)\n\n[https://www.paypal.me/realzhaorong](https://www.paypal.me/realzhaorong)\n\n---\n\n\u003e If you like my work, you can support me by donation. / 如果您喜欢我的工作，可以通过捐赠来支持我。\n\n## 📨 Contact and Suggestions/联系与建议\n\nAny feedback is welcome, you can create a issue, or contact us by email, thank you.\n\n非常乐意收到您的任何反馈，您可以创建一个 issue，或通过邮件联系我们，谢谢。\n\n\u003e [zhaorong@outlook.com](mailto:zhaorong@outlook.com)\n\n## 🔑 License/许可证\n\nThis project is licensed under the AGPL-3.0 License - see the [LICENSE](LICENSE) file for details.\n\n本项目采用 AGPL-3.0 协议，可查看 [LICENSE](LICENSE) 了解更详细内容。\n\n\n# Getting Started/快速开始 ⚡\n\n## Solution structure/解决方案结构\n\n```\nStarfish\n├──Source\n├    ├──Starfish.Client\n├    ├──~~Starfish.Agent~~\n├    ├──Starfish.Common\n├    ├──Starfish.Service\n├    ├──Starfish.Transit\n├    ├──Starfish.Webapi\n├    ├──Starfish.Webapp\n├──Tests\n├    ├──Starfish.Client.Tests\n├    ├──Starfish.Service.Tests\n```\n\n## Depdenencies Structure/依赖关系结构\n\n```mermaid\ngraph TD\n    Starfish.Webapi --\u003e Starfish.Service\n    Starfish.Service --\u003e Starfish.Transit\n    Starfish.Service --\u003e Starfish.Common\n    \n    Starfish.Client --\u003e Starfish.Common\n    \n    Starfish.Webapp --\u003e Starfish.Client\n    Starfish.Webapp --\u003e Starfish.Common\n    Starfish.Webapp --\u003e Starfish.Transit\n```\n\n## Requirements/环境要求\n\n### Development/开发环境\n\nIDE/开发环境\n- Windows/Linux/MacOS\n- Visual Studio/Visual Studio Code/Rider. Visual Studio for Mac is retired, so it's not recommended./Visual Studio for Mac 已经被微软弃用，所以不推荐使用。\n- .NET 8 SDK.\n\nDependencies/依赖服务\n- Redis 6 and above. It's required for distributed cache and distributed lock. / 如果您需要使用分布式缓存和分布式锁，那么Redis是必须的。\n- MySQL/SQL Server/PostgreSQL/MongoDB, latest version recommended. The database service is used to store configuration data. Choose one that you are about to use for production. / 数据库服务用于存储配置数据。请选择您将要在生产环境中使用的数据库。\n- RabbitMQ\n\nDeploy \u0026 Run/部署与运行\n- Docker \u0026 Docker Compose\n\n### Production/生产环境\n\nRuntime/运行环境\n- Windows/Linux, CentOS/Ubuntu recommended.\n- .NET 8 Runtime. It's not needed if running in container./如果您在容器中运行，那么您不需要安装.NET 8 Runtime。\n\nDependencies/依赖服务\n- Redis 6 and above. It's required for distributed cache and distributed lock. / 如果您需要使用分布式缓存和分布式锁，那么Redis是必须的。\n- MySQL/SQL Server/PostgreSQL/MongoDB, latest version recommended. The database service is used to store configuration data. Choose one that you are about to use for production. / 数据库服务用于存储配置数据。请选择您将要在生产环境中使用的数据库。\n- RabbitMQ\n\nDeploy \u0026 Run/部署与运行\n- Docker \u0026 Docker Compose. As you can see, we recommend you to run Starfish in container. / 如您所见，我们建议您在容器中运行Starfish。\n\n## Server/服务端\n\n### Deploy/部署\n\n```bash\n```\n\n### Configuration/配置\n\n```json\n{\n    \"ConnectionStrings\": {\n        \"Default\": \"\"\n    },\n    \"DatabaseType\": \"\",\n    \"JwtBearerOptions\": {\n        \"Scheme\": \"Bearer\",\n        \"RequireHttpsMetadata\": false,\n        \"ApiName\": \"starfish_api\",\n        \"AuthorityUrl\": \"http://localhost:5229\",\n        \"TokenIssuer\": \"localhost\",\n        \"TokenKey\": \"NEROSOFT-STARFISH-WEBAPI\"\n    },\n    \"CorsOrigins\": [\n        \"https://localhost\"\n    ],\n    \"ServiceBus\": {\n        \"Provider\": \"inmemory\",\n        \"InMemory\": {\n            \"MultipleSubscriberInstance\": false\n        }\n    },\n    \"InitializeUser\": {\n        \"UserName\": \"admin\",\n        \"Password\": \"Starfish.8888\"\n    },\n    \"ReservedUsernames\": [\n        \"starfish\",\n        \"admin\",\n        \"administrator\",\n        \"root\"\n    ],\n    \"FeatureManagement\": {\n        \"UserRegistration\": true\n    },\n    \"Logging\": {\n        \"LogLevel\": {\n            \"Default\": \"Information\",\n            \"Microsoft.AspNetCore\": \"Warning\"\n        }\n    },\n    \"AllowedHosts\": \"*\"\n}\n```\n\n|Key|Description|Type|Options|\n|---|---|---|---|\n|ConnectionStrings|Database connection string|Object|N/A|\n| - Default|Default database connection string|String|N/A|\n|DatabaseType|Database type|String|mysql/sqlite/sqlserver/mongo/postgresql|\n|JwtBearerOptions|JWT Bearer options|Object|N/A|\n| - Scheme|Scheme|String|Bearer|\n| - RequireHttpsMetadata|Require HTTPS metadata|Boolean|true/false|\n| - ApiName|API name|String|starfish_api|\n| - AuthorityUrl|Authority URL|String|http://localhost:5229|\n| - TokenIssuer|Token issuer|String|localhost|\n| - TokenKey||String|N/A|\n|CorsOrigins|CORS origins|String array|N/A|\n|ServiceBus|Service bus options|Object|N/A|\n| - Provider|Message transport provider|String|inmemory/rabbitmq|\n| - InMemory|InMemory options|Object|N/A|\n| - - MultipleSubscriberInstance|N/A|Boolean|true/false|\n|InitializeUser|Options to initialize user|Object|N/A|\n| - UserName|Username|String|N/A|\n| - Password|Password|String|N/A|\n|ReservedUsernames|Reserved usernames|String array|N/A|\n|FeatureManagement|Feature management|Object|N/A|\n| - UserRegistration|A value indicate whether user registration is enabled or not|Boolean|true/false|\n\n## Client/客户端\n\n### Install/安装\n\n```bash\ndotnet add package Starfish.Client\n```\n\nor\n\n```powershell\nInstall-Package Starfish.Client\n```\n\nor\n\n```xml\n\u003cPackageReference Include=\"Starfish.Client\" Version=\"1.0.0\" /\u003e\n```\n\n### Configuration/配置\n\n1. Add Starfish as a configuration source in Program.cs/在 Program.cs 中添加 Starfish 作为配置源\n\n```csharp\n// .NET 5\npublic static IHostBuilder CreateHostBuilder(string[] args) =\u003e\n    Host.CreateDefaultBuilder(args)\n        .ConfigureAppConfiguration((hostingContext, config) =\u003e\n        {\n            config.AddStarfish(ConfigurationClientOptions.Load(config));\n        })\n        .ConfigureWebHostDefaults(webBuilder =\u003e\n        {\n            webBuilder.UseStartup\u003cStartup\u003e();\n        });\n```\n    \n```csharp\n// .NET 6 and above\nvar builder = WebApplication.CreateBuilder(args);\nbuilder.Configuration.AddStarfish(ConfigurationClientOptions.Load(builder.Configuration));\n// ...\nvar app = builder.Build();\n// ...\napp.Run();\n```\n\n2. Add configuration in appsettings.json/在 appsettings.json 中添加配置\n\n```json\n{\n    \"Starfish\": {\n        \"Host\": \"http://localhost:5000\",\n        \"Id\": \"5lNc9zQGdG7\",\n        \"Secret\": \"123456\"\n    }\n}\n```\n\n\n# Documentation/文档 ⚡\n\n## API\n\nSee the Swagger UI at [http://localhost:5229/swagger](http://localhost:5229/swagger) after running the server.\n\n## Scripts/脚本\n\n- MySQL: [SCRIPTS_MYSQL.md](Documents/SCRIPTS_MYSQL.md)\n- SQL Server: [SCRIPTS_MSSQL.md](Documents/SCRIPTS_MSSQL.md)\n- PostgreSQL: [SCRIPTS_PGSQL.md](Documents/SCRIPTS_PGSQL.md)\n- Sqlite: [SCRIPTS_SQLITE.md](Documents/SCRIPTS_SQLITE.md)\n- ~~Mongo: *not needed. / 不需要*~~\n\n## Resources/资源\n\n## Release Notes/发布日志\n\n## FAQ/常见问题\n\n\n# Roadmap/路线图 ⚡\n\n## v1.0\n\n - Basic configuration management/基础配置管理\n - Web API\n - Basic admin panel/基础管理面板\n - Configuration client/配置客户端\n - WebSockets protocol support of Client. / 客户端支持WebSockets协议。\n\n## v1.1\n    \n - gRPC protocol support of Client. / 客户端支持gRPC协议。\n - Rollback to history version. / 回滚到历史版本。\n - Role-based access control. / 基于角色的访问控制。\n\n## v1.2\n\n - Docker support. / 支持Docker部署。\n - MongoDB support. / 支持MongoDB。\n - User registration. / 用户注册。\n - Yaml support. / 支持Yaml。\n\n## v1.3\n\n - Multiple node deployment. / 支持多节点部署。\n - Common configuration. / 公共配置。\n - Real-time connections refreshing. / 实时连接信息刷新。\n\n## v2.0\n\n - Service discovery. / 服务发现。\n\n## v3.0\n\n - Service insights. / 服务监控。\n - Service tracing. / 服务追踪。\n - Log management. / 日志管理。\n\n\n# Contributing/贡献 ⚡\n\n\n# Acknowledgements/鸣谢 ⚡\n\n[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/)\n\nThanks to JetBrains for supporting the project through All Products Packs within their Free Open Source License program.\n\n感谢JetBrains通过其免费开源许可计划中的所有产品包支持该项目。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerosoftdev%2Fstarfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerosoftdev%2Fstarfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerosoftdev%2Fstarfish/lists"}