{"id":50721716,"url":"https://github.com/cloudsteak/trn-gcp-ai-virtual-tryon","last_synced_at":"2026-06-10T00:30:51.300Z","repository":{"id":356619485,"uuid":"1231320090","full_name":"cloudsteak/trn-gcp-ai-virtual-tryon","owner":"cloudsteak","description":"Google AI Virtual TryOn","archived":false,"fork":false,"pushed_at":"2026-05-08T21:49:18.000Z","size":1858,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T23:33:38.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cloudsteak.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T21:10:03.000Z","updated_at":"2026-05-08T21:49:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cloudsteak/trn-gcp-ai-virtual-tryon","commit_stats":null,"previous_names":["cloudsteak/trn-gcp-ai-virtual-tryon"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cloudsteak/trn-gcp-ai-virtual-tryon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Ftrn-gcp-ai-virtual-tryon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Ftrn-gcp-ai-virtual-tryon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Ftrn-gcp-ai-virtual-tryon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Ftrn-gcp-ai-virtual-tryon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudsteak","download_url":"https://codeload.github.com/cloudsteak/trn-gcp-ai-virtual-tryon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Ftrn-gcp-ai-virtual-tryon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2026-06-10T00:30:50.503Z","updated_at":"2026-06-10T00:30:51.287Z","avatar_url":"https://github.com/cloudsteak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtuális Próbafülke – GCP AI Demo\n\n## Mi ez az alkalmazás?\n\nEz egy demo alkalmazás, amellyel kipróbálhatod, hogyan néznél ki különböző ruhákban – anélkül, hogy fel kellene próbálnod. Feltöltöd a saját képedet és a ruhadarabokat (felső, nadrág, lábeli), az AI pedig megmutatja, hogyan néznének ki rajtad. A varázslatot a Google Agent Platform `virtual-try-on-001` modellje végzi.\n\n---\n\n## Hogyan működik?\n\n1. **Feltöltöd a képeket** – bal oldalra a saját fotód, jobb oldalra a ruhadarabok (felső, nadrág, lábeli).\n2. **Az AI dolgozik** – a „Próbáld fel!\" gombra kattintva a szerver egymás után küldi el a ruhadarabokat a Google AI-nak; minden körben az előző eredménykép lesz az új alap.\n3. **Megjelenik az eredmény** – néhány másodpercen belül látod, hogyan állnak rajtad a ruhák.\n\n---\n\n## Előfeltételek\n\n- Google Cloud Platform (GCP) projekt\n- Agent Platform API engedélyezve a projektben (`aiplatform.googleapis.com`)\n- `gcloud` CLI telepítve (lásd lent)\n- Node.js 22 vagy 24 és Python 3.12+ telepítve helyileg\n- `uv` Python csomagkezelő (`pip install uv`)\n\n---\n\n## A gcloud CLI telepítése\n\n### Windows\n\n1. Töltsd le a telepítőt: [https://cloud.google.com/sdk/docs/install#windows](https://cloud.google.com/sdk/docs/install#windows)\n2. Futtasd a `.exe` telepítőt, kövesd a lépéseket\n3. A telepítő végén indítsd el a `gcloud init` parancsot az inicializáláshoz\n\nVagy PowerShell-lel:\n```powershell\n(New-Object Net.WebClient).DownloadFile(\"https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe\", \"$env:Temp\\GoogleCloudSDKInstaller.exe\")\n\u0026 $env:Temp\\GoogleCloudSDKInstaller.exe\n```\n\n### macOS\n\nHomebrew-val (ajánlott):\n```bash\nbrew install --cask google-cloud-sdk\n```\n\nVagy manuálisan:\n```bash\ncurl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-x86_64.tar.gz\ntar -xf google-cloud-cli-darwin-x86_64.tar.gz\n./google-cloud-sdk/install.sh\n```\n\n### Linux\n\n```bash\ncurl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz\ntar -xf google-cloud-cli-linux-x86_64.tar.gz\n./google-cloud-sdk/install.sh\nsource ~/.bashrc\n```\n\n### Telepítés után (minden platformon)\n\n```bash\ngcloud init\n```\n\n---\n\n## Lokális futtatás lépésről lépésre\n\n### 1. Google Cloud bejelentkezés\n\nA szerver ADC (Application Default Credentials) autentikációt használ – a gépeden tárolt bejelentkezési tokened alapján hitelesíti magát. A `GCP_PROJECT_ID` megmondja, melyik projektbe küldje a kéréseket – önmagában nem jelent hozzáférést.\n\n```bash\ngcloud auth login\ngcloud config set project PROJECT_ID\ngcloud auth application-default login\n```\n\nEzeket csak egyszer kell futtatni. Cloud Run-on ezt a Service Account végzi automatikusan.\n\n### 2. Backend (server)\n\n```bash\ncd server\n\n# Függőségek telepítése uv-vel\nuv sync\n\n# Környezeti változók beállítása\ncp .env.example .env\n# Szerkeszd a .env fájlt: add meg a GCP_PROJECT_ID értékét\n\n# Szerver indítása\nuv run uvicorn virtual_tryon.main:app --host 0.0.0.0 --port 8000 --reload --env-file .env\n```\n\n### 3. Frontend (client)\n\n```bash\ncd client\n\n# Függőségek telepítése\nnpm install\n\n# Fejlesztői szerver indítása\nnpm run dev\n```\n\nNyisd meg a böngészőben: [http://localhost:5173](http://localhost:5173)\n\n---\n\n## Repo struktúra\n\n```\ntrn-gcp-ai-virtual-tryon/\n├── client/                          # Cloud Run #1 – React frontend\n│   ├── src/\n│   │   ├── components/\n│   │   │   ├── ImageUploader.jsx    # Kép feltöltő komponens\n│   │   │   └── ResultDisplay.jsx    # Eredmény megjelenítő komponens\n│   │   ├── App.jsx                  # Fő alkalmazás komponens\n│   │   └── main.jsx                 # Belépési pont\n│   ├── vite.config.js               # Vite konfiguráció + API proxy\n│   ├── Dockerfile                   # Nginx + React build\n│   └── nginx.conf                   # Nginx konfiguráció\n│\n├── server/                          # Cloud Run #2 – Python FastAPI backend\n│   ├── src/\n│   │   └── virtual_tryon/\n│   │       ├── config.py            # Környezeti változók\n│   │       ├── main.py              # FastAPI app és endpoint\n│   │       └── agent_platform.py   # Agent Platform API hívás\n│   ├── pyproject.toml               # uv csomagkezelő konfiguráció\n│   └── Dockerfile                   # Python Cloud Run konténer\n│\n└── test_images/                     # Demo képek a képzéshez\n    ├── persons/                     # Személy fotók (ferfi_1.jpg, no_1.jpg, ...)\n    └── dress/                       # Ruhadarabok (ing, nadrág, cipő, ...)\n```\n\n---\n\n## Környezeti változók\n\n### Server (`server/.env`)\n\n| Változó | Leírás | Alapértelmezett |\n|---|---|---|\n| `GCP_PROJECT_ID` | GCP projekt azonosító | – |\n| `GOOGLE_CLOUD_LOCATION` | GCP régió | `europe-west1` |\n| `ALLOWED_ORIGIN` | Frontend URL (CORS) | `http://localhost:5173` |\n| `MODEL_NAME` | Vertex AI modell neve | `virtual-try-on-001` |\n\n### Client (`client/.env`)\n\n| Változó | Leírás | Alapértelmezett |\n|---|---|---|\n| `VITE_API_URL` | Backend URL | _(üres, proxy használ)_ |\n\n---\n\n## Cloud Run deployment lépésről lépésre\n\n### Backend deploy\n\n```bash\ncd server\n\n# Project ID és egyéb környezeti változók beállítása a build során\nexport GCP_PROJECT_ID=YOUR_PROJECT_ID\nexport ALLOWED_ORIGIN=https://YOUR_CLIENT_URL\n\n# Docker image build és push\ngcloud builds submit --tag gcr.io/$GCP_PROJECT_ID/virtual-tryon-server\n\n# Cloud Run service létrehozása\ngcloud run deploy virtual-tryon-server \\\n  --image gcr.io/$GCP_PROJECT_ID/virtual-tryon-server \\\n  --platform managed \\\n  --region europe-west1 \\\n  --allow-unauthenticated \\\n  --set-env-vars GCP_PROJECT_ID=$GCP_PROJECT_ID,ALLOWED_ORIGIN=$ALLOWED_ORIGIN\n```\n\n### Frontend deploy\n\n```bash\ncd client\n\n# Project ID és egyéb környezeti változók beállítása a build során\nexport GCP_PROJECT_ID=YOUR_PROJECT_ID\nexport VITE_API_URL=https://YOUR_SERVER_URL\n\n# Docker image build és push\ngcloud builds submit --tag gcr.io/$GCP_PROJECT_ID/virtual-tryon-client\n\n# Cloud Run service létrehozása\ngcloud run deploy virtual-tryon-client \\\n  --image gcr.io/$GCP_PROJECT_ID/virtual-tryon-client \\\n  --platform managed \\\n  --region europe-west1 \\\n  --allow-unauthenticated \\\n  --set-env-vars VITE_API_URL=$VITE_API_URL\n```\n\n---\n\n## A „törött\" állapotról\n\nAz alkalmazás alapállapotban szándékosan nem működik teljesen: a `server/.env` fájlban a `GCP_PROJECT_ID` értéke üresen van hagyva – ezt a képzésen töltjük ki együtt a résztvevőkkel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Ftrn-gcp-ai-virtual-tryon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudsteak%2Ftrn-gcp-ai-virtual-tryon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Ftrn-gcp-ai-virtual-tryon/lists"}