{"id":22408362,"url":"https://github.com/phmatray/aspirestrapi","last_synced_at":"2025-03-27T01:44:18.062Z","repository":{"id":210253161,"uuid":"726096248","full_name":"phmatray/AspireStrapi","owner":"phmatray","description":"AspireStrapi is a demo project designed to provide a simple yet robust stack for .NET developers who are interested in using Strapi as a backend.","archived":false,"fork":false,"pushed_at":"2024-03-16T20:53:56.000Z","size":9976,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T07:27:54.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/phmatray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-01T14:27:29.000Z","updated_at":"2023-12-01T14:29:17.000Z","dependencies_parsed_at":"2025-02-01T07:35:57.752Z","dependency_job_id":null,"html_url":"https://github.com/phmatray/AspireStrapi","commit_stats":null,"previous_names":["phmatray/aspirestrapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FAspireStrapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FAspireStrapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FAspireStrapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FAspireStrapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phmatray","download_url":"https://codeload.github.com/phmatray/AspireStrapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767274,"owners_count":20668822,"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":[],"created_at":"2024-12-05T11:17:24.758Z","updated_at":"2025-03-27T01:44:18.046Z","avatar_url":"https://github.com/phmatray.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AspireStrapi 🚀\n\nAspireStrapi is a demo project designed to provide a simple yet robust stack for .NET developers who are interested in using Strapi as a backend. This project utilizes a variety of technologies to create a comprehensive and efficient development environment.\n\n## Technologies Used 💻\n\n- .NET 8.0 Aspire\n- Strapi\n- Blazor App\n- Postgres\n\n## Project Setup 🛠️\n\nFollow these steps to get started with this project:\n\n1. **Install Strapi**: Follow the instructions on the [Strapi website](https://strapi.io/documentation/developer-docs/latest/getting-started/introduction.html) to install Strapi.\n\n2. **Dockerize Strapi**: Use the [strapi dockerize tool](https://github.com/strapi-community/strapi-tool-dockerize) to create a production-ready Docker image of your Strapi backend.\n\n3. **Add an Executable to the AppHost**: Add an executable that points to your backend in the AppHost. This can be done using the following code snippet:\n\n```csharp\nvar strapi = builder\n    .AddExecutable(\n        name: \"strapi-api-dev\",\n        command: \"npm\",\n        workingDirectory: \"../../Backend/backend-blog/\",\n        args: [\"run\", \"develop\"])\n    .WithServiceBinding(1337, 1337, \"http\", \"strapi-api-dev\");\n```\n\n4. **Create a Blazor App**: Set up a new Blazor application as part of your project.\n\n5. **Generate a Client for Strapi Backend**: Use StrawberryShake to generate a client for your Strapi backend. Follow the tutorial provided by StrawberryShake for guidance.\n\n6. **Enjoy Developing!**: With the setup complete, you can now start developing your application.\n\n## Example Usage 📖\n\nHere's an example of how to use the `GetArticles` component in your application:\n\n```csharp\n\u003cUseGetArticles Context=\"result\"\u003e\n    \u003cChildContent\u003e\n        \u003cul\u003e\n            @foreach (IGetArticles_Articles_Data item in result.Articles!.Data)\n            {\n                \u003cli\u003e@item.Attributes!.Title\u003c/li\u003e\n            }\n        \u003c/ul\u003e\n    \u003c/ChildContent\u003e\n    \u003cErrorContent\u003e\n        Something went wrong ...\u003cbr /\u003e\n        @result.First().Message\n    \u003c/ErrorContent\u003e\n    \u003cLoadingContent\u003e\n        Loading ...\n    \u003c/LoadingContent\u003e\n\u003c/UseGetArticles\u003e\n```\n\nThis component fetches articles from the backend and displays them in a list. If an error occurs during the fetch operation, an error message is displayed. While the data is being fetched, a loading message is displayed.\n\n## License 📄\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmatray%2Faspirestrapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphmatray%2Faspirestrapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmatray%2Faspirestrapi/lists"}