-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dart examples documentation (#33)
Signed-off-by: Andreia Ocanoaia <[email protected]>
- Loading branch information
1 parent
d9cbf86
commit 26fb7c6
Showing
8 changed files
with
142 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,31 +4,41 @@ sidebar_position: 3 | |
|
||
# Chat Application with OpenAi | ||
|
||
:::warning | ||
Running `dart` on the backend side is still experimental work. If you encounter any issues, please let us know by creating a new [GitHub issue](https://github.com/Genez-io/genezio/issues). | ||
::: | ||
|
||
:::info | ||
The source code for this example is public on the following [GitHub repository](https://github.com/Genez-io/genezio-examples/tree/master/dart/chat-with-yoda-chatgpt). | ||
The source code for this example is public on the following [GitHub repository](https://github.com/Genez-io/genezio-examples/tree/master/dart/chatbot-openai). | ||
::: | ||
|
||
Welcome to our demo chat app integrated with Chat GPT, written in Flutter (frontend), Dart(backend), MongoDB as a database, and deployed [genezio](https://genezio.com/). | ||
Welcome to our demo chat app integrated with Chat GPT, written in Flutter (frontend), Dart(backend), MongoDB as a database, and deployed with [genezio](https://genezio.com/). | ||
|
||
This app allows users to engage in conversations with a chatbot powered by Chat GPT. This app is meant to be a demo for a technical talk on the topic of building full-stack apps with Dart and genezio. | ||
This app allows users to engage in conversations with a chatbot powered by Chat GPT. | ||
This app is meant to be a demo for a technical talk on the topic of building full-stack apps with Dart and genezio. | ||
|
||
### Clone the example | ||
|
||
1. Run `git clone https://github.com/Genez-io/genezio-examples` | ||
2. Navigate to the folder `cd ./genezio-examples/dart/chat-with-yoda-chatgpt` | ||
2. Navigate to the folder `cd ./genezio-examples/dart/chatbot-open-ai` | ||
|
||
### Replicate this demo | ||
|
||
Prerequisites: | ||
|
||
1. Get an OpenAI secret key. Create an account on the [OpenAI platform](https://platform.openai.com/) and head to this [link](https://platform.openai.com/account/api-keys) to add a secret key. | ||
2. Host a Mongo Database. Follow this [tutorial](https://www.mongodb.com/basics/mongodb-atlas-tutorial) to get a free tier database. | ||
2. Host a Mongo Database. Follow this [tutorial](https://genezio.com/docs/tutorials/connect-to-mongodb-atlas) to get a free tier database. | ||
3. Create a `server/.env` file and add the following environment variables: | ||
```env | ||
OPENAPI_KEY=todo | ||
MONGODB_URI=todo | ||
``` | ||
|
||
If you want to deploy this demo and play around with it, follow these steps: | ||
|
||
1. Install genezio with `npm install -g genezio` | ||
2. Login on the genezio platform: `genezio login` | ||
3. Clone this repo: `git clone https://github.com/andreia-oca/dart_fullstack_chat_with_chatgpt` | ||
3. Clone this repo: `git clone https://github.com/Genez-io/genezio-examples` | ||
4. Head to the server directory and test it locally with: `genezio local` | ||
5. When you are happy with the local version, deploy it on our infrastructure with: `genezio deploy` | ||
6. Brag about it to your friends! You can share the frontend link to your friends and colleagues and let them play around with your new features. | ||
|
@@ -42,16 +52,3 @@ For more details on how to use genezio, check the links below: | |
|
||
For more details on each dart package, you can check out [pub.dev](https://pub.dev/) | ||
|
||
### Ask for help | ||
|
||
If you get stuck while testing or developing new features for this demo, feel free to add a new [GitHub issue](https://github.com/andreia-oca/dart_fullstack_chat_with_chatgpt/issues/new/choose). I will try to respond as soon as possible. | ||
|
||
### Contributing | ||
|
||
There are a lot of fun features that can be added to the app to test the capabilities of the system. Feel free to play around with the code and if you add a nice feature, don't hesitate and create a pull request. | ||
|
||
### Beta Testers Wait List | ||
|
||
Most of the features used in this demo are not yet released in the latest stable version of genezio. If you want to get exclusive access to the exciting updates about genezio, give us an email at [[email protected]](mailto:[email protected]) to enroll you on our beta testers list. | ||
|
||
Github files are available [**here**](https://github.com/Genez-io/genezio-examples/tree/master/dart/chat-with-yoda-chatgpt). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Todo List with Flutter | ||
|
||
:::warning | ||
Running `dart` on the backend side is still experimental work. If you encounter any issues, please let us know by creating a new [GitHub issue](https://github.com/Genez-io/genezio/issues). | ||
::: | ||
|
||
:::info | ||
The source code for this example is public on the following [GitHub repository](https://github.com/Genez-io/genezio-examples/tree/master/dart/todo-list). | ||
::: | ||
|
||
This is an example of a todo application that uses: | ||
|
||
- `Dart` for the backend | ||
- `Flutter` for the frontend | ||
- `MongoDB` | ||
- `genezio` for developing and deploying the project | ||
|
||
## Prerequisites: | ||
|
||
1. Host a Mongo Database. Follow this [tutorial](https://genezio.com/docs/tutorials/connect-to-mongodb-atlas) to get a free tier database. | ||
2. Create a `server/.env` file and add the following environment variables: | ||
```env | ||
MONGODB_URI=todo | ||
``` | ||
|
||
## Clone the example | ||
|
||
1. Run `git clone https://github.com/Genez-io/genezio-examples` | ||
2. Navigate to the folder `cd ./genezio-examples/dart/todo-list` | ||
|
||
## Initialization | ||
|
||
1. Run `dart pub get` in the `server/` folder to install the dependencies. | ||
2. Run `flutter pub get` in the `client/` folder to install the dependencies. | ||
3. Create a `.env` file in the `server/` folder and add MongoDB URI and the database table name. | ||
|
||
## Deploy the example in the genezio infrastructure | ||
|
||
Run `genezio deploy` in the `server/` folder that contains also the `genezio.yaml` file. This will deploy your code in the genezio infrastructure. The application will be available at the URL provided in the terminal. | ||
|
||
## Run the example locally | ||
|
||
1. Run `genezio local` in the `server/` folder to start the local server. | ||
2. Start the Flutter app by going to the `client/` folder and run `flutter run -d chrome`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters