Skip to content

Commit d27f721

Browse files
committed
Move config files
1 parent 340a03f commit d27f721

File tree

7 files changed

+6
-147
lines changed

7 files changed

+6
-147
lines changed

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/.next
2+
**/pnpm-lock.yaml
3+
**/graphql/schema.graphql
4+
**/generated
File renamed without changes.
File renamed without changes.

apps/data-importer/LICENSE LICENSE

File renamed without changes.

apps/data-importer/.nvmrc

-1
This file was deleted.

apps/data-importer/.prettierignore

-5
This file was deleted.

apps/data-importer/README.md

+2-141
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,5 @@
11
![Saleor App Template](https://user-images.githubusercontent.com/249912/71523206-4e45f800-28c8-11ea-84ba-345a9bfc998a.png)
22

3-
<div align="center">
4-
<h1>Saleor App Template</h1>
5-
</div>
3+
# Saleor App: Data Importer
64

7-
<div align="center">
8-
<p>Bare-bones boilerplate for writing Saleor Apps with Next.js.</p>
9-
</div>
10-
11-
<div align="center">
12-
<a href="https://saleor.io/">🏠 Website</a>
13-
<span> • </span>
14-
<a href="https://docs.saleor.io/docs/3.x/">📚 Docs</a>
15-
<span> • </span>
16-
<a href="https://saleor.io/blog/">📰 Blog</a>
17-
<span> • </span>
18-
<a href="https://twitter.com/getsaleor">🐦 Twitter</a>
19-
</div>
20-
21-
<div align="center">
22-
<a href="https://githubbox.com/saleor/saleor-app-template">🔎 Explore Code</a>
23-
</div>
24-
25-
## About
26-
27-
### What is Saleor App
28-
29-
Saleor App is the fastest way of extending Saleor with custom logic using [asynchronous](https://docs.saleor.io/docs/3.x/developer/extending/apps/asynchronous-webhooks) and [synchronous](https://docs.saleor.io/docs/3.x/developer/extending/apps/synchronous-webhooks) webhooks (and vast Saleor's API). In most cases, creating an App consists of two tasks:
30-
31-
- Writing webhook's code executing your custom logic.
32-
- Developing configuration UI to be displayed in Saleor Dashboard via specialized view (designated in the App's manifest).
33-
34-
### What's included?
35-
36-
- 🚀 Communication between Saleor instance and Saleor App
37-
- 📖 Manifest with webhooks using custom query
38-
39-
### Why Next.js
40-
41-
You can use any preferred technology to create Saleor Apps, but Next.js is among the most efficient for two reasons. The first is the simplicity of maintaining your API endpoints/webhooks and your apps' configuration React front-end in a single, well-organized project. The second reason is the ease and quality of local development and deployment.
42-
43-
### Learn more about Apps
44-
45-
[Apps guide](https://docs.saleor.io/docs/3.x/developer/extending/apps/key-concepts)
46-
47-
[Configuring apps in dashboard](https://docs.saleor.io/docs/3.x/dashboard/apps)
48-
49-
## Development
50-
51-
### Requirements
52-
53-
Before you start, make sure you have installed:
54-
55-
- [Node.js](https://nodejs.org/en/)
56-
- [pnpm](https://pnpm.io/)
57-
- [Saleor CLI](https://docs.saleor.io/docs/3.x/cli) - optional, but recommended
58-
59-
### With CLI
60-
61-
The easiest way to set up a Saleor app is by using the Saleor CLI.
62-
63-
[Saleor CLI](https://github.com/saleor/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.
64-
65-
[Full Saleor CLI reference](https://docs.saleor.io/docs/3.x/developer/cli)
66-
67-
If you don't have a (free developer) Saleor Cloud account, create one with the following command:
68-
69-
```
70-
saleor register
71-
```
72-
73-
Now you're ready to create your first App:
74-
75-
```
76-
saleor app create [your-app-name]
77-
```
78-
79-
In this step, Saleor CLI will:
80-
81-
- clone this repository to the specified folder
82-
- install dependencies
83-
- ask you whether you'd like to install the app in the selected Saleor environment
84-
- create `.env` file
85-
- start the app in development mode
86-
87-
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:
88-
89-
```
90-
saleor app tunnel
91-
```
92-
93-
Your local application should be available now to the outside world (Saleor instance) for accepting all the events via webhooks.
94-
95-
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):
96-
97-
```
98-
pnpm dev
99-
```
100-
101-
### Without CLI
102-
103-
1. Install the dependencies by running:
104-
```
105-
pnpm install
106-
```
107-
108-
2. Start the local server with:
109-
```
110-
pnpm dev
111-
```
112-
113-
3. Expose local environment using tunnel:
114-
Use tunneling tools like [localtunnel](https://github.com/localtunnel/localtunnel) or [ngrok](https://ngrok.com/).
115-
116-
4. Install aplication at your dashboard:
117-
118-
If you use Saleor Cloud or your local server is exposed, you can install your app by following this link:
119-
```
120-
[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APP_TUNNEL_MANIFEST_URL]
121-
```
122-
This template host manifest at `/api/manifest`
123-
124-
125-
You can also install application using GQL or command line. Follow the guide [how to install your app](https://docs.saleor.io/docs/3.x/developer/extending/apps/installing-apps#installation-using-graphql-api) to learn more.
126-
127-
### Generated schema and typings
128-
129-
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.
130-
131-
[Learn more](https://www.graphql-code-generator.com/) about GraphQL code generation.
132-
133-
### Storing registration data - APL
134-
135-
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).
136-
To store this data, app-template use a different [APL interfaces](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md).
137-
138-
The choice of the APL is done using `APL` environment variable. If value is not set, FileAPL is used. Available choices:
139-
140-
- `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)
141-
- `upstash`: use [Upstash](https://upstash.com/) 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
142-
- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI)
143-
144-
If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md)
5+
Description TBD

0 commit comments

Comments
 (0)