Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/scripts/generatePatchFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ steps:
- update:
properties:
"dependencies": {
"@searchspring/snap-${args.framework}": "${args.version}",
"@searchspring/snap-${args.framework}-components": "${args.version}"
"@athoscommerce/snap-${args.framework}": "${args.version}",
"@athoscommerce/snap-${args.framework}-components": "${args.version}"
}
`.trim();

Expand Down
5 changes: 4 additions & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

<link rel="icon" href="./athos_favicon.svg">

<script src="https://snapui.searchspring.io/vrntn7/bundle.js" id="searchspring-context"></script>
<script>
window.siteId = 'rr8qg3';
</script>
<script src="https://snapui.athoscommerce.io/rr8qg3/bundle.js" id="athos-context"></script>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Citizen Code of Conduct

Reference Searchspring's community [CODE_OF_CONDUCT.md](https://github.com/searchspring/community/blob/main/CODE_OF_CONDUCT.md)
Reference Athos's community [CODE_OF_CONDUCT.md](https://github.com/searchspring/community/blob/main/CODE_OF_CONDUCT.md)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

Reference Searchspring's community [CONTRIBUTING.md](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md)
Reference Athos's community [CONTRIBUTING.md](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Searchspring
Copyright (c) 2022 Athos Commerce

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Snap 1.0

Welcome to Snap - Searchspring's SDK for integrating into front end web apps. We invite your participation through issues, discussions and pull requests! Please reference Searchspring's [Community Contribution Guidelines](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md).
Welcome to Snap - Athos Commerce's SDK for integrating into front end web apps. We invite your participation through issues, discussions and pull requests! Please reference Athos's [Community Contribution Guidelines](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md).

Please reference the [Snap Documentation](https://searchspring.github.io/snap/) to get started using Snap to build applications.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Security Policy

Reference Searchspring's community [SECURITY.md](https://github.com/searchspring/community/blob/main/SECURITY.md)
Reference Athos's community [SECURITY.md](https://github.com/searchspring/community/blob/main/SECURITY.md)

14 changes: 7 additions & 7 deletions docs/ABOUT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Snap Documentation

Snap is not an acronym! Snap is an open source SDK for building e-commerce experiences powered by Searchspring.
Snap is not an acronym! Snap is an open source SDK for building e-commerce experiences powered by Athos.

The SDK includes multiple core packages published to npm that in combination with each other, provide the complete front-end tooling for building e-commerce experiences with Searchspring. However to simplify usage, the `@searchspring/snap-preact` package is an abstraction that combines all core packages into a single dependency in combination with Preact to render the UI. This documentation is primarily focused on the usage of this package.
The SDK includes multiple core packages published to npm that in combination with each other, provide the complete front-end tooling for building e-commerce experiences with Athos. However to simplify usage, the `@athoscommerce/snap-preact` package is an abstraction that combines all core packages into a single dependency in combination with Preact to render the UI. This documentation is primarily focused on the usage of this package.

## Getting Started

Expand All @@ -14,23 +14,23 @@ Additionally, the Reference section contains the most comprehensive and technica

### Snap Integration

A "Snap Integration" is a project that uses the `Snap` export from the `@searchspring/snap-preact` package to build a storefront integration. It provides the ability to create multiple controllers, custom plugins, and full custom markup to match the storefront markup and inherit styles. It is the most flexible and powerful way to integrate Searchspring into your storefront.
A "Snap Integration" is a project that uses the `Snap` export from the `@athoscommerce/snap-preact` package to build a storefront integration. It provides the ability to create multiple controllers, custom plugins, and full custom markup to match the storefront markup and inherit styles. It is the most flexible and powerful way to integrate Athos into your storefront.

An example Snap Integration project can be found [here](https://github.com/searchspring-implementations/demo.shopify).

Continue by referencing the [Snap Setup](https://searchspring.github.io/snap/snap-setup) section.

### Snap Templates Integration

A "Snap Templates Integration" is a project that uses the `SnapTemplates` export from the `@searchspring/snap-preact` package to build a storefront integration. It is an abstraction of the `Snap` integration that limits the available configuration and does not provide access to the entire project markup.
A "Snap Templates Integration" is a project that uses the `SnapTemplates` export from the `@athoscommerce/snap-preact` package to build a storefront integration. It is an abstraction of the `Snap` integration that limits the available configuration and does not provide access to the entire project markup.

Instead, it is based on choosing an optimimzed and prebuilt template and theme while only customizing slight layout changes, theme variables, result card markup, and general style declarations. This integration type allows for a rapid integration of Searchspring to your storefront.
Instead, it is based on choosing an optimimzed and prebuilt template and theme while only customizing slight layout changes, theme variables, result card markup, and general style declarations. This integration type allows for a rapid integration of Athos to your storefront.

Continue by referencing the [Snap Templates Integration](https://searchspring.github.io/snap/templates-about) documentation.

### API Integration

An "API Integration" is a project that utilizes the Searchspring APIs directly to integrate into your custom storefront project. Although not required, we recommend using just the `@searchspring/snap-client` package to fetch data from Searchspring APIs.
An "API Integration" is a project that utilizes the Athos APIs directly to integrate into your custom storefront project. Although not required, we recommend using just the `@athoscommerce/snap-client` package to fetch data from Athos APIs.

Continue by referencing the [API Integration](https://searchspring.github.io/snap/snap-client) section.

Expand All @@ -41,4 +41,4 @@ Snap is open source! The repository can be found on [Github](https://github.com/

We invite your participation through Github issues, discussions and pull requests!

Please reference Searchspring's [Community Contribution Guidelines](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md) before contributing.
Please reference Athos's [Community Contribution Guidelines](https://github.com/searchspring/community/blob/main/CONTRIBUTING.md) before contributing.
4 changes: 2 additions & 2 deletions docs/ACCESSIBILITY_STATEMENT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Logo of Searchspring, a division of Athos Commerce](https://raw.githubusercontent.com/searchspring/snap/main/images/division-of-athos.png)
![Logo of Athos](https://raw.githubusercontent.com/searchspring/snap/main/images/division-of-athos.png)

# Accessibility Statement

Searchspring, a division of Athos Commerce, is committed to providing accessible digital experiences for people with disabilities. We are actively working to identify and remove barriers to access in accordance with recognized accessibility standards and our internal [Accessibility Policy](https://athoscommerce.com/wp-content/uploads/2025/06/Athos-Commerce-Accessibility-Policy.pdf).
Athos is committed to providing accessible digital experiences for people with disabilities. We are actively working to identify and remove barriers to access in accordance with recognized accessibility standards and our internal [Accessibility Policy](https://athoscommerce.com/wp-content/uploads/2025/06/Athos-Commerce-Accessibility-Policy.pdf).

## Compliance Status

Expand Down
34 changes: 17 additions & 17 deletions docs/BUILD_DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ To host your own build files follow the below steps in your project.
<!-- TODO: Link to playform specific install docs and update here -->


## Deploy to Searchspring CDN
## Deploy to Athos CDN

**Deploying to Searchspring CDN is only possible if the repository is managed by the Searchspring [Github organization](https://github.com/searchspring-implementations)**. Repositories in this organization are typically managed by the Searchspring professional services team and deployed via a CI/CD pipeline using the [snap-action](https://github.com/searchspring/snap-action) Github Action. An invitation can be requested for collaboration.
**Deploying to Athos CDN is only possible if the repository is managed by the Athos [Github organization](https://github.com/searchspring-implementations)**. Repositories in this organization are typically managed by the Athos professional services team and deployed via a CI/CD pipeline using the [snap-action](https://github.com/searchspring/snap-action) Github Action. An invitation can be requested for collaboration.

Github action runs triggered on the default branch `production` will build and deploy bundle files to this URL:

`https://snapui.searchspring.io/[your_site_id]/bundle.js`
`https://snapui.athoscommerce.io/[your_site_id]/bundle.js`

