A simple react-redux chatbot
The app uses webpack-dev-server to aid development. Technologies used include babel, immutable for data storage, and mocha and chai for unit testing.
To start the development server with hot reloading enabled, simply run
webpack-dev-server
To run the set of unit tests, simply run
npm test
To deploy the app to gh-pages, there are a couple of steps to follow.
- Run
webpack
command. This will create abundle.js
andbundle.js.map
file in the dist folder. - Delete everything except dist folder.
- Empty contents of dist folder to root directory.
- Commit and push to gh-pages.
+-- actions
| +-- chat.js
+-- components
| +-- Bio.jsx
| +-- MessageHistory.jsx
| +-- MessageView.jsx
| +-- MoodLabel.jsx
| +-- PersonalInfo.jsx
| +-- TypingInfo.jsx
| +-- UserMessageInput.jsx
+-- constants
| +-- actions.js
| +-- bio.js
| +-- conjunctions.js
| +-- messages.js
| +-- moods.js
| +-- pictures.js
+-- containers
| +-- App.jsx
+-- logic
| +-- RandomBioGenerator.js
| +-- RandomMessageSelector.js
| +-- RandomMoodFeed.js
| +-- RandomPictureLocation.js
| +-- RandomTime.js
+-- reducers
| +-- chat.js
+-- config.js
+-- index.jsx
Currently, there are tests on each of the files within the components, logic, and reducers folders. The relevant file can be found in the analogous point within the test
folder. All test files are suffixed with _spec
Defaulted implementations are held in the logic folder. Currently, it utilises a fairly idiosyncratic algorithm. Bio, conjunction, mood, and message statements, and picture locations are found in the constants folder.