{"id":22348727,"url":"https://github.com/stardustdl/modulight","last_synced_at":"2025-10-24T11:37:18.980Z","repository":{"id":37824377,"uuid":"340910798","full_name":"StardustDL/modulight","owner":"StardustDL","description":"Modulight is a light modular framework aimed to be low intrusive based on dependency injection for .NET, ASP.NET, Blazor, and command-line.","archived":false,"fork":false,"pushed_at":"2023-02-27T08:59:52.000Z","size":2766,"stargazers_count":7,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-03T10:47:52.192Z","etag":null,"topics":["blazor","blazor-server","blazor-webassembly","command-line","dependency-injection","dotnet","graphql","lazy-loading","modular","modular-framework","razor-components"],"latest_commit_sha":null,"homepage":"https://stardustdl.github.io/modulight/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StardustDL.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}},"created_at":"2021-02-21T13:41:56.000Z","updated_at":"2024-05-08T08:54:14.000Z","dependencies_parsed_at":"2023-02-05T16:30:22.016Z","dependency_job_id":"c620550e-7fcb-4bb9-a51a-151cd6c9a1a5","html_url":"https://github.com/StardustDL/modulight","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fmodulight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fmodulight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fmodulight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fmodulight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StardustDL","download_url":"https://codeload.github.com/StardustDL/modulight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228098375,"owners_count":17869032,"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":["blazor","blazor-server","blazor-webassembly","command-line","dependency-injection","dotnet","graphql","lazy-loading","modular","modular-framework","razor-components"],"created_at":"2024-12-04T11:06:10.869Z","updated_at":"2025-10-24T11:37:13.957Z","avatar_url":"https://github.com/StardustDL.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![modulight](https://socialify.git.ci/StardustDL/modulight/image?description=1\u0026font=Bitter\u0026forks=1\u0026issues=1\u0026language=1\u0026owner=1\u0026pulls=1\u0026stargazers=1\u0026theme=Light)\n\n![](https://github.com/StardustDL/modulight/workflows/CI/badge.svg) ![](https://img.shields.io/github/license/StardustDL/modulight.svg) [![](https://buildstats.info/nuget/Modulight.Modules.Core)](https://www.nuget.org/packages/Modulight.Modules.Core/)\n\n[Modulight](https://github.com/StardustDL/modulight) is a light modular framework aimed to be low intrusive based on dependency injection for .NET, ASP.NET, Blazor, and command-line.\n\n## Features\n\n- Dependency injection\n- Unified services registering\n- CommandLine (cooperated with [CliFx](https://github.com/Tyrrrz/CliFx))\n  - Hosting in generic host Microsoft.Extensions.Hosting.IHost\n  - Dependency injection, logging \u0026 hosting services\n  - Extensible \u0026 Composable\n- Blazor Client \u0026 Server\n  - Unified CSS \u0026 JS lazy loading \u0026 prerendering. No need to append `\u003cscript\u003e` and `\u003clink\u003e` repeatedly for every razor components, especially when use different hosting models.\n  - Unified assembly lazy loading.\n  - Interop between modules and host.\n  - A builtin hosting implementation with prerendering.\n- ASP.NET Server\n  - Custom middlewares\n  - Custom endpoints\n- GraphQL Server (cooperated with [ChilliCream GraphQL Platform](https://github.com/ChilliCream/hotchocolate))\n  - Unified query/mutation/subscription definition\n- Builtin module dependencies, options \u0026 services support\n\n## Usage\n\n### Use modules\n\nSee [here](./src/Modulight.Modules.Core/README.md) for details.\n\n### Addition steps\n\n#### Use Command line modules\n\nSee [here](./src/Modulight.Modules.CommandLine/README.md) for details.\n\n#### Use Razor component modules\n\nSee [here](./src/Modulight.Modules.Client.RazorComponents/README.md) for details.\n\n#### Use Blazor UI hosting template\n\nSee [here](./src/Modulight.UI.Blazor/README.md) for details.\n\n#### Use ASP.NET modules\n\nSee [here](./src/Modulight.Modules.Server.AspNet/README.md) for details.\n\n#### Use GraphQL modules\n\nSee [here](./src/Modulight.Modules.Server.GraphQL/README.md) for details.\n\n## Example codes\n\nThey are based on nightly build package at: \n\n[NUGET source](https://sparkshine.pkgs.visualstudio.com/StardustDL/_packaging/feed/nuget/v3/index.json)\n\n### Design and use a command line module in console application\n\n- [Program.cs](https://github.com/StardustDL/modulight/blob/master/test/Test.CommandLine/Program.cs)\n\n### Design a client (Blazor) module\n\n- [HelloModule.cs](https://github.com/StardustDL/modulight/blob/master/src/modules/hello/Delights.Modules.Hello/HelloModule.cs) Client module definition.\n- [Index.razor](https://github.com/StardustDL/modulight/blob/master/src/modules/hello/Delights.Modules.Hello.UI/Pages/Index.razor) Client module pages. It belongs to a different assembly from which Module belongs to because we want this assembly is lazy loading.\n\n### Design a GraphQL server module\n\n- [HelloServerModule.cs](https://github.com/StardustDL/modulight/blob/master/src/modules/hello/Delights.Modules.Hello.Server/HelloServerModule.cs) GraphQL server module definition.\n\n### Use a client module in Blazor websites\n\n- [ModulePageLayout.razor](https://github.com/StardustDL/modulight/blob/master/src/Modulight.UI.Blazor/Layouts/ModulePageLayout.razor) Layout and container for module pages.\n- [App.razor](https://github.com/StardustDL/modulight/blob/master/src/Modulight.UI.Blazor/App.razor) Lazy loading for js/css/sassemblies when routing.\n- [AntDesignModule.cs](https://github.com/StardustDL/razorcomponents/blob/master/src/AntDesigns/AntDesignModule.cs) Definition of JS/CSS resources.\n- [ModuleSetup.cs](https://github.com/StardustDL/delights/blob/master/src/Delights.Client.Shared/ModuleSetup.cs) Use modules in client.\n- [Startup.cs](https://github.com/StardustDL/modulight/blob/master/test/Test.Modulights.UI/Startup.cs) Blazor Server hosting.\n- [Program.cs](https://github.com/StardustDL/modulight/blob/master/test/Test.Modulights.UI.Wasm/Program.cs) Blazor WebAssembly hosting.\n- [index.html](https://github.com/StardustDL/modulight/blob/master/test/Test.Modulights.UI.Wasm/wwwroot/index.html) Clean index.html.\n\n### Use a GraphQL server module\n\n- [Startup.cs](https://github.com/StardustDL/delights/blob/master/src/Delights.Api/Startup.cs) GraphQL server integrating.\n\n## Project guide\n\n- [Modulight.Modules.Core](./src/Modulight.Modules.Core/) Core types for Modulight framework.\n- [Modulight.Modules.CommandLine](./src/Modulight.Modules.CommandLine/) Basic types for command line modules.\n- [Modulight.Modules.Client.RazorComponents](./src/Modulight.Modules.Client.RazorComponents/) Basic types for razor component client modules.\n- [Modulight.Modules.Server.AspNet](./src/Modulight.Modules.Server.AspNet/) Basic types for aspnet server modules.\n- [Modulight.Modules.Server.GraphQL](./src/Modulight.Modules.Server.GraphQL/) Basic types for graphql server modules.\n- [Hello module](./src/modules/hello/) A demo module.\n  - [Hello](./src/modules/hello/Delights.Modules.Hello) Client module.\n  - [Hello.Core](./src/modules/hello/Delights.Modules.Hello.Core) Shared manifest between client \u0026 server module.\n  - [Hello.UI](./src/modules/hello/Delights.Modules.Hello.UI) UI (pages) for client module.\n  - [Hello.Server](./src/modules/hello/Delights.Modules.Hello.Server) Server module.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardustdl%2Fmodulight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstardustdl%2Fmodulight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardustdl%2Fmodulight/lists"}