Skip to content

Commit 63688a9

Browse files
committed
Finish readme and contributions
1 parent 5c54094 commit 63688a9

File tree

6 files changed

+57
-19
lines changed

6 files changed

+57
-19
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ If you already have a running Strapi app in local, testing is possible with the
6060
yarn cy:open
6161
```
6262

63-
### Playgrounds
63+
### Run Playground
6464

6565
To test directly your changes on the plugin in Strapi, you can run the Strapi playground:
6666

6767
```bash
68+
# Root of repository
6869
yarn playground:dev
6970
```
7071

72+
This command will install required dependencies and launch the app in development mode. You should be able to reach it on the [port 8000 of your localhost](http://localhost:8000/admin/).
73+
7174
## Git Guidelines
7275

7376
### Git Branches <!-- omit in toc -->

README.md

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Add your Strapi collections into a MeiliSearch instance. The plugin listens to m
3232
- [📖 Documentation](#-documentation)
3333
- [🔧 Installation](#-installation)
3434
- [🎬 Getting Started](#-getting-started)
35-
- [🤖 Compatibility with MeiliSearch](#-compatibility-with-meilisearch)
35+
- [🤖 Compatibility with MeiliSearch and Strapi](#-compatibility-with-meilisearch)
3636
- [💡 Learn More](#-learn-more)
3737
- [⚙️ Development Workflow and Contributing](#️-development-workflow-and-contributing)
38-
- [✋ Requirements](#-requirements)
38+
- [🌎 Community support](#️-community-support)
3939

4040
## 📖 Documentation
4141

@@ -61,7 +61,7 @@ To apply the plugin to Strapi, a re-build is needed:
6161
strapi build
6262
```
6363

64-
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version requirements see this section](#-requirements).
64+
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version compatibiliy see this section](#-compatibility-with-meilisearch).
6565

6666
### 🏃‍♀️ Run MeiliSearch
6767

@@ -97,7 +97,10 @@ First, add your MeiliSearch credentials in the upper box of the MeiliSearch plug
9797

9898
For example, using the credentials used in the [above section](#-run-meilisearch) it looks like this:
9999

100-
![](/assets/credentials.png)
100+
101+
<p align="center">
102+
<img src="./assets/credentials.png" alt="Add your credentials" width="600"/>
103+
</p>
101104

102105
Once completed, click on the `add` button.
103106

@@ -110,12 +113,49 @@ We will use, as **example**, the collections provided by Strapi's quickstart.
110113

111114
On your plugin homepage you should have two collections appearing: `restaurant` and `category`.
112115

113-
![](/assets/collections.png)
116+
<p align="center">
117+
<img src="./assets/collections_indexed.png" alt="Indexed collections need a reload" width="600"/>
118+
</p>
114119

115120
By clicking on the left checkbox, the collection will be automatically indexed in MeiliSearch. For example, if you click on the `restaurant` checkbox, all your restaurants are now available in MeiliSearch.
116121

117122
You can check it using
118123

124+
### 🪝 Apply Hooks
125+
126+
Hooks are listeners that update MeiliSearch each time you add/update/delete an entry in your collections.
127+
In order to activate them you will have to reload the server. This is possible by clicking on the `Reload Server` button if you are in auto-reload mode, or by manually reloading the server mode.
128+
129+
130+
<p align="center">
131+
<img src="./assets/no_reload_needed.png" alt="Indexed collections are hooked" width="600"/>
132+
</p>
133+
134+
135+
### 🕵️‍♀️ Start Searching
136+
137+
Once you have a collection containing documents indexed in MeiliSearch, you can [start searching](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search).
138+
139+
Using the above credentials the following code shows how to search on one of your collections:
140+
141+
```javascript
142+
import { MeiliSearch } from 'meilisearch'
143+
144+
;(async () => {
145+
const client = new MeiliSearch({
146+
host: 'http://127.0.0.1:7700',
147+
apiKey: 'masterKey',
148+
})
149+
150+
// An index is where the documents are stored.
151+
const index = client.index('movies').search('')
152+
})()
153+
```
154+
155+
## 💡 Learn More
156+
157+
If you don't have a running Strapi app, you can still try this plugin using either of one of the following options:
158+
119159
### Run Playground
120160

121161
Instead of adding the plugin to an existing project, you can try it out using the playground in this project.
@@ -168,7 +208,8 @@ yarn develop
168208

169209
You can now use the plugin on your Strapi project.
170210

171-
## 🖐 Requirements
211+
212+
## 🤖 Compatibility with MeiliSearch and Strapi
172213

173214
Complete installation requirements are exact same as for Strapi itself and can be found in the documentation under [Installation Requirements](https://strapi.io/documentation/v3.x/installation/cli.html#step-1-make-sure-requirements-are-met).
174215

@@ -185,20 +226,14 @@ Complete installation requirements are exact same as for Strapi itself and can b
185226

186227
**We recommend always using the latest version of Strapi to start your new projects**.
187228

188-
## 🌎 Community support
189229

190-
- For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
191-
- Strapi Slack [channel](https://slack.strapi.io/)
192-
193-
## Plugin's goal
194-
195-
We want to create a plugin that provides automatic actions and an interface on the Strapi dashboard that helps the user start with MeiliSearch. The User should be able to create or remove new collections from MeiliSearch.
230+
## ⚙️ Development Workflow and Contributing
196231

197-
In the background, the plugin should re-index the documents that have been changed in the collections.<br>
198-
For example, If I change the name of the restaurant `Tonio` with `Tony` in a Strapi collection, an update should automatically be done to update it as well on MeiliSearch.
232+
Any new contribution is more than welcome in this project!
199233

200-
No additional routes should be created on strapi for the front end users as they will be using the MeiliSearch API to search and not Strapi (unless we want to make this possible?).
234+
If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
201235

202-
## MVP
236+
## 🌎 Community support
203237

204-
[You can follow allong the progression of this project here](https://github.com/meilisearch/strapi-plugin-meilisearch/issues).
238+
- For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
239+
- Strapi Slack [channel](https://slack.strapi.io/)

assets/collections.png

-41.3 KB
Binary file not shown.

assets/collections_indexed.png

25 KB
Loading

assets/left_navbar.png

-22.4 KB
Binary file not shown.

assets/no_reload_needed.png

92 KB
Loading

0 commit comments

Comments
 (0)