{"id":50715233,"url":"https://github.com/nhassl3/servicehub-frontend","last_synced_at":"2026-06-09T18:32:15.878Z","repository":{"id":343706157,"uuid":"1166570305","full_name":"nhassl3/servicehub-frontend","owner":"nhassl3","description":"React + TypeScript + Vite frontend for the ServiceHub digital marketplace. Dockerized with Nginx, connects to a Go/gRPC backend.","archived":false,"fork":false,"pushed_at":"2026-04-02T13:19:33.000Z","size":138,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T02:32:22.609Z","etag":null,"topics":["dockerfile","frontend","marketplace","nginx","react","typescript","vite"],"latest_commit_sha":null,"homepage":"http://6892769-yf058657.twc1.net/","language":"TypeScript","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/nhassl3.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-02-25T11:13:34.000Z","updated_at":"2026-04-02T13:17:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nhassl3/servicehub-frontend","commit_stats":null,"previous_names":["nhassl3/servicehub-frontend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nhassl3/servicehub-frontend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhassl3%2Fservicehub-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhassl3%2Fservicehub-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhassl3%2Fservicehub-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhassl3%2Fservicehub-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhassl3","download_url":"https://codeload.github.com/nhassl3/servicehub-frontend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhassl3%2Fservicehub-frontend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34121021,"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":["dockerfile","frontend","marketplace","nginx","react","typescript","vite"],"created_at":"2026-06-09T18:32:15.394Z","updated_at":"2026-06-09T18:32:15.873Z","avatar_url":"https://github.com/nhassl3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ServiceHub — Frontend\n\nReact + TypeScript frontend for the ServiceHub digital marketplace platform.\n\n## Tech Stack\n\n- **React 19** + **TypeScript**\n- **Vite 7** — build tool with HMR\n- **React Router 7** — client-side routing\n- **Axios** — HTTP client\n- **React Icons** — icon library\n- **ESLint** — linting\n- **Docker** — containerized with Nginx 1.27 (alpine)\n\n## Project Structure\n\n```\nsrc/\n├── api/          # Axios API clients (auth, products, cart, orders, etc.)\n├── components/   # Reusable UI components (layout, product cards)\n├── context/      # React contexts (AuthContext, CartContext)\n├── hooks/        # Custom hooks (useDebounce)\n├── pages/        # Page-level components\n├── store/        # Token storage utilities\n├── styles/       # Global CSS (reset, variables, globals)\n└── types/        # Shared TypeScript interfaces\n```\n\n## Pages\n\n| Route | Access | Description |\n|---|---|---|\n| `/` | Public | Home page |\n| `/catalog` | Public | Product catalog with filters |\n| `/products/:id` | Public | Product detail \u0026 reviews |\n| `/sellers/:username` | Public | Seller public profile |\n| `/login` | Guest only | Login |\n| `/register` | Guest only | Registration |\n| `/cart` | Auth | Shopping cart |\n| `/orders` | Auth | Order history |\n| `/orders/:id` | Auth | Order detail |\n| `/wishlist` | Auth | Saved products |\n| `/balance` | Auth | Balance \u0026 transactions |\n| `/profile` | Auth | User profile settings |\n| `/sellers/create` | Auth | Become a seller |\n| `/seller/dashboard` | Auth | Seller dashboard |\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 22+\n- npm\n\n### Local Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Copy env file\ncp .env.example .env\n# Set VITE_API_URL to your backend address\n\n# Start dev server\nnpm run dev\n```\n\nThe app will be available at `http://localhost:5173`.\n\n### Build\n\n```bash\nnpm run build\n```\n\nOutput is placed in `dist/`.\n\n### Lint\n\n```bash\nnpm run lint\n```\n\n## Environment Variables\n\n| Variable | Description | Default |\n|---|---|---|\n| `VITE_API_URL` | Backend base URL | `http://localhost:8080` |\n\nCreate a `.env` file in the project root:\n\n```env\nVITE_API_URL=http://localhost:8080\n```\n\n## Docker\n\n### Build image\n\n```bash\ndocker build \\\n  --build-arg VITE_API_URL=http://localhost:8080 \\\n  -t servicehub-frontend .\n```\n\n### Run container\n\n```bash\ndocker run -p 80:80 servicehub-frontend\n```\n\nThe Dockerfile uses a multi-stage build:\n1. **Builder** — Node 22 alpine, runs `npm ci` and `npm run build`\n2. **Runtime** — Nginx 1.27 alpine serves the static `dist/` output\n\nNginx is configured with:\n- SPA fallback (`try_files` → `index.html`)\n- API reverse proxy (`/api/` → `backend:8080`)\n- Static asset caching (30 days)\n- Gzip compression\n- Security headers (X-Frame-Options, X-Content-Type-Options, XSS-Protection)\n\n## Part of ServiceHub\n\nThis repository is the frontend service of the ServiceHub platform.\nThe full stack includes:\n\n- **[servicehub-backend](https://github.com/your-org/servicehub-backend)** — Golang + gRPC + REST gateway\n- **[servicehub-frontend](https://github.com/your-org/servicehub-frontend)** — this repository\n- PostgreSQL 18 (alpine) as the database\n- Deployed via Docker Compose + GitHub Actions CI/CD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhassl3%2Fservicehub-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhassl3%2Fservicehub-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhassl3%2Fservicehub-frontend/lists"}