saleor-apps-redis_apl/apps/products-feed
Lukasz Ostrowski 70cb741f88
CMS App v2 (#721)
* initial setup

* GRaphql setup

* [skip ci]

* Manifest and register endpoints

* Add config schemas

* contentful client

* contentful client

* [skip ci] trpc setup

* metadata manager and contentful router

* Configuration config

* contentful config - adding providers

* add provider page

* wip contentful form

* contentful form

* list providrs

* edit contentful form

* [skip ci]

* [skip ci] replace contentful sdk

* replace contentful lib

* Delete contetnful provider feature

* variant created webhook draft

* channel provider connection model

* Channel connections ui

* adding new connection

* connections ui (adding)

* [skip ci] wip edit conn

* removing connection

* rebuild modal

* refactor providers

* implement update product webhook

* add deleting product

* [skip ci] wip

* refactor contentful router

* refactor wip

* refactor config

* webhooks processor

* webhook delegations

* bulk sync section

* bulk sync page

* gql for imports

* [skip ci] bulk import contentful

* temp variant sync list with rate limiters

* wip

* wip

* wip

* new frontend for uploading

* update zod

* print config keys

* wip

* [skip ci] datocms init

* dato add provdier page

* dato form skeleton

* dato  display content type select

* full dato form

* ButtonsBox extraction

* edit dato config form

* update product in dato

* [skip ci]

* extract bulk sync processor

* dato bulk update

* [skip ci] product updated webhook

* product webhook

* crud operations router

* update cruds

* refactor webhook operations

* refactors

* refactors

* helper texts

* [skip ci] deps

* Init

* fix macaw icon

* unify app skd

* unify nextjs

* strapi setup

* fix strapi types

* strapi upload product

* strapi delete product

* strapi product updated webhook

* processor for bulk sync strapi

* shared add provider page

* refactors

* refactors

* wrap providers into folder

* refactors

* refactors

* refactors

* pnpm lock

* add logs

* name configuration mapping name

* form configurable side notes

* remove commentns

* wip providers resolver working

* central config for providers resolving

* tests wip

* remove vscode condig

* cleanup

* provider meta extract

* some tests for contentufl

* contentful client test

* more tests for contentful

* strapi helper texts

* builderio setup

* builderio form

* builderio client draft

* validate connection modal

* Add sending product to builderio

* rename builder field

* add public api key for read access

* update products

* Builder.io - bulk sync

* Fix manifest

* cr fixes

* Make strapi to work with multiple products

* Github actions
2023-07-18 10:19:21 +02:00
..
graphql 🔥 Product Feed - New macaw & production prep (#512) 2023-06-01 13:33:07 +02:00
public Add logo to apps (#552) 2023-06-14 16:05:36 +02:00
src Update tRPC and React-query (#748) 2023-07-11 21:32:58 +02:00
.env.example Update menifests to reflect dynamic urls from env (#695) 2023-07-03 11:57:50 +02:00
.eslintrc Add products feed app (#161) 2023-02-17 14:27:43 +01:00
.gitignore Sentry missing config (#481) 2023-05-21 18:28:17 +02:00
.graphqlrc.yml Unify urql version, use shared util to create client (#657) 2023-06-19 15:59:27 +02:00
CHANGELOG.md Release apps (#690) 2023-07-10 11:38:52 +02:00
next-env.d.ts Add products feed app (#161) 2023-02-17 14:27:43 +01:00
next.config.js Sentry improvements (#652) 2023-06-20 10:06:18 +02:00
package.json CMS App v2 (#721) 2023-07-18 10:19:21 +02:00
README.md Add cache to products feed (#327) 2023-03-27 15:49:55 +02:00
sentry.client.config.ts Sentry improvements (#652) 2023-06-20 10:06:18 +02:00
sentry.edge.config.ts Sentry improvements (#652) 2023-06-20 10:06:18 +02:00
sentry.server.config.ts Sentry improvements (#652) 2023-06-20 10:06:18 +02:00
tsconfig.json Add products feed app (#161) 2023-02-17 14:27:43 +01:00
turbo.json Update menifests to reflect dynamic urls from env (#695) 2023-07-03 11:57:50 +02:00
vitest.config.ts Add products feed app (#161) 2023-02-17 14:27:43 +01:00

Products feed

Share products data with the feed aggregators

About Saleor Invoices app

  • Create Google Merchant Feed XML

Development

Requirements

Before you start, make sure you have installed:

With CLI

The easiest way to set up a Saleor app is by using the Saleor CLI.

Saleor CLI is designed to save you from the repetitive chores around Saleor development, including creating Apps. It will take the burden of spawning new apps locally, connecting them with Saleor environments, and establishing a tunnel for local development in seconds.

Full Saleor CLI reference

If you don't have a (free developer) Saleor Cloud account, create one with the following command:

saleor register

Now you're ready to create your first App:

saleor app create [your-app-name]

In this step, Saleor CLI will:

  • clone this repository to the specified folder
  • install dependencies
  • ask you whether you'd like to install the app in the selected Saleor environment
  • create .env file
  • start the app in development mode

Having your app ready, the final thing you want to establish is a tunnel with your Saleor environment. Go to your app's directory first and run:

saleor app tunnel

Your local application should be available now to the outside world (Saleor instance) for accepting all the events via webhooks.

A quick note: the next time you come back to your project, it is enough to launch your app in a standard way (and then launch your tunnel as described earlier):

pnpm dev

Without CLI

  1. Install the dependencies by running:
pnpm install
  1. Start the local server with:
pnpm dev
  1. Expose local environment using tunnel: Use tunneling tools like localtunnel or ngrok.

  2. Install application at your dashboard:

If you use Saleor Cloud or your local server is exposed, you can install your app by following this link:

[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APP_TUNNEL_MANIFEST_URL]

This template host manifest at /api/manifest

You can also install application using GQL or command line. Follow the guide how to install your app to learn more.

Generated schema and typings

Commands build and dev would generate schema and typed functions using Saleor's GraphQL endpoint. Commit the generated folder to your repo as they are necessary for queries and keeping track of the schema changes.

Learn more about GraphQL code generation.

Storing registration data - APL

During registration process Saleor API pass the auth token to the app. With this token App can query Saleor API with privileged access (depending on requested permissions during the installation). To store this data, app-template use a different APL interfaces.

The choice of the APL is done using APL environment variable. If value is not set, FileAPL is used. Available choices:

  • file: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production)
  • upstash: use Upstash Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires UPSTASH_URL and UPSTASH_TOKEN environment variables to be set

If you want to use your own database, you can implement your own APL. Check the documentation to read more.

Environment variables

  • FEED_CACHE_MAX_AGE: Amount of seconds the the response will be cached for. Default time is 5 minutes.