An open API service indexing awesome lists of open source software.

https://github.com/redis-developer/acct-ac-demo

Demo of Redis auto-complete functionality
https://github.com/redis-developer/acct-ac-demo

docker docker-compose node-redis nodejs redis search

Last synced: about 1 month ago
JSON representation

Demo of Redis auto-complete functionality

Awesome Lists containing this project

README

          

# Redis Account Auto-complete

## Contents
1. [Summary](#summary)
2. [Features](#features)
3. [Prerequisites](#prerequisites)
4. [Installation](#installation)
5. [Usage](#usage)
6. [Screenshots](#screenshots)

## Summary
This is a Javascript-based demo of Redis Suggest functionality. Synthetic account data is generated with Faker (1M accounts). Each account has the following fields:
- name: fake account name
- subsidiary: fake account name
- region: one of the continents
- branch code: 'B-' and a random 5 character alphanumeric
- internal code: 'I-' and a random 5 character alphanumeric

Name, subsidiary, branch and internal code are all added to 1 Redis Suggest dictionary. Each dictionary entry has a payload field equal to the full colon-separated concatenation of all the fields for that account. Example:
```bash
> FT.SUGGET acctDict Weis WITHPAYLOADS
1) "Weissnat Inc"
2) "Kerluke, Auer and Altenwerth:Weissnat Inc:Asia:B-YV4ev:I-rdW1C"
3) "Weissnat LLC"
4) "Weissnat LLC:Robel, Runolfsdottir and Smitham:North America:B-lpgjB:I-hhC3y"
5) "Weissnat - Von"
6) "Weissnat - Von:Hackett - Ankunding:Africa:B-rr7TE:I-KTQva"
7) "Weissnat - Toy"
8) "Kessler - Roberts:Weissnat - Toy:North America:B-cRmYJ:I-CIbiI"
9) "Weissnat - Kub"
10) "Tromp LLC:Weissnat - Kub:Africa:B-NLKgE:I-vw78X"
```

## Features
- ExpressJS-based REST API server, synthetic data generation + load functionality, and HTML GUI to demonstrate address autocomplete.

## Prerequisites
- Docker
- Docker Compose

## Installation
```bash
git clone git@github.com:redis-developer/acct-ac-demo.git && cd acct-ac-demo
```

## Usage
### Start-up
```bash
./start.sh
```
### Shutdown
```bash
./stop.sh
```
### GUI Access
```bash
http://localhost:8000
```
## Screenshots
### Data Load
This screen is displayed until all 1M entries have been loaded into Redis.
![load](./images/load.png)
### Name Auto-complete (Account or Subsidiary)
![name](./images/name.png)
### Branch Code Auto-complete (Account or Subsidiary)
![code](./images/code.png)