GithubHelp home page GithubHelp logo

appbaseio / reactivesearch-realm-function Goto Github PK

View Code? Open in Web Editor NEW
4.0 6.0 5.0 915 KB

Crate for ReactiveSearch API which creates a Realm function based API gateway

Home Page: https://opensource.appbase.io/reactivesearch-realm-function/

License: Apache License 2.0

JavaScript 29.64% TypeScript 70.31% Shell 0.04%
mongodb realm reactivesearch reactivesearch-api searchbox

reactivesearch-realm-function's Introduction

ReactiveSearch Realm Function

The ReactiveSearch Realm project deploys the ReactiveSearch API as a transpiled JS code into a Realm function. The goal of this project is to enable Atlas Search users to be able to build search UIs using Searchbox and ReactiveSearch UI libraries.

Note on current project status: This project is being actively developed and currently in a MVP stage where Atlas Search users can deploy the Realm function and run it with the React Searchbox library. Follow the below guides to get started and test this.

Setup

  • Clone repo: git clone https://github.com/appbaseio/reactivesearch-realm-function.git
  • Change working dir: cd reactivesearch-realm-function
  • Install dependencies: npm i
  • Start local build with hot reload: npm start
  • Test local build: npm run start:test

Local Testing

  • Add valid env cp .env.sample .env

  • Update env variables in .env file. DB_URL and DB_NAME are the required env

  • Start local server npm run dev

  • Local server exposes 2 endpoints to test the functionality

    • /:collection_name/_reactivesearch -> Endpoint to execute rs query and get mongo response. Sample output {data: []}. collection_name is dynamic param that one can pass against which query is to be executed
    • /:collection_name/_reactivesearch/validate -> Endpoint to validate rs query and get the aggregation pipleline in response.
  • Make curl / rest request

    curl --location --request POST 'http://localhost:8080/_reactivesearch' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "query": [{
              "id": "search",
              "type": "search",
              "dataField": "*",
              "size": 5
          }],
          "mongodb": {
              "db": "sample_airbnb",
              "collection": "listingsAndReviews"
          }
      }'

Deploy Project

Go over the steps to deploy this project over here.

Static UI hosting

Go over the steps to deploy the search UI with MongoDB App Services over here.

reactivesearch-realm-function's People

Contributors

bietkul avatar deepakagg avatar lakhansamani avatar siddharthlatest avatar voxic avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.