{"id":22727804,"url":"https://github.com/pagopa/io-web-profile","last_synced_at":"2026-01-08T13:18:23.345Z","repository":{"id":180613587,"uuid":"665008717","full_name":"pagopa/io-web-profile","owner":"pagopa","description":"ioapp.it web portal","archived":false,"fork":false,"pushed_at":"2025-07-22T14:20:50.000Z","size":2694,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-22T16:16:02.233Z","etag":null,"topics":["io","ioapp","it-web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pagopa.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-11T08:34:17.000Z","updated_at":"2025-07-22T14:20:53.000Z","dependencies_parsed_at":"2023-10-25T09:48:00.747Z","dependency_job_id":"4322ccff-18f8-4630-b39c-c968bd0cceca","html_url":"https://github.com/pagopa/io-web-profile","commit_stats":null,"previous_names":["pagopa/io-web-profile"],"tags_count":98,"template":false,"template_full_name":null,"purl":"pkg:github/pagopa/io-web-profile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagopa%2Fio-web-profile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagopa%2Fio-web-profile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagopa%2Fio-web-profile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagopa%2Fio-web-profile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pagopa","download_url":"https://codeload.github.com/pagopa/io-web-profile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagopa%2Fio-web-profile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268859123,"owners_count":24318874,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"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":["io","ioapp","it-web"],"created_at":"2024-12-10T17:13:41.564Z","updated_at":"2026-01-08T13:18:23.333Z","avatar_url":"https://github.com/pagopa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# io-web-profile\n\n**`io-web-profile`** is the web application that allows citizens to log out of their session on the IO App.  \nThis repository contains the full source code of the front-end project.\n\n---\n\n## 📦 Technologies\n\nThis project uses:\n\n- TypeScript\n- React\n- Next.js 14 (App Router)\n\n---\n\n## 📋 Prerequisites\n\nBefore you start, ensure your machine has:\n\n- **Node.js** v20.12.0\n- **Yarn** v1.22\n\nYou can use `nodenv` to manage Node versions and `corepack` (included with Node) to manage Yarn.\n\n---\n\n## 💻 Configurations\n\nThere are **three different ways** to run the app, depending on your needs and environment.\n\n\n### 1. 🧪 Local Login Flow — Using `hub-spid-login` + Mock Backend (Mockoon)\n\nThis is the most complete local setup, simulating both authentication and backend services:\n\n#### ➤ Setup `hub-spid-login`\n\nFollow the official [`hub-spid-login-ms`](https://github.com/pagopa/hub-spid-login-ms) documentation and configure the following variables in its `.env` file:\n\n```env\nENDPOINT_ERROR=http://localhost:3000/accedi/errore\nENDPOINT_SUCCESS=http://localhost:3000/it/accedi/\nENABLE_JWT=true\n```\n\n#### ➤ Setup `io-web-profile` `.env.local`\n\n```env\nNEXT_PUBLIC_URL_SPID_LOGIN=http://localhost:9090/login\nNEXT_PUBLIC_API_BASE_URL=http://localhost:7071\nNEXT_PUBLIC_WALLET_API_BASE_URL=http://localhost:7071\nNEXT_PUBLIC_DEV_MODE=true\n```\n\n#### ➤ Start Mockoon\n\n1. Install [Mockoon](https://mockoon.com/download/)\n2. Open the app and load `mock/mockoon_api.json`\n3. Click the ▶ icon to start the mock server\n\n\n### 2. 🔗 Real Backend — Using `hub-spid-login` + Production APIs\n\nThis setup allows you to test the real login flow and real backend services, while still using the local login proxy.\n\n#### ➤ Setup `hub-spid-login`\n\nSame as above:\n\n```env\nENDPOINT_ERROR=http://localhost:3000/accedi/errore\nENDPOINT_SUCCESS=http://localhost:3000/it/accedi/\nENABLE_JWT=true\n```\n\n#### ➤ Setup `io-web-profile` `.env.local`\n\n```env\nNEXT_PUBLIC_URL_SPID_LOGIN=http://localhost:9090/login\nNEXT_PUBLIC_API_BASE_URL=https://api-web.io.pagopa.it/ioweb/backend\nNEXT_PUBLIC_WALLET_API_BASE_URL=https://api-web.io.pagopa.it/ioweb/wallet\nNEXT_PUBLIC_DEV_MODE=true\n```\n\n\n### 3. 💻 Fully Local — Mockoon Only (No `hub-spid-login`)\n\nIf you're working purely on the UI and don't need a real login flow, you can run everything locally with just Mockoon:\n\n#### ➤ Setup `io-web-profile` `.env.local`\n\n```env\nNEXT_PUBLIC_URL_SPID_LOGIN=http://localhost:7071/login\nNEXT_PUBLIC_API_BASE_URL=http://localhost:7071\nNEXT_PUBLIC_WALLET_API_BASE_URL=http://localhost:7071\nNEXT_PUBLIC_DEV_MODE=true\n```\n\nNo need to run `hub-spid-login` in this case.\n\n---\n\n## 🪄 Magic Link\n\nIn order to test magic link flow you can use [this link](http://localhost:3000/it/blocco-accesso/magic-link/#token=jwetoken)\n\n---\n\n## ✉️ Email Validation Flow (Optional)\n\n\u003e [!Note]\n\u003e This feature is only in local environment (not yet in production)\n\nTo enable the email confirmation flow, add this to your `.env.local`:\n\n```env\nNEXT_PUBLIC_VALIDATION_EMAIL=true\n```\n\nThis activates the `/conferma-email` routes used to validate user email addresses.\n\nIn order to test email validation flow you can use these test cases with Mockoon:\n\n#### Test Cases for Email Validation\n\n\u003e [!Important]\n\u003e Make sure Mockoon is running on port 7071 with the `mock/mockoon_api.json` configuration\n\n| **Scenario** | **URL** | **Expected Behavior** | **Response** |\n|--------------|---------|----------------------|---------------|\n| ✅ **Success Case** | [Valid Token Test](http://localhost:3000/it/conferma-email/?token=valid-token-123) or [this link](http://localhost:3000/it/conferma-email/?token=05QSY3JXN8XF47LTKRW9EMHZBX:179aeae8dcc01abdab31e5ba) | Shows email confirmation page, then allows validation |` HTTP 200: {\"status\": \"SUCCESS\", \"profile_email\": \"example@example.com\"} ` |\n| ❌ **Token Expired** | [Expired Token Test](http://localhost:3000/it/conferma-email/?token=expired-token-456) | Redirects to `/conferma-email/link-scaduto/` (Link Expired page) |` HTTP 200: {\"status\": \"FAILURE\", \"reason\": \"TOKEN_EXPIRED\"} ` |\n| ❌ **Email Already Taken** | [Email Taken Test](http://localhost:3000/it/conferma-email/?token=email-taken-789) | Redirects to `/conferma-email/email-gia-confermata/` (Email Already Confirmed page) |` HTTP 200: {\"status\": \"FAILURE\", \"reason\": \"EMAIL_ALREADY_TAKEN\"} ` |\n\n#### Mockoon API Response Details\n\nThe mock server returns **HTTP 200** responses with different content based on token:\n\n**GET `/public/api/v2/validate-profile-email`** (Token Info):\n```bash\n# Success Response (token: valid-token-123)\nHTTP 200: {\"profile_email\": \"example@example.com\", \"status\": \"SUCCESS\"}\n\n# Token Expired Response (token: expired-token-456) \nHTTP 200: {\"status\": \"FAILURE\", \"reason\": \"TOKEN_EXPIRED\"}\n\n# Email Taken Response (token: email-taken-789)\nHTTP 200: {\"status\": \"FAILURE\", \"reason\": \"EMAIL_ALREADY_TAKEN\"}\n```\n\n**POST `/public/api/v2/validate-profile-email`** (Email Validation):\n```bash\n# Success Response (body contains: \"valid-token-123\")\nHTTP 200: {\"status\": \"SUCCESS\"}\n\n# Token Expired Response (body contains: \"expired-token-456\")\nHTTP 200: {\"status\": \"FAILURE\", \"reason\": \"TOKEN_EXPIRED\"}\n\n# Email Taken Response (body contains: \"email-taken-789\") \nHTTP 200: {\"status\": \"FAILURE\", \"reason\": \"EMAIL_ALREADY_TAKEN\"}\n```\n\n#### Bug Testing\n\nThis setup allows you to test the **fixed behavior** where HTTP 200 responses with `status: \"FAILURE\"` are correctly handled as errors by the frontend, instead of being treated as successful responses.\n\n---\n\n## 🛠️ Installation\n\nFrom the project root:\n\n```bash\n# Install dependencies\nyarn install\n\n# Generate API clients and types\nyarn generate\n```\n\n---\n\n## ▶️ Running the App\n\nAfter setting up `.env.local`, you can run the app in different modes.\n\n\u003e [!Note]\n\u003e Remember not to push these configurations in .env.local file\n\n### Development Mode\n\n```bash\nyarn dev\n```\n\nThen open [http://localhost:3000](http://localhost:3000)\n\n### Production Build\n\n```bash\nyarn build:prod\nyarn start-static\n```\n\nThe static version will be served at [http://localhost:3000](http://localhost:3000)\n\n---\n\n## 📁 Project Structure\n\n```\nio-web-profile/\n├── mock/             → Mockoon environments and local mocks\n├── openApi/          → OpenAPI specs for API clients\n├── public/           → Static assets (SPID/CIE metadata, OneTrust, etc.)\n├── src/\n│   ├── api/          → Auto-generated API clients\n│   ├── dictionaries/ → Localization dictionaries\n│   ├── app/[locale]/\n│   │   ├── (pages)/      → Application routes\n│   │   ├── _component/   → Shared UI components\n│   │   ├── _enums/       → Enums and constants\n│   │   ├── _hooks/       → Custom React hooks\n│   │   ├── _icons/       → Project icons\n│   │   ├── _model/       → Data models and types\n│   │   ├── _redux/       → Redux state and logic\n│   │   └── _utils/       → Utility functions\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagopa%2Fio-web-profile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpagopa%2Fio-web-profile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagopa%2Fio-web-profile/lists"}