A responsive React-based AI chat interface that detects language, translates text, and summarizes long content using OpenAI and Azure Translator APIs. Backend is powered by Express.js and securely handles API requests.
Live Demo: Frontend on Vercel | Backend on Render
- Language Detection – Detect the language of user input.
- Translation – Supports multiple languages: English, French, German, Hausa, Igbo, Spanish, Turkish, Yoruba.
- Summarization – Summarizes English text with 150+ words.
- Real-time Chat UI – Chat interface with loading indicators and dynamic updates.
- Responsive Design – Mobile-friendly layout.
- Error Handling – Displays API errors and usage feedback gracefully.
- Frontend: React, Axios, CSS
- Backend: Node.js, Express.js, Axios
- APIs: Azure Translator, OpenAI GPT-4o-mini
- Deployment: Vercel (frontend), Render (backend)
my-chat-ai/
├── public/ # Frontend public assets
├── src/ # React frontend code
│ ├── components/ # Hooks & reusable components
│ └── App.js
├── server/ # Backend Express server
│ └── proxy-server.js
├── .env.local # Frontend env variables
├── server/.env # Backend env variables
├── package.json # Frontend dependencies
├── server/package.json # Backend dependencies
└── README.md
git clone <your-github-repo-url>
cd my-chat-ai
npm installcd server
npm installFrontend (.env.local in root):
REACT_APP_API_URL=http://localhost:5000
Backend (server/.env):
AZURE_TRANSLATOR_KEY=your-azure-key
AZURE_TRANSLATOR_REGION=your-azure-region
AZURE_TRANSLATOR_ENDPOINT=your-azure-endpoint
OPENAI_API_KEY=your-openai-key
PORT=5000
Important: Never commit
.envor.env.localfiles.
Backend:
cd server
npm run devFrontend:
cd ..
npm startVisit http://localhost:3000
- Backend: Deploy to Render
- Frontend: Deploy to Vercel
- Configure environment variables on the respective platforms.