{"id":15411652,"url":"https://github.com/csharpfritz/fritz.hatcollection","last_synced_at":"2025-06-17T00:32:48.055Z","repository":{"id":55654797,"uuid":"301728704","full_name":"csharpfritz/Fritz.HatCollection","owner":"csharpfritz","description":"A static website that displays a collection of Fritz's Hats","archived":false,"fork":false,"pushed_at":"2023-11-03T16:22:50.000Z","size":863,"stargazers_count":24,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-11T18:49:28.123Z","etag":null,"topics":["azure","azure-functions","blazor","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://hats.csharpfritz.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csharpfritz.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":"2020-10-06T13:03:58.000Z","updated_at":"2025-03-07T06:28:36.000Z","dependencies_parsed_at":"2024-10-20T14:34:25.532Z","dependency_job_id":null,"html_url":"https://github.com/csharpfritz/Fritz.HatCollection","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.06451612903225812,"last_synced_commit":"130f3c4a0fcad15093a4802ab9f39082fc5d4153"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csharpfritz/Fritz.HatCollection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csharpfritz%2FFritz.HatCollection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csharpfritz%2FFritz.HatCollection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csharpfritz%2FFritz.HatCollection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csharpfritz%2FFritz.HatCollection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csharpfritz","download_url":"https://codeload.github.com/csharpfritz/Fritz.HatCollection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csharpfritz%2FFritz.HatCollection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260268156,"owners_count":22983598,"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":["azure","azure-functions","blazor","wasm","webassembly"],"created_at":"2024-10-01T16:49:48.429Z","updated_at":"2025-06-17T00:32:47.996Z","avatar_url":"https://github.com/csharpfritz.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Fritz's Hat Collection](https://hats.csharpfritz.com)\n\n[![Azure Static Web Apps CI/CD](https://github.com/csharpfritz/Fritz.HatCollection/actions/workflows/azure-static-web-apps-salmon-pond-0177b6f0f.yml/badge.svg)](https://github.com/csharpfritz/Fritz.HatCollection/actions/workflows/azure-static-web-apps-salmon-pond-0177b6f0f.yml)\n\nThis repository contains an example [Blazor WebAssembly](https://docs.microsoft.com/aspnet/core/blazor/?view=aspnetcore-3.1#blazor-webassembly) client application, a C# [Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-overview) and a C# class library with shared code.  Fritz wrote these to demonstrate a [simple Blazor site showing off his collection of hats](https://hats.csharpfritz.com).\n\n[![Screenshot of Fritz's HatCollection website](docs/images/website-screenshot.png)](https://hats.csharpfritz.com)\n\n## Re-using this project\n\nFork this repository from the and then clone it locally to your machine.  This project is based on .NET Core 3.1 for the Azure functions and .NET 6 for the Blazor web-assembly application.\nCreate a repository from the [GitHub template](https://github.com/staticwebdev/blazor-starter/generate) and then clone it locally to your machine.\n\nOnce you clone the project, open the solution in [Visual Studio](https://visualstudio.microsoft.com/vs/community/) and press **F5** to launch both the client application and the Functions API app.\n\n### Data storage\n\nThis project uses [Azure Storage](https://docs.microsoft.com/azure/storage/common/storage-introduction) to store data about the hats in a table named `Hats` and the images of those hats are stored in a blob container called `hat-images`.  You will need to configure this Azure Storage service for yourself and place the connection string for the storage service in a `Api/local.settings.json` file with the key name `AzureTableConnectionString`.  It should look something like this:\n\n```json\n{\n\t\"IsEncrypted\": false,\n\t\"Values\": {\n\t\t\"AzureTableConnectionString\": \"YOUR CONNECTION STRING\"\n\t}\n}\n```\n\nAdditionally, you will need to set the base url for your images in the `Program.cs/BaseImageUrl` variable.  This allows the `HatUi.razor` component to assemble a proper URL for the items in your collection.\n\n_Note: If you're using the Azure Functions CLI tools, refer to [the documentation](https://docs.microsoft.com/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash) on how to enable CORS._\n\n## Repository Structure\n\n* **Client**: The Blazor WebAssembly application that displays the hat collection\n* **API**: A C# Azure Functions API, which the Blazor application will call to fetch the hats to display\n* **Shared**: A C# class library with a shared data model between the Blazor and Functions application\n* **docs** content to support this readme and other educational materials\n\n## Deploy to Azure Static Web Apps\n\nThis application can be deployed to [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps), to learn how, check out [our quickstart guide](https://aka.ms/blazor-swa/quickstart).\n\nYou can check out the various times this application has been deployed by reviewing the [Actions](actions) tab at the top of the repository.  The GitHub action definition that definies this deployment process is available in the [.github/workflows](/csharpfritz/Fritz.HatCollection/tree/main/.github/workflows) folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsharpfritz%2Ffritz.hatcollection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsharpfritz%2Ffritz.hatcollection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsharpfritz%2Ffritz.hatcollection/lists"}