{"id":19509908,"url":"https://github.com/dattali18/windowssystem-frontend","last_synced_at":"2025-09-13T05:33:49.185Z","repository":{"id":228547797,"uuid":"773780720","full_name":"dattali18/WindowsSystem-Frontend","owner":"dattali18","description":"The frontend for the Windows System Project, build in python 3.12 \u0026 PySide6 using the MVC architecture","archived":false,"fork":false,"pushed_at":"2024-05-07T12:29:11.000Z","size":3568,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-29T14:50:36.356Z","etag":null,"topics":["front-end-development","full-stack-development","mvc","pyside6","python3","university-project"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dattali18.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":"2024-03-18T11:42:55.000Z","updated_at":"2024-05-07T12:29:16.000Z","dependencies_parsed_at":"2024-04-14T16:44:08.347Z","dependency_job_id":"510c59b1-dfb0-4c4c-8cf7-be02a5d0bddf","html_url":"https://github.com/dattali18/WindowsSystem-Frontend","commit_stats":null,"previous_names":["dattali18/windowssystem-frontend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dattali18/WindowsSystem-Frontend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FWindowsSystem-Frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FWindowsSystem-Frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FWindowsSystem-Frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FWindowsSystem-Frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dattali18","download_url":"https://codeload.github.com/dattali18/WindowsSystem-Frontend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FWindowsSystem-Frontend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261649856,"owners_count":23189754,"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":["front-end-development","full-stack-development","mvc","pyside6","python3","university-project"],"created_at":"2024-11-10T23:13:52.973Z","updated_at":"2025-06-24T10:09:28.698Z","avatar_url":"https://github.com/dattali18.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media Library Management Application\n\n## Overview\n\nThis document outlines the detailed specifications for building a movies/TV series library management application that integrates with the `OMDb API` and `Imagga AI` image tagging service. The application features a `PyQt6` frontend and an `ASP.NET` backend with a `RESTful API`.\n\n### Links To GitHub Repo\n\n1. Frontend - [WindowsSystem-Frontend](https://github.com/dattali18/WindowsSystem-Frontend)\n2. Backend - [WindowsSystem-Backend](https://github.com/dattali18/WindowsSystem-Backend)\n\n## Diagrams\n\n### Components\n\n```mermaid\n---\ntitle: Component Diagram\n---\ngraph TD\n    subgraph Frontend[\"Frontend (PyQt6)\"]\n\t    Controller[\"Controller\"]\n        View[\"View\"]\n        Model[\"Model\"]\n        Controller \u003c--\u003e View\n        Controller \u003c--\u003e Model\n    end\n\n    subgraph Backend[\"Backend (ASP.NET)\"]\n        API[\"Controllers - REST API\"]\n        BusinessLogic[\"Business Logic Layer\"]\n        DataAccess[\"Data Access Layer\"]\n        Database[\"Database\"]\n        API \u003c--\u003e BusinessLogic\n        BusinessLogic \u003c--\u003e DataAccess\n        DataAccess \u003c--\u003e Database\n    end\n\n    subgraph ExternalServices[\"External Services\"]\n        OMDbAPI[\"OMDb API\"]\n        ImaggaAI[\"Imagga AI Image Tagging\"]\n    end\n\n    BusinessLogic \u003c--\u003e ImaggaAI\n\tOMDbAPI --\u003e BusinessLogic\n    Model \u003c--\u003e API \n\n```\n\n# Frontend - PyQt6\n\nThe frontend is structured according to the Model-View-Controller `MVC` architecture. Here is a brief overview of the components:\n\n### Models Example\n- `MoviesModel`: Responsible for interacting with the backend API to fetch movies data.\n\n```python\nclass LibrariesModel:\n\tdef __init__(self, BASE_URL: str = BASE_URL):\n\t\tself.BASE_URL = BASE_URL\n\n\tdef get_libraries(self) -\u003e Optional[list[GetLibraryDto]]:\n\t\t\"\"\"\n\t\tGET - /api/Libraries/\n\t\t\"\"\"\n\t\turl = f\"{self.BASE_URL}/Libraries\"\t\t\n\t\tresponse = requests.get(url)\n\t\tif response.status_code == 200:\n\t\t\tjson_str = response.text\n\t\t\tjson_obj = json.loads(json_str)\n\t\t\treturn [GetLibraryDto(**obj) for obj in json_obj]\n\t\treturn None\n```\n\n### Views Example\n- `LibrariesView`: Libraries View of the application many widgets and feature.\n\n```python\nclass LibrariesView(QMainWindow):\n\tdef __init__(self) -\u003e None:\n\t\tsuper().__init__()\n\t\tself.setWindowTitle(\"Media Library System\")\n\t\t# open the window at the center of the screen\n\t\tself.setGeometry(0, 0, 1200, 800)\n```\n\n### Controllers Example\n- `LibrariesController`:  the controller for the `LibrariesView`, connect between the `view` and the `model`.\n\n```python\nclass LibrariesController:\n\tdef __init__(self, view: LibrariesView, model: LibrariesModel):\n\t\tself.view = view\n\t\tself.model = model\n```\n\n### Usage\n\n```python\ndef libraries_window() -\u003e None:\n\tapp = QApplication(sys.argv)\n\t\n\tview = LibrariesView()\n\tmodel = LibrariesModel()\n\tcontroller = LibrariesController(view=view, model=model)\n\tcontroller.view.show()\n\t\n\tsys.exit(app.exec())\n\ndef main() -\u003e None:\n\tlibraries_window()\n\t\nif __name__ == \"__main__\":\n\tmain()\n```\n\n## Screen Shot (`Mac OS`)\n\n### Libraries Window\n![Libraries Window](/ScreenShots/libraries_window.png)\n### Library Window\n![Libraries Window](/ScreenShots/library_window.png)\n### Media Window\n![Libraries Window](/ScreenShots/media_window.png)\n### Update Window\n![Libraries Window](/ScreenShots/update_window.png)\n\n\n# Backend - ASP\\.NET\n\nThe backend is responsible for handling the business logic and providing a RESTful API for the frontend to interact with. It consists of the following components:\n\n- **Data Entities**: Movie, TvSeries, and Library entities.\n- **Controllers**: API endpoints for managing movies, TV series, and libraries.\n- **Business Logic Layer**: Handles data processing and interactions with external services.\n- **Data Access Layer**: Manages interactions with the database.\n\n\n## Other Components\n\n- **Database**: The application uses the `DbContext` provided by `ASP.NET` in the `EntityFrameworkCore`, for data storage.\n\n## External Services Integration\n\n- **OMDb API**: Used for searching and retrieving movie/TV series details.\n- **Imagga AI Image Tagging Service**: Used for generating tags for movie/TV series posters based on emotions or other criteria.\n\n## API Endpoints\n\n###  Movies\n- `GET - /api/Movies/` - returns a list of all movies in the database in `GetMovieDto` format\n- `GET - /api/Movies/{id}` - return a movie with id from the database\n- `GET - /api/Movies/search/?s={s}\u0026y={y}` - return a list of `MediaDto` from the `OmdbService`\n- `GET - /api/Movies/search/{imdbID}` - return a movie from the database with the `imdbID`\n- `POST - /api/Movies/?imdbID={imdbID}` - will add a the movie with the `imdbID` into the database (from the `OmdbService`)\n\n### Tv Series\n- `GET - /api/TvSeries/` - returns a list of all series in the database in `GetTvSeriesDto` format\n- `GET - /api/TvSeries/{id}` - return a series with id from the database\n- `GET - /api/TvSeries/search/?s={s}\u0026y={y}` - return a list of `MediaDto` from the `OmdbService`\n- `GET - /api/TvSeries/search/{imdbID}` - return a series from the database with the `imdbID`\n- `POST - /api/TvSeries/?imdbID={imdbID}` - will add a the series with the `imdbID` into the database (from the `OmdbService`)\n\n### Library\n- `GET - /api/Libraries/` - list of all libraries in the database in a `GetLibraryDto` format\n- `GET - /api/Libraries/{id}` - a library in the database with id=id in a `GetLibraryDto` format\n- `GET - /api/Libraries/{id}/movies` - a list of all movies in the library with id=id in a `MediaDto` format\n- `GET - /api/Libraries/{id}/tvseries` - a list of all Tv Series in the library with id=id in a `MediaDto` format\n- `GET - /api/Libraries/search/{name}` - a list of all libraries in the database with name starting with name in a `GetLibraryDto` format\n- `GET - /api/Libraries/search?name={name}\u0026keywords={keywords}` - a list of all libraries in the database with the name and keywords in a `GetLibraryDto` format\n- `POST - /api/Libraries/` - a library object that was created\n- `POST - /api/Libraries/{library_id}/movies?imdbID={imdbID}` - the movie object that was added to the library in `MediaDto` format\n- `POST - /api/Libraries/{library_id}/tvseries?imdbID={imdbID}` - the tv series object that was added to the library in `MediaDto` format\n- `DELETE - /api/Libraries/{library_id}/movies?imdbID={imdbID}` - delete the movie with `imdbID` from the library\n- `DELETE - /api/Libraries/{library_id}/tvseries?imdbID={imdbID}` - delete the series with `imdbID` from the library\n- `PUT - /api/Libraries/{id}` - will update the library according to the json object (`CreateLibraryDto`) in the requests body\n- `DELETE - /api/Libraries/{id}` - will delete the library from the database\n\n## Testing and Quality Assurance\n\n- **Unit Testing**: Guidance and assistance with writing unit tests for the frontend and backend components would be appreciated.\n- **Integration Testing**: Guidance on testing the integration between the frontend, backend, and external services (`OMDb API`, `Imagga AI`) would be beneficial.\n- **Code Quality**: Suggestions on coding standards, linting rules, and code quality metrics to follow would be helpful.\n\n## Installation\n\nTo install the project you'll need to clone both the frontend and the backend repo\n\n```bash\ngit clone https://github.com/dattali18/WindowsSystem-Frontend.git \n```\n\n```bash\ngit clone https://github.com/dattali18/WindowsSystem-Backend.git\n```\n\nactivate the virtual environment of your choice in the frontend and\nthen install all the needed packages using `pip`\n\n```bash\npip install -r requirements.txt\n```\n\n\u003e [!note]\n\u003e you'll might need to use a virtual environment in order to run the `pip` commend.\n\nand in the backend install 3 libraries to run the program:\n\n- `Microsoft.EntityFrameworkCore`\n- `Microsoft.EntityFrameworkCore.SqlServer`\n- `Microsoft.EntityFrameworkCore.Tools`\n\u003e [!note]\n\u003e this is for `Windows` users, for `MacOs` users you'll need to use `SQLite` instead of `SQLServer` and you'll need to install the following libraries:\n- `Microsoft.EntityFrameworkCore.Sqlite`\n\n\n\u003e [!tip]\n\u003e on `MacOs` you can still run the backend using `SQLite` but on `Windows` you'll need to use `SQLServer` to run the backend.\n\u003e use `dotnet add package \u003cpackage_name\u003e` to add the package to the project.\n\u003e then run the migration using `dotnet ef migrations add \u003cmigration_name\u003e` and then `dotnet ef database update` to update the database.\n\u003e then run the project using `dotnet run`\n\n\n## Deployment\n\n- No Deployment, in order to run the project you'll need to install using the instruction above, and then run the backend using `VisualStudio` and then run the frontend using `python` \n\n```bash\npython main.py\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdattali18%2Fwindowssystem-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdattali18%2Fwindowssystem-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdattali18%2Fwindowssystem-frontend/lists"}