Skip to content

Commit 3d7016f

Browse files
authored
Merge pull request #15 from appwrite/feat-use-markdoc-docs
feat: use markdoc docs
2 parents 3d2d5c7 + 2c7799a commit 3d7016f

File tree

182 files changed

+4495
-999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+4495
-999
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
.idea
33
.vscode
44
.env
5-
venv
5+
venv
6+
sources

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ Finally, start a development server:
3232
npm run dev
3333
```
3434

35+
### 4. Testing the changes
36+
37+
We use a set of benchmark questions to test your changes:
38+
39+
- How do you add a custom domain in the console?
40+
- Show me how I can set up database collections and documents.
41+
- What's the difference between Server and Client SDKs?
42+
- How do I use the users API to create a new user with Dart?
43+
44+
You can execute the [npm run test](./scripts/test-prompts.js) script to write snapshots of the answers to these questions to the tests folder.
45+
3546
## Submit a Pull Request 🚀
3647

3748
The branch naming convention is as follows

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ RUN pnpm --prod install
1111

1212
COPY . .
1313

14+
RUN pnpm run fetch-sources
15+
1416
ENV _APP_ASSISTANT_OPENAI_API_KEY=''
1517

1618
EXPOSE 3003
17-
CMD [ "node", "main.js" ]
19+
CMD [ "pnpm", "start" ]

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,30 @@ To install, run the following command.
1616
pnpm i
1717
```
1818

19+
Next, fetch the Appwrite-specific sources used by the assistant.
20+
21+
```bash
22+
pnpm run fetch-sources
23+
```
24+
25+
This will download the sources from the Appwrite documentation and store them in the `./sources` directory.
26+
1927
## Usage
2028

21-
To run the server, execute the `main.js` file with node, or run the `dev` command to hot-restart the server on file changes.
29+
To run the server, execute the `dev` command. By default, the server will be available at `http://localhost:3000`
2230

2331
```bash
24-
node main.js
25-
# Or
2632
pnpm run dev
2733
```
2834

35+
The server exposes a POST endpoint at `/`. The endpoint expects a raw text body containing the query for the assistant. The answer to the query will be streamed back to the client as raw text.
36+
37+
Use cURL to test the server, for example:
38+
39+
```bash
40+
curl -X POST -d "How do I create a user?" http://localhost:3000
41+
```
42+
2943
## Contributing
3044

3145
All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.

docs/4eeb7d58-4583-11ee-9922-f2ea36f81204.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/4eeb9216-4583-11ee-9922-f2ea36f81204.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/4eeb9b80-4583-11ee-9922-f2ea36f81204.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/4eeba62a-4583-11ee-9922-f2ea36f81204.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)