{"id":13727801,"url":"https://github.com/JBildstein/SpiderEye","last_synced_at":"2025-05-08T00:30:54.855Z","repository":{"id":39229233,"uuid":"164701838","full_name":"JBildstein/SpiderEye","owner":"JBildstein","description":"Cross platform .Net Core applications with a webview UI","archived":false,"fork":false,"pushed_at":"2023-01-10T11:54:02.000Z","size":1757,"stargazers_count":210,"open_issues_count":13,"forks_count":22,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-05-29T14:42:51.326Z","etag":null,"topics":["cross-platform","netcore","ui","webview"],"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/JBildstein.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}},"created_at":"2019-01-08T17:40:46.000Z","updated_at":"2024-05-29T03:10:26.000Z","dependencies_parsed_at":"2023-02-08T18:31:50.773Z","dependency_job_id":null,"html_url":"https://github.com/JBildstein/SpiderEye","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBildstein%2FSpiderEye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBildstein%2FSpiderEye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBildstein%2FSpiderEye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBildstein%2FSpiderEye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBildstein","download_url":"https://codeload.github.com/JBildstein/SpiderEye/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224679739,"owners_count":17351857,"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","netcore","ui","webview"],"created_at":"2024-08-03T02:00:33.184Z","updated_at":"2024-11-14T19:30:21.741Z","avatar_url":"https://github.com/JBildstein.png","language":"C#","funding_links":[],"categories":["👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛"],"sub_categories":["C#(.Net)"],"readme":"﻿# SpiderEye\n\nWrite .NET Core applications with a webview UI. It can be compared to how Electron runs on Node.js, SpiderEye runs on .NET.\nContrary to Electron though, SpiderEye uses the OS native webview instead of bundling Chromium.\n\nWhat's the name supposed to mean? Simple: what kind of view does a spiders eye have? A webview! Get it? ...you'll laugh later :P\n\n## Supported OS\n\n| OS | Version | Runtime (minimum) | Webview | Browser Engine |\n| ----- | ----- | ----- | ----- | ----- |\n| Windows | 7, 8.x, 10, 11 | .NET 6.0 | WinForms WebBrowser control | IE 9-11 (depending on OS and installed version) |\n| Windows | 7, 8.1, 10, 11 | .NET 6.0 | WebView2 | Edge Chromium |\n| Linux | any 64bit distro where .NET 6.0 runs | .NET 6.0 | WebKit2GTK | WebKit |\n| macOS | x64 10.13 or newer | .NET 6.0 | WKWebView | WebKit |\n\n| Linux Dependencies | Used for | Optional |\n| ----- | ----- | ----- |\n| libgtk-3 | Application and window handling | No |\n| libwebkit2gtk-4.0 | Webview | No |\n| libappindicator3 | Status icon | Yes |\n\n### Gnome-Shell StatusIcon\n\nOn gnome-shell (e.g. with Ubuntu or Fedora) you also need `gnome-shell-extension-appindicator`.\nYou can install it via the package manager and then enable it in the console with\n```\ngnome-extensions enable appindicatorsupport@rgcjonas.gmail.com\n```\nOr you can open a browser and install/enable it at [Gnome Extensions](https://extensions.gnome.org/extension/615/appindicator-support/) (you need to install the gnome browser extension for that to work)\n\n### Edge Chromium/WebView2\n\nTo use Edge Chromium/WebView2 you have to either install [the WebView2 runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/).\nNote that if you publish your app to your users they will also have to install it (follow the guidelines from Microsoft on that topic).\n\nThe fixed version distribution mode (also known as \"bring your own\") is currently not supported.\n\n## Installation\n\n| Type | Package Manager | Name | Version |\n| ----- | ----- | ----- | ----- |\n| Host (Common) | NuGet | `Bildstein.SpiderEye.Core` | [![NuGet](https://img.shields.io/nuget/v/Bildstein.SpiderEye.Core.svg)](https://www.nuget.org/packages/Bildstein.SpiderEye.Core/) |\n| Host (Windows) | NuGet | `Bildstein.SpiderEye.Windows` | [![NuGet](https://img.shields.io/nuget/v/Bildstein.SpiderEye.Windows.svg)](https://www.nuget.org/packages/Bildstein.SpiderEye.Windows/) |\n| Host (Linux) | NuGet | `Bildstein.SpiderEye.Linux` | [![NuGet](https://img.shields.io/nuget/v/Bildstein.SpiderEye.Linux.svg)](https://www.nuget.org/packages/Bildstein.SpiderEye.Linux/) |\n| Host (macOS) | NuGet | `Bildstein.SpiderEye.Mac` | [![NuGet](https://img.shields.io/nuget/v/Bildstein.SpiderEye.Mac.svg)](https://www.nuget.org/packages/Bildstein.SpiderEye.Mac/) |\n| Project Templates | NuGet | `Bildstein.SpiderEye.Templates` | [![NuGet](https://img.shields.io/nuget/v/Bildstein.SpiderEye.Templates.svg)](https://www.nuget.org/packages/Bildstein.SpiderEye.Templates/) |\n| Client | npm | `spidereye` | [![npm](https://img.shields.io/npm/v/spidereye.svg)](https://www.npmjs.com/package/spidereye) |\n\nThe client package is not required but you'll need it if you intend to communicate between host and webview.\n\n## Getting Started\n\n### Running the Examples\n\nTo get a quick overview of how a SpiderEye app looks like, have a look at the Example folder.\n\n**Visual Studio (Windows):** Open the solution, select the SpiderEye.Example.*.Windows project and set it as startup project and run it as you would any project.\nWhen starting, you may get a \"Just My Code\" warning saying that you are trying to debug a Release build of SpiderEye.dll.\nI believe this is a Visual Studio bug and can be safely ignored by selecting \"Continue debugging\" or \"Continue debugging (don't ask again)\".\n\n**Visual Studio for Mac:** Same as with Visual Studio on Windows but you may get an error that .NET Core Desktop projects cannot be run on macOS.\nJust right click on the Windows specific projects and select \"Unload\".\n\n**Visual Studio Code:** Open the base folder (i.e. where the SpiderEye.sln file lies), select which project you want to run in the Debug pane and hit start.\nThe launch/tasks.json is set up in a way that starts the project matching your current platform. Make sure that you have the C# extension installed before running.\n\n**Console:** Simply go into the folder that matches your platform, e.g. `Examples/Simple/App.Linux` and call `dotnet run`\n\n#### Simple Example\n\nThis is pretty much the simplest setup you can have.\nThere are projects for each platform and there's a Core library that contains the web files and common startup logic.\n\n#### Single Page Application (SPA) Example\n\nThis is a slightly more advanced example using Angular for the web side of things.\nIt has the same project structure as the simple example but the Core project contains an Angular app instead of static web files.\n\nIt is also set up in a way that uses the Angular dev server when running in Debug and uses the compiled Angular app (in the `Angular/dist` folder) when running in Release.\nThis means that you have to start the Angular dev server before you can run in Debug.\nTo do that, open a console window and `cd` into the App.Core folder. First install the packages with `npm i` and then call `npm run watch`.\nOn Windows 10, please also read [this note about Edge and localhost](#windows-10-edge-and-localhost) or you may see a blank page.\n\nBefore you can run/publish a Release build, you need to build the Angular app.\nSame as with the dev server, open a console window, go into the App.Core folder and then call `npm run build:prod`.\nOn Windows you could also just call the publish.bat script in the Shared folder.\nThis script builds the Angular app and then publishes the application for each platform.\n\n### Using the Templates\n\nTo really get started, it's easiest if you use the project templates. Install them like so:\n```\ndotnet new -i Bildstein.SpiderEye.Templates\n```\nNow that the templates are installed, create and go into the folder you want the projects in and call:\n```\ndotnet new spidereye-app\n```\nRelevant parameters for the template:\n\n| Flag | Values | Default | Description |\n| ----- | ----- | ----- | ----- |\n| -lang, --language | C#, F#, VB | C# | Specifies the language of the template to create |\n| -ns, --no-sln | true, false | false | Specifies if the solution file should not be added |\n| -nv, --no-vscode | true, false | false | Specifies if the .vscode folder should not be added |\n\nFor more flags and more details, see the help output:\n```\ndotnet new spidereye-app --help\n```\n\nAfter `dotnet new` has run, everything is set up to get you started immediately.\n\nIf you use Visual Studio you can now open the sln or for Visual Studio Code, open the current directory.\nOr you could try out things directly from the console by running the folder that matches your current operating system, e.g.:\n```\ndotnet run MyApp.Linux\n```\nThe application should build, start and display a single window with \"Hello World\".\n\n## Debug the Webview\n\nDepending on which platform you are working, there are different ways to debug the webview.\n\n### Windows Edge Chromium\n\nFirst you need to set `Window.EnableDevTools` to `true` in your app.\nThen just run your app and the dev tools will automatically open in a new window.\n\n### Windows IE\n\nI haven't been able to get this to work but it should be possible to do it from Visual Studio by selecting Debug-\u003eAttach to Process.\nIn that dialog change the \"Attach To\" type by clicking on \"Select\" and there choose \"Script\".\nThen select the process that is your app and click \"Attach\"\n\n### Linux\n\nFirst you need to set `Window.EnableDevTools` to `true` in your app.\nThen just run your app and the dev tools will automatically attach to the window.\nYou can detach it to a separate window by clicking on the detach icon in the top left corner of the dev tools.\n\n### macOS\n\nFirst you need to set `Window.EnableDevTools` to `true` in your app.\nThen run your app and once it's loaded, right click anywhere and select \"Inspect Element\" in the context menu.\n\n## Publishing your App\n\nYou can publish your application like any other .NET Core app by calling `dotnet publish` with the appropriate runtime identifier, e.g. for Linux:\n```\ndotnet publish -r linux-x64\n```\nOr alternatively use whatever mechanism your IDE (like Visual Studio) provides.\nIn the `Examples/**/Shared` folders you'll also find build scripts that include all platforms and should provide a more complete insight.\n\nFor macOS you'll likely want a proper app instead of an executable with a bunch of files. It's pretty easy to do.\nFirst you need an `Info.plist` file like you'd have for any other macOS app. Here's an example to get you started:\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n    \u003ckey\u003eCFBundleName\u003c/key\u003e\n    \u003cstring\u003eMyApp\u003c/string\u003e\n    \u003ckey\u003eCFBundleIconFile\u003c/key\u003e\n    \u003cstring\u003eMyApp.icns\u003c/string\u003e\n    \u003ckey\u003eCFBundleIdentifier\u003c/key\u003e\n    \u003cstring\u003ecom.mycompany.myapp\u003c/string\u003e\n    \u003ckey\u003eCFBundleShortVersionString\u003c/key\u003e\n    \u003cstring\u003e1.0.0\u003c/string\u003e\n    \u003ckey\u003eLSMinimumSystemVersion\u003c/key\u003e\n    \u003cstring\u003e10.13\u003c/string\u003e\n    \u003ckey\u003eCFBundleInfoDictionaryVersion\u003c/key\u003e\n    \u003cstring\u003e6.0\u003c/string\u003e\n    \u003ckey\u003eCFBundlePackageType\u003c/key\u003e\n    \u003cstring\u003eAPPL\u003c/string\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\nYou can find more information in the [Apple documentation](https://developer.apple.com/documentation/bundleresources/information_property_list).\n\nThen create a folder structure like so (MyApp.app is the root folder):\n```\nMyApp.app/\n └─Contents/\n    │  └─Info.plist\n    │\n    ├─MacOS/\n    │  ├─MyApp\n    │  ├─MyApp.dll\n    │  └─etc...\n    │\n    └─Resources/\n       └─MyApp.icns\n```\nIn the MacOS folder you copy everything that was created from the publish, i.e. your executable and all the DLLs etc.\nIn the Resources folder you put your application icon with the same name as you have defined in the Info.plist.\n\n## Development\n\nTo build the project you'll need an up-to-date version of Visual Studio 2022 or Visual Studio Code as well as the .NET Core SDK 6.0.\nTo run/build the SpiderEye.Client project, the SPA example or the Playground project, you also need node.js/npm.\n\nBefore running the Playground project, make sure that you have all client side packages installed and the Angular dev server running.\nClient side packages need to be installed with `npm i` in the `Source/SpiderEye.Client` folder and the `Playground/SpiderEye.Playground.Core` folder.\nOnce those are installed, call `npm run watch` in the `Playground/SpiderEye.Playground.Core` folder.\n\n## How it Works\n\nFor the window handling, this library calls the native APIs on Linux and macOS and the .NET APIs for Windows Forms on Windows.\nIt then does the same thing to attach the webview to that window.\nOn Windows, it also checks if the Edge Chromium based webview is available and falls back to the WebBrowser control if not.\n\nUsing the various APIs, the webview is set up to intercept requests and serve the files that are embedded in an assembly.\nAn exception is the WinForms WebBrowser control that doesn't support this and uses an internal localhost server instead.\n\nThe webview is also set up to inject a little bit of JavaScript at page load to add a consistent interface between the webview and .NET code.\n\n## Contributing\nPlease check first if there is already an open issue or pull request before creating a new one.\n\n#### Bugs\nIf there is an existing issue, upvote it or add more information there.\nOtherwise create a new issue and make sure to fill out the template.\n\n#### Feature Requests\nIf there is an existing issue, please upvote it.\nOtherwise create a new issue and describe what you are expecting of the feature and why you need it.\n\n#### Pull Requests\nMake sure that you describe what the pull request is about and that you adhere to the StyleCop rules (no warnings should show up).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJBildstein%2FSpiderEye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJBildstein%2FSpiderEye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJBildstein%2FSpiderEye/lists"}