2022-05-26 12:16:30 +00:00
# SDK for Saleor Apps
2023-02-15 11:07:55 +00:00
SDK for building great [Saleor Apps ](https://github.com/saleor/apps ).
2022-06-07 09:33:36 +00:00
2022-06-07 09:33:50 +00:00
< div >
2022-07-20 14:19:49 +00:00
[](https://www.npmjs.com/package/@saleor/app-sdk)
[](https://www.npmjs.com/package/@saleor/app-sdk)
2022-06-07 09:33:50 +00:00
< / div >
2022-08-08 12:49:26 +00:00
## 🚨 Alpha phase
App SDK is on early, alpha stage at the moment. Every API below 1.x.x release is likely to change.
Feel free to play with SDK and to move its code to your app directly
2022-06-07 09:33:36 +00:00
## Installing
```bash
npm i @saleor/app -sdk
2022-07-20 14:19:49 +00:00
```
2022-07-20 15:01:37 +00:00
2022-08-22 13:47:40 +00:00
## Docs
- [AppBridge ](./docs/app-bridge.md ) - communication layer between Saleor App and Dashboard
2022-10-05 12:56:22 +00:00
- [Protected Views ](./docs/protected-views.md ) - protecting access to App outside of Dashboard
2022-08-30 09:53:21 +00:00
- [APL ](./docs/apl.md ) - an interface that enabled App communicating between one or more Saleor instances
- [Debugging ](./docs/debugging.md ) - how to debug app-sdk behaviour
2022-11-23 13:58:38 +00:00
- [Next.js API Handlers ](./docs/api-handlers.md ) - factories for building Next.js API routes
- [Protected Views ](./docs/protected-views.md ) - how to ensure a page is visible only in Dashboard context
- [Building a Webhook for async event ](./docs/saleor-async-webhook.md ) - how to build a webhook that reacts on [Saleor async event ](https://docs.saleor.io/docs/3.x/developer/extending/apps/asynchronous-webhooks )
- [Settings Manager ](./docs/settings-manager.md ) - how to save App configuration (tokens, settings) in Saleor, without external database
2022-08-22 13:47:40 +00:00
2022-07-20 15:01:37 +00:00
## Development
2022-07-29 14:02:28 +00:00
### How to link development version to your project
If you would like to develop the SDK and test it with existing project:
1. In the Saleor App SDK directory run command
```bash
pnpm watch
```
Now any code change will trigger build operation automatically.
2. In your project directory:
```bash
pnpm add ../saleor-app-sdk/dist
```
As path to your local copy of the App SDK may be different, adjust it accordingly.
2022-07-20 15:01:37 +00:00
### Code style
Before committing the code, Git pre-hooks will check staged changes for
following the code styles. If you would like to format the code by yourself, run
the command:
```bash
pnpm lint
```