{"id":28496299,"url":"https://github.com/simon-gardier/inventory-flutter-dotnet-app","last_synced_at":"2026-04-06T08:01:21.470Z","repository":{"id":297793988,"uuid":"997921448","full_name":"simon-gardier/inventory-flutter-dotnet-app","owner":"simon-gardier","description":"MyVentory is an app/website built in Flutter with a backend written in Dotnet, hosted on Openshift and developped with modern CI/CD standards","archived":false,"fork":false,"pushed_at":"2025-06-07T14:42:48.000Z","size":18131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T15:42:37.936Z","etag":null,"topics":["cicd","devops","dotnet","flutter","gitlab-runner","openapi","postgres","restapi","swagger"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/simon-gardier.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,"zenodo":null}},"created_at":"2025-06-07T13:37:14.000Z","updated_at":"2025-06-07T14:42:52.000Z","dependencies_parsed_at":"2025-06-07T14:41:46.277Z","dependency_job_id":null,"html_url":"https://github.com/simon-gardier/inventory-flutter-dotnet-app","commit_stats":null,"previous_names":["simon-gardier/inventory-flutter-dotnet-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simon-gardier/inventory-flutter-dotnet-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Finventory-flutter-dotnet-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Finventory-flutter-dotnet-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Finventory-flutter-dotnet-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Finventory-flutter-dotnet-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon-gardier","download_url":"https://codeload.github.com/simon-gardier/inventory-flutter-dotnet-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Finventory-flutter-dotnet-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cicd","devops","dotnet","flutter","gitlab-runner","openapi","postgres","restapi","swagger"],"created_at":"2025-06-08T12:07:10.859Z","updated_at":"2026-04-06T08:01:21.448Z","avatar_url":"https://github.com/simon-gardier.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n    __  ___     _    __           __                      ___              \n   /  |/  /_  _| |  / /__  ____  / /_____  _______  __   /   |  ____  ____ \n  / /|_/ / / / / | / / _ \\/ __ \\/ __/ __ \\/ ___/ / / /  / /| | / __ \\/ __ \\\n / /  / / /_/ /| |/ /  __/ / / / /_/ /_/ / /  / /_/ /  / ___ |/ /_/ / /_/ /\n/_/  /_/\\__, / |___/\\___/_/ /_/\\__/\\____/_/   \\__, /  /_/  |_/ .___/ .___/ \n       /____/                                /____/         /_/   /_/      \n```\n\nhttps://github.com/user-attachments/assets/4e869afa-78b8-4e5e-aa90-8acb3f2211c6\n\n## 🧪Documentation\n\n### Tech stack (app)\n- [Flutter](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Technologies/Technology%20Choices%20for%20MyInventory%20System/).\n\n### Tech stack (backend)\n- [Dotnet](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Technologies/Technology%20Choices%20for%20MyInventory%20System/).\n- [Postgresql](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Technologies/Technology%20Choices%20for%20MyInventory%20System/).\n\n### Project structure (app)\n- `Dockerfile.apk` and `Dockerfile.web` are used to create the nginx servers container that serves the download of the application and the website on openshift.\n- `MyVentoryApp` contains the Flutter project.\n- `MyVentoryApp/lib/` contains the main code of the application.\n- `Openshift` contains the YAML fils for the deployment of the app on openshift.\n- `gitlab-ci.yml` builds the apk, create an nginx (http server) image with the apk and push it to the container registry.\n\n### Project structure (backend)\n- `myventoryapi.sln`: [Solution file](https://learn.microsoft.com/en-us/visualstudio/ide/solutions-and-projects-in-visual-studio?view=vs-2022#solutions) referencing the 2 [dotnet projects](https://learn.microsoft.com/en-us/visualstudio/ide/solutions-and-projects-in-visual-studio?view=vs-2022#projects).\n- `MyVentoryApi/`: dotnet project for the backend itself.\n- `MyVentoryApi.Tests/`: dotnet project for the unit testing of the backend.\n- `Openshift`: The YAML files used to deploy the infrastructure on Openshift\n\n### Development environment (app)\n- Install the preferred IDE: [Visual Studio Code](https://code.visualstudio.com/)\n    - Open the project in VSCode, notifications will appear to install the required extensions. **Accept everything**\n- Install Flutter: [installation guide](https://flutter.dev/docs/get-started/install)\n- [Android Studio](https://developer.android.com/studio) is required to run the application on an emulator.\n    - [Set up an Android emulator](https://developer.android.com/studio/run/emulator) \n- Build application locally: `flutter build apk --release`\n    - Note: The apk will be placed in `build/app/outputs/flutter-apk/app-release.apk`.\n- Run the application locally: \n    - Clone the [my-ventory-backend](https://gitlab.uliege.be/SPEAM/2024-2025/team5/myventorybackend) repository and follow the instructions to run the backend locally.\n    - Start the application: `flutter run --dart-define=API_BASE_URL=http://backend_url`. **Note**: A device (VM/Smartphone) must be connected to VSCode to run the application.\n        - Add the flag ``-d chrome` to run the application in Chrome.\n        - By default the applications connects **to the backend running on openshift**. To connect to a local backend, you need to set the `API_BASE_URL` environment variable to the local backend URL.\n            - `http://10.0.2.2/api` connects to the backend on your machine when running the application in an emulator.\n            - `http://localhost/api` connects to the backend on your machine when running the website on Chrome.\n            - `http://local_ip` connects to the backend on your machine when running the application on your smartphone. See `ipconfig` to know your local ip address. More details [here](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Technologies/Local%20development%20and%20testing/).\n    - To connect a device (VM or smartphone):\n        - Start the device in Android studio / Connect the smartphone to the computer.\n        - Select the device in the bottom right corner of VSCode.\n        - Start the application. It should appear on the device.\n- Run the integration tests:\n    - Just as for `Run the application locally`, you must start the backend locally and set the `API_BASE_URL` environment variable to the local backend URL.\n    - The integration tests are made to be run on an androind emulator. Thus, you must have one running.\n    - Start the tests with : `flutter test integration_test/run_integration_tests.dart  --dart-define=API_BASE_URL=http://10.0.2.2/api`\n\n### Development environment (backend)\n- Install the [.NET 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) sdk\n- Install the recommended IDE: [Visual Studio Code](https://code.visualstudio.com/)\n- Open the project in [Visual Studio Code](https://code.visualstudio.com/), notifications will appear to install the required extensions. **Accept everything**\n- Setup your environment: \n    - Create a `database.env` file at the root of the project. See `database.env_template` for a template with explanations on where to find the necessary keys.\n    - In `MyVentoryApi`, create a `.env` file in the folder `MyVentoryApi/`. See `MyVentoryApi/.env_template` for a template with explanations on where to find the necessary keys.\n    - You need to trust the SSL certificate to use the backend locally, from `MyVentoryApi/` type: `dotnet dev-certs https --trust`\n- Run the backend **locally**:\n    - Start Docker desktop\n    - **Start the DB**: `docker-compose --env-file database.env up -d` (remove the `-d` if you want the logs)\n        - **Note:** You need a database.env file to use `run`. See the \"Environment\" section above.\n        - Inspect the database by opening a terminal in the container (from the Docker GUI) and type: `psql -U Team5 -d MyVentory`\n        - Inspect the database in pgAdmin [here](http://localhost:5050), email: `admin@myventory.com`, password: same as [POSTGRES_PASSWORD in \"Variables\" section](https://gitlab.uliege.be/SPEAM/2024-2025/team5/myventorybackend/-/settings/ci_cd).\n            - After connection, right click `Servers` \u003e `Register` \u003e `Server`.\n                - In General tab, Name: my-ventory-database\n                - In Connection tab, Host name: my-ventory-database, Username: Team5, Password: same as [POSTGRES_PASSWORD in \"Variables\" section](https://gitlab.uliege.be/SPEAM/2024-2025/team5/myventorybackend/-/settings/ci_cd)\n        - If you want to erase the DB, delete the volume from Docker Desktop.\n        - Note: On pgAdmin hosted on openshift, the name and host name are **myventory-db-service**.\n    - **Start the backend** (from the `MyVentoryApi` folder): `dotnet run`\n        - Access the API doc page in local [here](https://localhost/).\n- How to update the Database scheme:\n    When you add a table / modify an exisiting table, you have to create a `Migration` to apply these changes to the DB.\n    - Install EF CLI tools: `dotnet tool install --global dotnet-ef`\n    - From the `MyVentoryApi` folder, run `dotnet ef migrations add \u003cName you want to give to the update of the DB (e.g. NewItemModel)\u003e` to generate the migration files. They will be used automatically by the pod on Openshift.\n- Run the tests in local (in the `MyVentoryApi.Tests` folder):\n    You must first install [Docker](https://www.docker.com/) and follow the step from above (\"**Start the DB**\"), as the tests require the database engine to be running.\n    - You can list the tests with: `dotnet test -t`\n    - Run the tests with: `dotnet test --logger \"html;LogFileName=test-results.html\"`\n    - Read the results of the tests: open the file `MyVentoryApi.Tests/TestResults/test-results.html` in your browser.\n        - Note: the results are also available in the terminal from which you ran the tests (its just less readable).\n    - Note: Running the tests delete and recreate your local database.\n    - Note 2: You must copy your .env file from the `MyVentoryApi` folder to the `MyVentoryApi.Tests` folder.\n\n### CI/CD (app)\n- See the [Deployement](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Infra/) wiki page to understand how the pipeline works.\n\n### CI/CD (backend)\n- Rules: the pipeline is triggered on every push to the **main** branch, except if the changes pushed are only in *.md files.\n- Output:\n    - Backend container image\n\n## 🔗Usefull references\n- [Wiki](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Main/)\n- [Technologies used](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Technologies/)\n- [Infra doc](https://jira.montefiore.ulg.ac.be/xwiki/wiki/team0524/view/Infra/)\n- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)\n- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)\n- [online documentation](https://docs.flutter.dev/), which offers tutorials, samples, guidance on mobile development, and a full API reference.\n\n## ✍️Main contributors\n- Developpement: [Alexandre](alexandre.luzzi@student.uliege.be), [Julien MP](julien.mparirwa@student.uliege.be), [Marzouk](marzouk.ouro-gomma@student.uliege.be)\n- CRUD API: [Simon](s.gardier@student.uliege.be), [Dario](dario.rinallo@student.uliege.be)\n- External APIs: [Julien DR](julien.direnzo@student.uliege.be), [Marzouk](marzouk.ouro-gomma@student.uliege.be)\n- DevOps: [Simon](s.gardier@student.uliege.be)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-gardier%2Finventory-flutter-dotnet-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-gardier%2Finventory-flutter-dotnet-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-gardier%2Finventory-flutter-dotnet-app/lists"}