Skip to content

Latest commit

 

History

History
285 lines (187 loc) · 2.34 KB

File metadata and controls

285 lines (187 loc) · 2.34 KB

Setup Guide

Prerequisites

Make sure the following tools are installed:

  • Node.js
  • npm
  • Python 3.10+
  • MongoDB
  • Redis

Clone Repository

git clone https://github.com/CodePlaygroundHub/paso-chat-app.git
cd paso-chat-app

Backend Setup

Navigate to Backend

cd backend

Install Dependencies

npm install

Configure Environment Variables

Create:

backend/.env

Copy values from:

backend/.env.example

Start Backend Server

npm run dev

Backend runs on:

http://localhost:5001

Frontend Setup

Navigate to Frontend

cd frontend

Install Dependencies

npm install

Configure Environment Variables

Create:

frontend/.env

Copy values from:

frontend/.env.example

Start Frontend

npm run dev

Frontend runs on:

http://localhost:5173

ML Service Setup

Navigate to ML Service

cd ml-service

Install Python Dependencies

pip install -r requirements.txt

Start ML Service

uvicorn app:app --host 0.0.0.0 --port 8000 --reload

ML service runs on:

http://localhost:8000

ML Service Features

The FastAPI ML service provides:

  • toxic message detection
  • spam detection
  • smart reply suggestions

ML API Endpoint

Analyze Message

POST /analyze

Request Body

{
  "text": "Hello world"
}

Response

{
  "toxic_score": 0.01,
  "spam_score": 0.02,
  "smart_replies": ["Hi!", "Hello!"]
}

Frontend Technologies

  • React.js
  • Zustand
  • Tailwind CSS
  • DaisyUI
  • Socket.io Client
  • Axios
  • Framer Motion

Backend Technologies

  • Node.js
  • Express.js
  • MongoDB
  • Socket.io
  • Redis
  • JWT Authentication

Python Dependencies

fastapi
uvicorn
scikit-learn
joblib
pydantic

Production Deployment

Frontend

Deployed on:

Vercel

Backend

Deployed on:

Render

ML Service

Deployed on:

Render

Available Scripts

Frontend

npm run dev
npm run build
npm run preview
npm run lint

Backend

npm run dev
npm start
npm run lint

Environment Example Files

frontend/.env.example
backend/.env.example