{"id":49394725,"url":"https://github.com/ashref-dev/polybest-next-go-project","last_synced_at":"2026-04-28T15:03:00.651Z","repository":{"id":288867659,"uuid":"969398977","full_name":"Ashref-dev/polybest-next-go-project","owner":"Ashref-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-20T04:19:12.000Z","size":668,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T05:19:58.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Ashref-dev.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-04-20T03:57:13.000Z","updated_at":"2025-04-20T04:19:15.000Z","dependencies_parsed_at":"2025-04-20T05:30:14.269Z","dependency_job_id":null,"html_url":"https://github.com/Ashref-dev/polybest-next-go-project","commit_stats":null,"previous_names":["ashref-dev/polybest-next-go-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ashref-dev/polybest-next-go-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fpolybest-next-go-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fpolybest-next-go-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fpolybest-next-go-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fpolybest-next-go-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ashref-dev","download_url":"https://codeload.github.com/Ashref-dev/polybest-next-go-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fpolybest-next-go-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32385943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: 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-04-28T15:02:51.875Z","updated_at":"2026-04-28T15:03:00.638Z","avatar_url":"https://github.com/Ashref-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mini Project - Heterogeneous API Implementation (Content Website)\n\nThis project implements a distributed system featuring REST, GraphQL, and SOAP APIs developed in Go, fronted by a Traefik API Gateway, and consumed by a React frontend application. The entire system is containerized using Docker and orchestrated with Docker Compose.\n\nThis project fulfills the requirements for the Web Services course mini-project (2024-2025).\n\n**Theme:** Content Website (Movies, Series, Anime)\n\n![Screenshot](./img.jpeg)\n\n\n## Architecture\n\nThe system consists of the following components:\n\n1.  **Frontend (`frontend`):** A React application (built with Vite, styled with Tailwind CSS) that serves as the user interface. It interacts with the backend APIs through the gateway.\n2.  **Series API (`services/series-api`):** A RESTful API written in Go (using `net/http` and `gorilla/mux`) to manage TV series data. Listens internally on port `8081`.\n3.  **Anime API (`services/anime-api`):** A GraphQL API written in Go (using `graphql-go`) to manage anime data. Listens internally on port `8082`.\n4.  **Movies API (`services/movies-api`):** A simplified SOAP API written in Go (using `encoding/xml`) to manage movie data. Listens internally on port `8083`.\n5.  **API Gateway (`gateway`):** A Traefik instance acting as a reverse proxy and API gateway. It routes incoming requests from the host machine (port 80) to the appropriate backend service based on URL paths. It also provides a dashboard for monitoring.\n6.  **Docker Compose (`docker-compose.yml`):** Defines and orchestrates all the services, networks, and configurations required to run the entire system.\n\n```mermaid\ngraph TD\n    subgraph \"User's Browser\"\n        A[User @ localhost]\n    end\n\n    subgraph \"Docker Host (Port Mapping)\"\n        B(Traefik Gateway Container)\n        A -- HTTP Request (Port 80) --\u003e B\n    end\n\n    subgraph \"Docker Network (webnet)\"\n        B -- Route based on Path --\u003e C{Routing Logic}\n\n        subgraph \"Frontend Service\"\n            D[\"Frontend Container\\n(Port 3000)\"]\n        end\n        C -- Path: / --\u003e D\n\n        subgraph \"Backend API Services\"\n            E[\"Series API Container\\n(REST - Port 8081)\"]\n            F[\"Anime API Container\\n(GraphQL - Port 8082)\"]\n            G[\"Movies API Container\\n(SOAP - Port 8083)\"]\n        end\n        C -- Path: /api/series --\u003e E\n        C -- Path: /api/anime --\u003e F\n        C -- Path: /api/movies --\u003e G\n\n        D -- API Call --\u003e B\n    end\n\n    style B fill:#000000,stroke:#333,stroke-width:2px\n    style D fill:#000000,stroke:#333,stroke-width:2px\n    style E fill:#000000,stroke:#333,stroke-width:2px\n    style F fill:#000000,stroke:#333,stroke-width:2px\n    style G fill:#000000,stroke:#333,stroke-width:2px\n```\n\n## Prerequisites\n\nBefore running the project, ensure you have the following installed:\n\n*   **Docker:** [Install Docker](https://docs.docker.com/get-docker/)\n*   **Docker Compose:** (Usually included with Docker Desktop) [Install Docker Compose](https://docs.docker.com/compose/install/)\n\n## Running the System\n\n1.  **Clone the repository** (if you haven't already).\n2.  **Navigate to the project root directory** in your terminal.\n3.  **Build and start all services** using Docker Compose:\n    ```bash\n    docker-compose up --build -d\n    ```\n    *   `--build`: Forces Docker Compose to rebuild the images if any code or Dockerfiles have changed.\n    *   `-d`: Runs the containers in detached mode (in the background).\n\n    The first time you run this command, it might take a few minutes to download base images and build the application containers.\n\n## Accessing Services\n\nOnce the containers are running, you can access the different parts of the system:\n\n*   **Frontend Application:** Open your web browser and navigate to:\n    *   `http://localhost` (or `http://localhost:80`)\n\n*   **Traefik Dashboard:** Open your web browser and navigate to:\n    *   `http://localhost:8080`\n\n*   **API Gateway Endpoints:** The backend APIs are accessible through the gateway at the following base paths:\n    *   Series API (REST): `http://localhost/api/series`\n    *   Anime API (GraphQL): `http://localhost/api/anime/graphql`\n    *   Movies API (SOAP): `http://localhost/api/movies/soap`\n\n## API Documentation\n\nDetailed documentation for each API endpoint, including request/response formats and examples, can be found in the [API Documentation](./api_docs.md) file.\n\n## Stopping the System\n\nTo stop and remove all the running containers, network, and volumes defined in the `docker-compose.yml` file, run the following command in the project root directory:\n\n```bash\ndocker-compose down\n```\n\n## Project Structure\n\n```\n.\n├── api_docs.md             # Detailed API documentation\n├── docker-compose.yml      # Docker Compose configuration\n├── frontend/               # React frontend application\n│   ├── Dockerfile\n│   ├── src/\n│   └── ...                 # Other React project files\n├── gateway/                # Traefik configuration\n│   └── traefik.yml         # Traefik static configuration (alternative)\n├── plan.md                 # Project development plan\n├── readme.md               # This file\n└── services/               # Backend Go services\n    ├── anime-api/          # GraphQL Anime API\n    │   ├── Dockerfile\n    │   ├── main.go\n    │   └── ...\n    ├── movies-api/         # SOAP Movies API\n    │   ├── Dockerfile\n    │   ├── main.go\n    │   └── ...\n    └── series-api/         # REST Series API\n        ├── Dockerfile\n        ├── main.go\n        └── ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashref-dev%2Fpolybest-next-go-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashref-dev%2Fpolybest-next-go-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashref-dev%2Fpolybest-next-go-project/lists"}