A modern fullstack AI chat assistant application featuring persistent conversations, session restoration, and a beautiful React-based interface.
- React 18 - Modern React with hooks and concurrent features
- TanStack Router - Type-safe routing and navigation
- TanStack Query - Data fetching and state management
- Tailwind CSS - Utility-first CSS framework
- Vite - Fast build tool and development server
- CopilotKit - AI assistant UI components and runtime
- LangGraph - Agent workflow orchestration
- Azure OpenAI - GPT-4 language model integration
- FastAPI - High-performance Python API framework
- MongoDB - Document database for conversation persistence
- Motor - Async MongoDB driver
- Pydantic - Data validation and serialization
- π£ Persistent Conversations - Chat history saved to MongoDB with automatic session restoration
- π€ Single Conversation Per User - Each user maintains one continuous conversation thread
- π Session Restoration - Conversations automatically restore on page refresh
- π¨ Modern UI - Beautiful, responsive chat interface built with React and Tailwind
- π Real-time Streaming - Live AI responses with CopilotKit's streaming capabilities
- π‘ Type Safety - Full TypeScript support across frontend and backend
- π± Mobile Friendly - Responsive design that works on all devices
- Node.js 18+
- Python 3.11+
- MongoDB instance (local or cloud)
- Azure OpenAI API access
git clone <repository-url> fullstack-ai-chat
cd fullstack-ai-chatcd backend/lang-graph-service
cp .env.example .env
# Edit .env with your MongoDB and Azure OpenAI credentials
python -m venv .venv
source .venv/Scripts/activate # Windows: .venv\Scripts\activate
pip install poetry
poetry installcd client
npm install# Terminal 1: Start LangGraph service
cd backend/lang-graph-service
poetry run python server.py
# Terminal 2: Start CopilotKit runtime
cd backend/copilot-runtime-service
npm install && npm start
# Terminal 3: Start React client
cd client
npm startThe application will be available at:
- Frontend: http://localhost:3000
- CopilotKit Runtime: http://localhost:4000
- LangGraph API: http://localhost:8000
- Frontend Documentation: client/README.md
- React components, routing, styling, and testing
- Backend Documentation: backend/README.md
- API endpoints, MongoDB setup, and deployment
/
βββ README.md # This file
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ routes/ # TanStack Router routes
β β βββ providers/ # React context providers
β βββ README.md # Frontend documentation
βββ backend/
β βββ copilot-runtime-service/ # CopilotKit runtime service
β βββ lang-graph-service/ # LangGraph agent service
β βββ server.py # FastAPI server
β βββ sample_agent/ # AI agent implementation
β βββ README.md # Backend documentation
βββ docs/ # Additional documentation
The application requires configuration for:
- MongoDB Connection: For conversation persistence
- Azure OpenAI: For AI model access
- CORS Settings: For frontend-backend communication
See the backend documentation for detailed configuration instructions.
This application is designed for easy deployment to:
- Azure Container Apps - For scalable container deployment
- Azure App Service - For traditional web app hosting
- Docker - Using the provided Dockerfiles
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For technical support or questions:
- Check the client README for frontend issues
- Check the backend README for backend issues
- Review the API documentation at http://localhost:8000/docs when running locally
Built with β€οΈ using modern web technologies and AI.
