Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msolorio/shopify_api_multi_tenant_demo
Multi-tenant backend Shopify App with OAuth2
https://github.com/msolorio/shopify_api_multi_tenant_demo
Last synced: 24 days ago
JSON representation
Multi-tenant backend Shopify App with OAuth2
- Host: GitHub
- URL: https://github.com/msolorio/shopify_api_multi_tenant_demo
- Owner: msolorio
- Created: 2024-10-21T22:13:28.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T03:19:51.000Z (about 2 months ago)
- Last Synced: 2024-11-20T04:20:35.819Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.34 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shopify API Multi-Tenant
This plugin allows backend applications to pull storefront data from Shopify's admin API and manages OAuth 2.0 flow.
This plugin is part of the larger Junta project, an ETL platform for small businesses to track trends and derive insight, unifying data from common ecommerce solutions and exposing behind a single user friendly product.
Many more such plugins will be built out and unified on the Junta platform.
![Shopify API Multi-Tenant](./README_assets/junta_project.png)
# Setup
If you need to authenticate new stores, follow step 1. Otherwise, skip to step 2.
1. Create a public endpoint for the auth server with ngrok.
```
ngrok http http://localhost:3000
```
This will output a public endpoint. Add this endpoint as `HOSTNAME=` in the `.env` file.In the webpage for your Shopify app under the configuration section, add the public ngrok endpoint under the `App URL` and `Allowed redirection URL(s)` fields and then click save.
```
# App URL
https:///api/auth# Allowed redirection URL(s)
https:///api/auth
https:///api/auth/callback
```2. Next start the data collector, auth server, and the mongodb for storing access tokens.
```
docker compose up
```3. Have the storefront install your app. This will grant the app permissions to store's data and we will store an access token for the store.
4. Access storefront data by making a request to the data collector.