Builds on different branch names will be deployed to:

`https://snapui.searchspring.io/[your_site_id]/[branch]/bundle.js`
`https://snapui.athoscommerce.io/[your_site_id]/[branch]/bundle.js`

### Github Repository Requirements

- Repository must be managed by the Searchspring [Github organization](https://github.com/searchspring-implementations)
- Repository must be managed by the Athos [Github organization](https://github.com/searchspring-implementations)
- Repository must have a default branch named `production`
- Repository must have repository secrets for each siteId in the repository. Found at `https://github.com/[owner]/[repository]/settings/secrets/actions`
- Secret Key Name: `WEBSITE_SECRET_KEY_[SITEID]` where `[SITEID]` should be replaced with the 6 character alphanumeric siteId found in the [Searchspring Management Console](https://manage.searchspring.net). For example: `WEBSITE_SECRET_KEY_ABC123`
- Value: `secretKey` located adjacent to the siteId in the [Searchspring Management Console](https://manage.searchspring.net)
- Secret Key Name: `WEBSITE_SECRET_KEY_[SITEID]` where `[SITEID]` should be replaced with the 6 character alphanumeric siteId found in the [Athos Search & Product Discovery Console](https://console.athoscommerce.net). For example: `WEBSITE_SECRET_KEY_ABC123`
- Value: `secretKey` located adjacent to the siteId in the [Athos Search & Product Discovery Console](https://console.athoscommerce.net)
- Repository must have a `snap-action` workflow file in the `.github/workflows` directory. See section below.
- Repository must have a `package.json` file that contains all siteIds associated with this project. See section below.

Expand All @@ -65,7 +65,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: searchspring/snap-action
- name: Run @searchspring/snap-action
- name: Run @athoscommerce/snap-action
uses: ./
```

Expand Down Expand Up @@ -110,19 +110,19 @@ Multi siteId example:

### Branch Overrides

This functionality is only currently possible with Searchspring managed Snap repositories (https://github.com/searchspring-implementations).
This functionality is only currently possible with Athos managed Snap repositories (https://github.com/searchspring-implementations).

While browsing a page that contains a Snap integration, appending the `?searchspring-preview=[branchname]` query parameter to the URL will stop the execution of the existing script, and load the build from the `[branchname]` branch `https://snapui.searchspring.io/[siteid]/[branchname]/bundle.js`
While browsing a page that contains a Snap integration, appending the `?athos-preview=[branchname]` query parameter to the URL will stop the execution of the existing script, and load the build from the `[branchname]` branch `https://snapui.athoscommerce.io/[siteid]/[branchname]/bundle.js`

You will see an interface overlay on the bottom right of the viewport indicating if successful and details of the build.

<img src="https://github.com/searchspring/snap/blob/main/images/branch-override.png?raw=true" />

This will also be persisted across page navigation. To stop previewing a branch build, you must click the `Stop Preview` button in the interface or clear the `ssBranch` cookie. The interface can also be minimized.
This will also be persisted across page navigation. To stop previewing a branch build, you must click the `Stop Preview` button in the interface or clear the `athosBranch` cookie. The interface can also be minimized.

## Modern vs Universal Builds

If your project is hosted in Searchspring's Github organization, we'll automatically handle serving the appropriate version of the build files for you. However if you are hosting your own build files, you can either:
If your project is hosted in Athos' Github organization, we'll automatically handle serving the appropriate version of the build files for you. However if you are hosting your own build files, you can either:

- only serve the modern build to all users, however this will break functionallity for IE11.
- change the build targets, although this may impact core web vitals negatively.
Expand All @@ -132,20 +132,20 @@ Always serve the build to modern browsers and the universal build only to legacy

```html
<!-- Modern browsers - use modern build -->
<script src="https://snapui.searchspring.io/[siteId]/bundle.js" id="searchspring-context"></script>
<script src="https://snapui.athoscommerce.io/[siteId]/bundle.js" id="athos-context"></script>

<!-- Legacy browsers - use universal build -->
<script src="https://snapui.searchspring.io/[siteId]/universal.bundle.js" id="searchspring-context"></script>
<script src="https://snapui.athoscommerce.io/[siteId]/universal.bundle.js" id="athos-context"></script>
```

The modern build is used for projects targeting the latest browsers supporting the latest JavaScript features (ES6 and above). Example modern build files: `bundle.js` & `bundle.chunk.[hash].js`

A browser is considered modern based on the [@searchspring/browserslist-config-snap modern](https://github.com/searchspring/browserslist-config-snap/blob/main/modern/index.js) rules and is included in the preconfigured scaffold.
A browser is considered modern based on the [@athoscommerce/browserslist-config-snap modern](https://github.com/searchspring/browserslist-config-snap/blob/main/modern/index.js) rules and is included in the preconfigured scaffold.


The universal build is used for projects targeting legacy browsers and will transpile any usage of modern JavaScript to ES5 as well as polyfill any missing browser features. If you are not targeting legacy browsers, you can omit deploying the universal built files that are prefixed with `universal.` - Example: `universal.bundle.js` and `universal.bundle.chunk.[hash].js`

A browser is considered legacy based on the [@searchspring/browserslist-config-snap universal](https://github.com/searchspring/browserslist-config-snap/blob/main/universal/index.js) rules and is included in the preconfigured scaffold.
A browser is considered legacy based on the [@athoscommerce/browserslist-config-snap universal](https://github.com/searchspring/browserslist-config-snap/blob/main/universal/index.js) rules and is included in the preconfigured scaffold.

However, if you are targeting legacy browsers, it is not recommended to always serve the universal build files to all browsers—including modern browsers—as this will impact Core Web Vitals and performance negatively.

Expand All @@ -168,7 +168,7 @@ module.exports = /((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|

Webpack is the default choice of build tooling that all Snapfu templates include and will be preconfigured.

If you are integrating `@searchspring/snap-preact` using other build tools, you may require certain plugins to ensure preact compatibility.
If you are integrating `@athoscommerce/snap-preact` using other build tools, you may require certain plugins to ensure preact compatibility.

We hope to maintain this page with the most common build tools and their respective plugins as we discover them.

Expand Down
Loading
Loading