{"id":41982923,"url":"https://github.com/intelecy/demo-app","last_synced_at":"2026-01-26T00:00:12.909Z","repository":{"id":231527771,"uuid":"781332163","full_name":"Intelecy/demo-app","owner":"Intelecy","description":"The Intelecy C# demo app","archived":false,"fork":false,"pushed_at":"2024-04-04T12:06:36.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-04T13:43:19.598Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Intelecy.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}},"created_at":"2024-04-03T07:22:06.000Z","updated_at":"2024-04-04T13:43:32.391Z","dependencies_parsed_at":"2024-04-04T13:43:30.007Z","dependency_job_id":"c14104fc-84ec-427f-9c93-c4fc5db2b8de","html_url":"https://github.com/Intelecy/demo-app","commit_stats":null,"previous_names":["intelecy/demo-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Intelecy/demo-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intelecy%2Fdemo-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intelecy%2Fdemo-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intelecy%2Fdemo-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intelecy%2Fdemo-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Intelecy","download_url":"https://codeload.github.com/Intelecy/demo-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intelecy%2Fdemo-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T23:06:19.311Z","status":"ssl_error","status_checked_at":"2026-01-25T23:03:50.555Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-26T00:00:12.480Z","updated_at":"2026-01-26T00:00:12.860Z","avatar_url":"https://github.com/Intelecy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Intelecy Demo Application\n\nTo start the application run `dotnet run` from the `src/Demo` folder. This will start the app in Development mode using \ndata from the Development.db sqlite database.\n\nThe application data has a simple structure. There are multiple sites, each with an `id` and a `name`. Each site can \ncontain multiple tags (where tag in this context refers to a sensor). Each tag has an `id`, `name`, `site_id`, optional \n`unit` and a `created_at` timestamp.\n\nThe application has a graphql API which will be available at https://localhost:7141/graphql.\nWe recommend using the [Altair GraphQL](https://altairgraphql.dev/) client to consume the API. The GraphQL API is documented\nand the documentation can be viewed in the client.\n\nWhen returning a list of \nitems, the API uses the Connection Model as described here https://graphql.org/learn/pagination/, but including the \nhelper method `items` that directly lists the nodes.\n\nAn example query:\n```graphql\nquery ListSites {\n  sites {\n    items {\n      id\n      name\n      tags {\n        items {\n          id\n          name\n          unit\n          createdAt\n        }\n      }\n    }\n  }\n}\n```\n\nThis query will list all of the sites in the app and all of the tags for each site.\n\nThe API uses global ID's and the node interface as described at https://graphql.org/learn/global-object-identification/.\n\nAn example query for fetching a single node:\n```graphql\nquery GetById {\n  node(id: \"SiteId:3\") {\n    id\n    ... on Tag {\n      name\n      unit\n      createdAt\n    }\n    ... on Site {\n      name\n    }\n  }\n}\n```\n\nThis query will return all of the fields for either a `Tag` or a `Site`. Try using `TagId:2` as the id to see a `Tag`\nreturned.\n\nAn example mutation:\n```graphql\nmutation CreateSite {\n  createSite(input: { name: \"Test\"}) {\n    site {\n      id\n      name\n    }\n  }\n}\n```\n\nThis mutation will create a new site in the application.\n\n## Development\n\nThe code uses the CQRS model, with the handlers in `src/Demo.Core/CQRS`. Mediator is used to send requests to the \nhandlers. The handlers use strongly typed id's provided by https://github.com/SteveDunn/Vogen.\n\nEntity Framework Core is used for persisting data with the database being Sqlite. Configuration for the tables is \nin `src/Demo.Core/Configuration`. The persistence entities are in `src/Demo.Core/Persistence`.\n\nWhen developing, there is a useful flag that can be enabled in `Program.cs`:\n```csharp\n options.ThrowOnUnhandledException = true;\n```\nThis allows the developer to stop GraphQL dotnet from catching and wrapping exceptions.\n\n### Tests\n\nTests can be run using `dotnet test` or in an IDE.\n\n### Migrations\n\nTo update the persistence data, migrations are used in `src/Demo.Core`.\n\n```shell\n# create migration\ndotnet ef --startup-project ../Demo migrations add Initial\n\n# apply migration (local use, use scripts for prod)\ndotnet ef --startup-project ../Demo database update\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelecy%2Fdemo-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintelecy%2Fdemo-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelecy%2Fdemo-app/lists"}