{"id":49124219,"url":"https://github.com/creativestyle/shopin","last_synced_at":"2026-04-21T13:34:29.683Z","repository":{"id":345085510,"uuid":"1179033525","full_name":"creativestyle/shopin","owner":"creativestyle","description":"SHOPin frontend accelerator","archived":false,"fork":false,"pushed_at":"2026-04-14T11:44:41.000Z","size":1981,"stargazers_count":3,"open_issues_count":60,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T13:05:53.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.shopin.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativestyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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-03-11T16:09:07.000Z","updated_at":"2026-04-14T11:43:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"296d27c3-9d86-4d1f-ab39-7fb48125f628","html_url":"https://github.com/creativestyle/shopin","commit_stats":null,"previous_names":["creativestyle/shopin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/creativestyle/shopin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fshopin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fshopin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fshopin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fshopin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativestyle","download_url":"https://codeload.github.com/creativestyle/shopin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativestyle%2Fshopin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32094680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-21T13:34:27.641Z","updated_at":"2026-04-21T13:34:29.670Z","avatar_url":"https://github.com/creativestyle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SHOPin storefront accelerator\n\n[![License: OSL-3.0](https://img.shields.io/badge/License-OSL--3.0-blue.svg)](https://opensource.org/licenses/OSL-3.0)\n\nA modular storefront accelerator with a NestJS Backend for Frontend (BFF), Next.js presentation app, and pluggable data sources. Swap e-commerce backends and CMSs via a data-source layer; built for flexibility and type-safe development in a monorepo. **[Turborepo](https://turbo.build/repo)** orchestrates the monorepo: builds, tasks, and caching across all apps and packages.\n\n## Features\n\n- **BFF + storefront** — Clear separation between API gateway (NestJS) and frontend (Next.js App Router). Suits any e-commerce or CMS backend you wire behind the BFF.\n- **Pluggable data sources** — Switch backends (e.g. e-commerce API, mock) and optionally attach a CMS for pages and layout. SHOPin ships with one integration set; you can add or replace integrations.\n- **Turborepo** — [Turborepo](https://turbo.build/repo) orchestrates builds, tasks, and caching across the monorepo. Shared packages for contracts, i18n, config, and tooling.\n- **Demo tooling** — Optional data-source selector and mocked flows for development; safe to remove for production.\n- **Documentation** — [Storybook](apps/storybook/README.md) for UI components, [Typedoc](apps/typedoc/README.md) for API docs.\n\n## Quick start\n\n**Prerequisites:** Node.js ≥ 22.\n\n1. **Clone and install**\n\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd shopin\n   npm ci\n   ```\n\n2. **Environment** — Copy the template and set required values (see [.env.example](.env.example) for descriptions):\n\n   ```bash\n   cp .env.example .env\n   ```\n\n   Minimum for local dev: BFF URLs (with `/bff`), `FRONTEND_URL`, Commercetools credentials, and the four BFF security keys (JWT/CSRF). See the table in [.env.example](.env.example).\n\n3. **Setup and run**\n\n   ```bash\n   npm run setup\n   npm run dev\n   ```\n\n   - **Storefront:** http://localhost:3000\n   - **BFF API:** http://localhost:4000 — Swagger: http://localhost:4000/bff/api\n   - **Storybook:** http://localhost:6006\n   - **Typedoc:** http://localhost:5000\n\n## Project structure\n\n| Area                  | Description                                                                                                               | README                                                                                                                                                                                            |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **apps/bff**          | NestJS BFF (API gateway, auth, cart, content, products).                                                                  | [apps/bff/README.md](apps/bff/README.md)                                                                                                                                                          |\n| **apps/presentation** | Next.js storefront (App Router).                                                                                          | [apps/presentation/README.md](apps/presentation/README.md)                                                                                                                                        |\n| **apps/storybook**    | UI component documentation and playground.                                                                                | [apps/storybook/README.md](apps/storybook/README.md)                                                                                                                                              |\n| **apps/typedoc**      | Generated TypeScript API documentation.                                                                                   | [apps/typedoc/README.md](apps/typedoc/README.md)                                                                                                                                                  |\n| **core/contracts**    | **Shared interfaces, types, and Zod schemas** consumed by apps and integrations (API contracts, request/response shapes). | [core/contracts/README.md](core/contracts/README.md)                                                                                                                                              |\n| **core/** (other)     | i18n, logger, ESLint/Prettier/TypeScript configs.                                                                         | See each package in `core/`                                                                                                                                                                       |\n| **config/constants**  | Shared constants and types (data source, auth, i18n).                                                                     | [config/constants/README.md](config/constants/README.md)                                                                                                                                          |\n| **integrations/**     | Data sources: mock-api, commercetools-api, commercetools-auth, contentful-api, contentful-migration.                      | [contentful-api](integrations/contentful-api/README.md), [contentful-migration](integrations/contentful-migration/README.md), [commercetools-api](integrations/commercetools-api/README.md), etc. |\n| **demo/**             | Optional demo packages (data-source selector, mocked payment). Can be removed for production.                             | [demo/README.md](demo/README.md)                                                                                                                                                                  |\n\n## Scripts\n\n| Script                       | Description                                                            |\n| ---------------------------- | ---------------------------------------------------------------------- |\n| `npm run setup`              | Build core packages and prepare the monorepo.                          |\n| `npm run dev`                | Start all development servers (presentation, BFF, Storybook, Typedoc). |\n| `npm run build`              | Production build for apps.                                             |\n| `npm run test`               | Run tests.                                                             |\n| `npm run lint`               | Lint the codebase.                                                     |\n| `npm run format`             | Format the codebase.                                                   |\n| `npm run check-types`        | Type-check TypeScript.                                                 |\n| `npm run check-dependencies` | `npm audit --audit-level=high`.                                        |\n| `npm run start:local`        | Run production builds locally (run `npm run build` first).             |\n\n**Contentful migrations** — Run from the package: `npm run migrate -w @integrations/contentful-migration --` (from root) or `npm run migrate --` from [integrations/contentful-migration](integrations/contentful-migration/README.md). See that README for subcommands.\n\n## How integrations work\n\nThe architecture aims to keep **core, BFF, and presentation as platform-agnostic as possible**. Only the **integrations** (in `integrations/`) hold platform-specific logic and data; they talk to a given e-commerce API, CMS, or mock, and **map** that data into the shared, agnostic types from [core/contracts](core/contracts/README.md). Each integration implements the same contract interfaces: it fetches or writes in the backend’s format, then returns or accepts the shared types (Zod schemas and TypeScript types). The BFF chooses which integration to use per request (data source) and exposes a **single API** to the frontend. The **presentation** app only talks to the BFF and stays agnostic of the backend. To add a new backend: implement an integration that fulfils the contract, register it in the BFF’s data-source layer ([apps/bff/README.md](apps/bff/README.md)), and extend contracts only if the domain requires it.\n\n## Documentation and community\n\n- **[CONTRIBUTING.md](CONTRIBUTING.md)** — How to set up for development and submit changes.\n- **[SECURITY.md](SECURITY.md)** — How to report vulnerabilities and what not to commit.\n- **License** — [OSL-3.0](LICENSE). See [LICENSE](LICENSE) for the full text.\n\n---\n\nBrought to life by\u003cbr/\u003e\n\u003ca href=\"https://creativestyle.de\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./images/cs_logo_dark.png\"\u003e\n      \u003cimg src=\"./images/cs_logo_light.png\" width=\"211px\"\u003e\n    \u003c/picture\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativestyle%2Fshopin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativestyle%2Fshopin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativestyle%2Fshopin/lists"}