For this take-home my approach centered around creating a workable, clean solution for interacting with a chat bot over a web api. I had a bit more time, and therefore decided to support the creation of multiple threads with messsages attatched to each thread. This gives the user a bit more organization and is a real-world implementation. I tried to organize the code in a way that is scalable and structurally sound.
- Python
- Node.js
- Docker and Docker Compose
- Poetry
- Postgres libpq header files (e.g.
apt install libpq-devon Ubuntu,brew install postgresqlon macOS)
cdintobackendand runpoetry install.cdintofrontendand runnpm install.
- From the root directory, run
docker compose up. - In a separate terminal,
cdintobackendand runpoetry run uvicorn main:app --reload. - In a separate terminal,
cdintofrontendand runnpm run dev.