A client/server-based chatbot that can solve basic math problems.
The frontend is implemented in React and communicates with the backend via websockets using socket.io.
The backend is built on Node.js and the Express.js framework.
A history of calculations is stored in a MongoDB database.
In order to run this project, you need to have...
- Node.js >= 22.0.0 (might work with older versions, but not tested)
- Yarn (v1 is enough)
- MongoDB (either install it locally on your computer or register for the free tier on https://www.mongodb.com/)
-
Clone the repository
git clone git@github.com:chrisEff/calcubot.git
-
Install the dependencies with Yarn.
cd calcubot yarn -
A postinstall hook should have automatically created
.envfiles in bothpackages/backendandpackages/frontend. You can change the settings to your liking or leave them as-is. The only thing you have to adjust is theMONGODB_URIinpackages/backend/.envto point to your MongoDB instance. -
Then you can start the backend by running this in the project's root directory:
yarn start:backend
-
Next, open a second terminal and start the frontend:
yarn start:frontend
-
Once the frontend has started up successfully, the console output will show you the URL where you can access the app.
The backend has a few unit tests that can be run with the following command:
cd packages/backend
yarn test