Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always"
}
91 changes: 54 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,85 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
# Schmiede.ONE Bugchat challenge!

## Available Scripts
Welcome!

In the project directory, you can run:
This challenge is about an app that replicates one of the most sophisticated debugging methods: [rubber duck debugging](https://en.wikipedia.org/wiki/Rubber_duck_debugging).

### `npm start`
The app is a chatbot which responds to your messages but lets just say that the bot's level of intelligence isn't really production ready. Your job is to make the bot smarter.

Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
We **DO NOT** expect you to do all the tasks listed here. Just focus on the ones that support your application (as a frontend or backend developer).
Focus on [task 2.1](#Tasks) if you're applying for a front-end position. Focus on [task 2.2](#Tasks) for backend positions.

The page will reload if you make edits.<br>
You will also see any lint errors in the console.
## Prerequisites:
1. Clone with Git (gets you extra mana) or you can download as zip (boring...)
> If you prefer working with class based components, check out the branch [`master`](https://github.com/schmiedeone/bugchat)
2. Node v10+

### `npm test`
## Tasks

Launches the test runner in the interactive watch mode.<br>
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
Here's a list of tasks that you can accomplish to make it cooler:

### `npm run build`
1. Refactor and optimize the code where you see fit.
2. Choose one of the following to focus on:
1. Have a list of other rubber ducks in a sidebar and have their chat history. (imagine whatsapp web, check attached picture for reference)
2. Write a REST API (using the technology of your choice) to serve the `dialogueEngine`. Make the bot fetch the answers from the API. Try to make the `dialogueEngine` ["smarter"](#Tips-for-making-it-smarter).
> An express server is setup inside of the server folder. You can use it if you want to.

Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.
Lets go!

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
![whatsapp screenshot](https://www.chip.de/ii/1/0/9/3/1/0/6/4/6/web_whatsapp-1d0159a68e13bb79.jpg)

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
## Tips for making it smarter

### `npm run eject`
1. You can employ a public API from a service like Wikipedia or StackOverflow to get answers to questions typed in the chatbox.
2. Come up with an algorithm to interpret text (e.g. keywords) and give relevant answers.

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
---

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
**NOTE**

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Node version 10 is required to run this app and higher versions cannot build the dependencies listed in the package.json.
In case the app does not run on your version of node, you can [install nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
and add the node version to it.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
---

## Learn More
## How to run the frontend

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
In the project directory, you can run:

To learn React, check out the [React documentation](https://reactjs.org/).
```shell
$ yarn start
```

### Code Splitting
OR

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
```shell
$ npm start
```

### Analyzing the Bundle Size
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
The page will reload if you make edits.<br>
You will also see any lint errors in the console.

### Making a Progressive Web App
## How to run the backend

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
In the project directory, you can run:

### Advanced Configuration
```shell
$ yarn start:express
```

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
OR

### Deployment
```shell
$ npm start:express
```

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This runs the boilerplate express server we provided.
The server should be available on [http://localhost:8000](http://localhost:8000).

### `npm run build` fails to minify
---

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and the [create-express-app](https://github.com/wesleytodd/create-express-app) repo.
7 changes: 7 additions & 0 deletions bin/app
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /usr/bin/env node

// Pass configuration to application
require('../server/express')({
port: 8000,
host: 'localhost',
});
Loading