elastic / app-search-kb-demo

A beautiful, modern customer support/knowledge base search experience for App Search using Search UI.
Apache License 2.0
21 stars 7 forks source link

Elastic App Search Knowledge Base Demo

eas-kb-demo

Build and run frontend for testing

Frontend only

If you wish to test the frontend only, you can build and run the frontend docker image, you can run the following command from the project root directory:

docker build . --target=frontend -t eas-kb-demo/frontend
docker run -p5000:5000 --rm --env-file=eas-kb-demo-frontend/.env eas-kb-demo/frontend

You can now use the frontend from your browser at http://host.docker.internal:5000.

Note:

Full stack

If you wish to test the full stack build locally, you have to boot all the required services (Elasticsearch, App Search) using the docker-compose.yml config with the project.

docker-compose up -d

It could take few minutes, for the stack to be fully booted. Once finished, you should be able to access:

Note:

If something goes wrong with the import (use docker-compose logs -f dataimport to view logs), you can restart it with:

docker-compose run dataimport start-dataimport.sh

To reset the whole stack (all data will be lost), use:

docker-compose down

Development

Install dependencies

The project can be installed by running:

yarn install

Frontend development

All sources of the frontend are located into the eas-kb-demo-frontend workspace of the main yarn project.

By default, the frontend is configured to use the production App Search instance deployed in Elastic Cloud. Because frontend is a R/O application it should not be an issue.

To start the frontend, you can use:

yarn start

To run cypress tests for the frontend, you can use:

yarn cypress run

Data import development

Starting the stack

When working on the import, you should use your own version of App Search during the development. The easiest way to get the stack up and running is to use the docker-compose file bundled with this demo:

docker-compose up -d

After the stack will have finished to start, you can then access to App Search through your browser at http://localhost:3002 with the following credentials:

Notes :

docker-compose exec elasticsearch  curl -XPOST -uelastic:elasticpassword "localhost:9200/_license/start_trial?acknowledge=true"
docker-compose restart enterprise_search

Importing the data

The demo uses two different data sources:

You can import theses data into App Search by running:

yarn dataimport

Notes:

License

Apache-2.0 © Elastic