{"id":13415286,"url":"https://github.com/integrativesoft/lara","last_synced_at":"2025-04-05T22:10:31.207Z","repository":{"id":41207625,"uuid":"186619223","full_name":"integrativesoft/lara","owner":"integrativesoft","description":"Lara Web Engine is a lightweight C# framework for web user interface development.","archived":false,"fork":false,"pushed_at":"2023-07-19T00:48:53.000Z","size":6588,"stargazers_count":147,"open_issues_count":3,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-20T17:45:48.821Z","etag":null,"topics":["cross-platform","csharp","dotnet","html5","lara","ui","web","web-components","web-development","web-services"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/integrativesoft.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":"support/jetbrains.svg","governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-14T12:38:55.000Z","updated_at":"2024-04-20T20:22:08.000Z","dependencies_parsed_at":"2024-01-02T22:36:48.448Z","dependency_job_id":"9adc1bd4-5196-4754-9f5b-9d5f3399f151","html_url":"https://github.com/integrativesoft/lara","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2Flara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2Flara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2Flara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2Flara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/integrativesoft","download_url":"https://codeload.github.com/integrativesoft/lara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406111,"owners_count":20933806,"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":["cross-platform","csharp","dotnet","html5","lara","ui","web","web-components","web-development","web-services"],"created_at":"2024-07-30T21:00:46.567Z","updated_at":"2025-04-05T22:10:31.177Z","avatar_url":"https://github.com/integrativesoft.png","language":"C#","readme":"## Lara Web Engine\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache--2.0-blue)](https://github.com/integrativesoft/lara/blob/master/LICENSE) [![NuGet version](http://img.shields.io/nuget/v/Integrative.Lara.svg?nocache=1)](https://www.nuget.org/packages/Integrative.Lara/)  [![Download count](https://img.shields.io/nuget/dt/Integrative.Lara.svg)](https://www.nuget.org/packages/Integrative.Lara/)  [![Build Status](https://api.travis-ci.com/integrativesoft/lara.svg?branch=master)](https://travis-ci.org/integrativesoft/lara)  [![Coverage Status](https://coveralls.io/repos/github/integrativesoft/lara/badge.svg?branch=master\u0026lala=3)](https://coveralls.io/github/integrativesoft/lara?branch=master)\n==================\n\n\n**Lara** is a server-side rendering framework for developing **web user interfaces** using C#.\n\n\u003e*\"It is similar to server-side Blazor, but is much more lightweight and easier to install. For example, while any type of Blazor requires a whole SDK, Lara is just a NuGet package.\"* [ScientificProgrammer.net](https://scientificprogrammer.net/2019/08/18/pros-and-cons-of-blazor-for-web-development/?pagename=pros-and-cons-of-blazor)\n\n## Sample application\n\n```csharp\nusing Integrative.Lara;\nusing System;\nusing System.Threading.Tasks;\n\nnamespace SampleApp\n{\n    public static class Program\n    {\n        public static async Task Main()\n        {\n            // create and start application\n            const int port = 8182;\n            using var app = new Application();\n            app.PublishPage(\"/\", () =\u003e new MyCounterComponent { Value = 5 });\n            await app.Start(new StartServerOptions { Port = port });\n\n            // print address on console\n            var address = $\"http://localhost:{port}\";\n            Console.WriteLine($\"Listening on {address}/\");\n\n            // helper function to launch browser (comment out as needed)\n            LaraUI.LaunchBrowser(address);\n\n            // wait for ASP.NET Core shutdown\n            await app.WaitForShutdown();\n        }\n    }\n\n    internal class MyCounterComponent : WebComponent\n    {\n        private int _value; // triggers PropertyChanged event\n        public int Value { get =\u003e _value; set =\u003e SetProperty(ref _value, value); }\n\n        public MyCounterComponent()\n        {\n            ShadowRoot.Children = new Node[]\n            {\n                new HtmlDivElement() // on PropertyChanged, assigns InnerText\n                    .Bind(this, x =\u003e x.InnerText = Value.ToString()),\n                new HtmlButtonElement\n                    { InnerText = \"Increase\" }\n                    .Event(\"click\", () =\u003e Value++)\n            };\n        }\n    }\n}\n```\n\n## Adding Lara to an existing web server application\n\nTo add Lara to an existing ASP.NET Core server, add to the Startup class or equivalent:\n\n```csharp\nprivate readonly Application _laraApp = new Application();\n\npublic void Configure(IApplicationBuilder app)  \n{  \n    app.UseLara(_laraApp, new LaraOptions\n    {\n        // configuration options\n    });\n} \n```\n\n## Creating Desktop applications\n\nTo create a desktop container for your web app, here's a few options:\n\n- [electron.js](https://www.electronjs.org/) combined with [electron-cgi](https://github.com/ruidfigueiredo/electron-cgi#readme) library\n- [Chromely](https://github.com/chromelyapps/Chromely)\n- [neutralinojs](https://github.com/neutralinojs/neutralinojs)\n\n## Getting started\n\nThere's no need to download this repository to use Lara, instead, there's a [NuGet package](https://www.nuget.org/packages/Integrative.Lara/).\n\n**Check out the [wiki documentation](https://github.com/integrativesoft/lara/wiki)**\n\n## How does Lara work?\n\nWhenever the browser triggers a registered event (e.g. click on a button), it sends to the server a message saying that the button was clicked. The server executes the code associated with the event, manipulating the server's copy of the page, and replies a JSON message with the delta between server and client.\n\n## How to contribute\n\n**Please send feedback!** Issues, questions, suggestions, requests for features, and success stories. Please let me know by either opening an issue. Thank you!\n\n**If you like Lara, please give it a star - it helps!**\n\n## Credits\n\nThanks to [JetBrains](https://www.jetbrains.com/?from=LaraWebEngine) for the licenses of Rider and DotCover.\n\n[![JetBrains](support/jetbrains.svg)](https://www.jetbrains.com/?from=LaraWebEngine)\n","funding_links":[],"categories":["GUI","Frameworks, Libraries and Tools","框架, 库和工具"],"sub_categories":["GUI","图形用户界面GUI","GUI - Framework"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegrativesoft%2Flara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegrativesoft%2Flara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegrativesoft%2Flara/lists"}