{"id":26068832,"url":"https://github.com/igor-u/jambo","last_synced_at":"2025-07-19T15:01:59.821Z","repository":{"id":274045014,"uuid":"907003833","full_name":"igor-u/jambo","owner":"igor-u","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-04T23:02:18.000Z","size":1122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T22:32:49.818Z","etag":null,"topics":["aspnet-core","containerization","csharp","docker","dotnet","efcore","rest","solar-energy","web","webapi"],"latest_commit_sha":null,"homepage":"","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/igor-u.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":"2024-12-22T14:46:34.000Z","updated_at":"2025-03-03T13:12:45.000Z","dependencies_parsed_at":"2025-01-28T02:45:27.208Z","dependency_job_id":"7f918857-cc04-4572-a438-3d3c2b4da149","html_url":"https://github.com/igor-u/jambo","commit_stats":null,"previous_names":["igor-u/jambo-web-api","igor-u/jambo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-u%2Fjambo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-u%2Fjambo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-u%2Fjambo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-u%2Fjambo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igor-u","download_url":"https://codeload.github.com/igor-u/jambo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242619119,"owners_count":20159001,"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":["aspnet-core","containerization","csharp","docker","dotnet","efcore","rest","solar-energy","web","webapi"],"created_at":"2025-03-08T22:32:52.200Z","updated_at":"2025-03-08T22:32:53.264Z","avatar_url":"https://github.com/igor-u.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jambo Web API\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/0ca148ca-5a98-4380-bdef-0df637753c46\"/\u003e\n\u003c/p\u003e\n\n## Overview\nThis project serves as an experimental exploration of the ASP.NET Core framework within the context of photovoltaic solar energy. It focuses on three core model classes: solar panels, solar inverters, and solar power plants.\n\n## Entity Relationship Diagram\n```mermaid\n%%{init: {\n  \"theme\": \"default\",\n  \"themeCSS\": [\n    \".er.relationshipLabel { fill: white ; }\",\n    \".er.attributeBoxEven { fill : black; }\",\n    \".er.attributeBoxOdd { fill : black; }\",\n    \".er.attributeBoxEven { stroke : #e0e000; }\",\n    \".er.attributeBoxOdd { stroke : #e0e000; }\",\n    \".er.entityLabel { fill: white; }\",\n    \".er.relationshipLabelBox { fill: transparent; }\", \n    \".er.entityBox { fill: black; }\",\n    \".er.entityBox { stroke: #e0e000; }\"\n    ]\n}}%%\nerDiagram\n      SolarPowerPlant o|--|{ SolarPanel : has\n      SolarPowerPlant o|--|{ SolarInverter : has\n      SolarPowerPlant {\n        bigint Id PK\n        varchar(19) Coordinates\n        int TotalSolarPanelWattage\n        int TotalSolarInverterWattage\n    }\n      SolarPanel{\n        varchar(12) SerialNumber PK\n        int Power\n        bigint SolarPowerPlantId\n      }\n      SolarInverter{\n        varchar(12) SerialNumber PK\n        int RatedPower\n        int PeakPower\n        bigint SolarPowerPlantId\n      }\n```\n\n## Tools\n- [.NET](https://dotnet.microsoft.com)\n- [MySQL](https://www.mysql.com)\n- [Docker](https://www.docker.com)\n- [Postman](https://www.postman.com)\n\n## Architecture\nFor this practice, MVC and REST were utilized separately. The view layer is responsible for displaying data (using the GET method), while the POST method is accessible through API testing platforms such as Postman or Insomnia. A collection of requests can be found in the [Jambo.postman_collection.json](https://github.com/igor-u/jambo-web-api/blob/main/Jambo.postman_collection.json) file. The collection can be imported into either tool to execute the requests after running the project.\n\n## Objectives\n- Learn about the C# programming language\n- Learn more about object relational mapping\n- Learn how to containerize a .NET application.\n\n## Database\nThis project utilizes MySQL as the primary database. The connection between the ASP.NET application and the MySQL server is established using [Pomelo.EntityFrameworkCore.MySql](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql), an open-source provider for Entity Framework Core that supports MySQL.\n\n* Server: Localhost was used.\n* MySQL Server: Ensure the MySQL server is operational:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/1f3e7e7f-8d7f-4dd5-bb74-ffc5f18b15da\"/\u003e\n\u003c/p\u003e\n\n**To create the database, along with its tables**:\n- Navigate to the project's `src/` directory in your terminal.\n- Apply migrations:\n```\ndotnet ef database update\n```\n\n## Tests\nTo run the tests in this .NET application, execute the following command in the project's `src/` directory:\n```\ndotnet test\n```\n\n## Running the Project\nThis project can be run in two ways:\n\n1. Using `dotnet run`\n\n- Navigate to the project's `src/` directory in your terminal.\n- Run the following command:\n```\ndotnet run\n```\nThe application will start and be accessible through `http://localhost:5171`.\n\n2. Using Docker\n\n- Navigate to the project's `src/` directory in your terminal.\n- Build the Docker image:\n```\ndocker build -t jambo-web-api .\n```\nRun a container using the built image:\n```\ndocker run --network host jambo-web-api --rm\n```\nThe `--network host`  parameter is used to make the container share the host machine's network. This allows the container to directly access local services, such as the database.\n\nThe application will start and be accessible through `http://localhost:8080`.\n\n## About EF Core\n\nFor in-depth information on Entity Framework Core concepts used in this project, please refer to the official Microsoft documentation:\n\n[Conventions for relationship discovery](https://learn.microsoft.com/en-us/ef/core/modeling/relationships/conventions)\n\n[Eager Loading of Related Data](https://learn.microsoft.com/en-us/ef/core/querying/related-data/eager)\n\n[Shadow and Indexer Properties](https://learn.microsoft.com/en-us/ef/core/modeling/shadow-properties)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-u%2Fjambo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figor-u%2Fjambo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-u%2Fjambo/lists"}