A minimal single-page chatbot application implemented in React + TypeScript.
This repository was originally scaffolded as an Angular example but has been converted to a small React app that demonstrates a simple chat UI and a simulated bot reply. It's intended as a starting point for integrating a real AI agent/backend later.
Prerequisites:
- Node.js (LTS recommended, e.g. 18.x or 20.x)
- npm (bundled with Node)
Install dependencies and start the dev server:
npm install
npm startOpen http://localhost:3000 in your browser.
Build for production:
npm run buildpublic/— static HTML (public/index.html)src/index.tsx— React entry pointsrc/App.tsx— App shell that mounts the chatbotsrc/components/ChatBot.tsx— Chat UI and simple simulated bot logicsrc/index.css— global stylespackage.json— dependencies and scriptstsconfig.json— TypeScript configuration
- If
react-scriptsis not found when runningnpm start, runnpm installagain. If you hit peer dependency issues, try cleaningnode_modulesandpackage-lock.jsonand reinstalling:
Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue; Remove-Item package-lock.json -ErrorAction SilentlyContinue
npm install- This repo previously included Angular config files. Those are no longer required for running the React app. You can safely remove files like
angular.json,src/main.ts,src/polyfills.ts, and thesrc/appfolder if you want a cleaner tree.
- Replace the simulated reply in
ChatBot.tsxwith calls to a backend or AI service. - Add unit tests and CI configuration.
If you want, I can remove the leftover Angular files and add a short README section describing how to wire a backend. Say "Remove Angular files" or "Add backend wiring".