Coder Social home page Coder Social logo

osl_test's Introduction

osl_test

Technical test for OSL (Chatbot)

Design

Chatbot

The chatbot conversation window is created with react-simple-chatbot. For nickname input, only alphanumeric, underscores, and dashes are allowed (using regex). Users can select from 7 different types of questions. The character limit for question input is 200. The database stores country codes in accordance with ISO 3166-1 alpha-3:

China: CHN

Singapore: SGP

United Kingdom: GBR

United States: USA

The mongoDB Atlas database receives user responses (nickname, location, question category, and question details).

Dashboard

Geographic location population

Mongodb has built-in graph-building tools for visualizing population distribution by location. The graph is then embedded into the dashboard page.

Question Category Distribution

The Treemap component in react-viz is used for question category distribution based on the count of each question category after querying MongoDB.

List of all questions

When you change the options in the "Filter Category" and "Filter Country" drop down menus, the values are passed into pages/api/[...params].js. The dynamic API is then passed to MongoDB to query results based on question category and country, thus filtering the results.

Tech Stack

Programming Language

Javascript

Frontend

Next.js - Web development framework

Tailwindcss - CSS

react-simple-chatbot - Chatbot conversation window

react-viz - Treemap Data Visualization

Backend

Mongodb - Database

Links

Chatbot Page

https://osl-chatbot.vercel.app/

Dashboard Page

https://osl-chatbot.vercel.app/dashboard

osl_test's People

Contributors

lucaslokchan avatar

Watchers

 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.