Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AGI Chatbot (React + Node.js + FastAPI)

This project uses a 3-service architecture:

  • apps/web-react: React frontend (Vite)
  • apps/api-node: Node.js API gateway (Express)
  • apps/ml-fastapi: FastAPI NLP inference service (PyTorch + NLTK)

Architecture

  1. Frontend sends chat message to POST /api/chat on Node.
  2. Node forwards the request to FastAPI POST /chat.
  3. FastAPI runs model inference and returns response.

Project Structure

apps/
  web-react/
  api-node/
  ml-fastapi/

docker-compose.yml
README.md

Prerequisites

  • Node.js 20+
  • Python 3.12+ (or compatible with your environment)
  • npm
  • Optional: Docker Desktop

Run Locally (without Docker)

Open 3 terminals.

  1. Start FastAPI ML service:
cd apps/ml-fastapi
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
  1. Start Node API service:
cd apps/api-node
npm install
copy .env.example .env
npm run dev
  1. Start React frontend:
cd apps/web-react
npm install
copy .env.example .env
npm run dev

Open http://localhost:5173.

Run with Docker

docker compose up --build

Then open http://localhost:5173.

Health Checks

  • FastAPI: GET http://localhost:8000/health
  • Node API: GET http://localhost:4000/health

Main Endpoints

  • Node chat endpoint: POST http://localhost:4000/api/chat
  • FastAPI chat endpoint: POST http://localhost:8000/chat

Notes

  • NLP model assets are stored in apps/ml-fastapi/assets/.
  • Environment templates are provided as .env.example in each app where needed.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages