A modern chat application for customer support on the Crustdata API built with FastAPI backend and React TypeScript frontend. The application provides a real-time chat interface powered by OpenAI's API.
crustdata/
├── backend/ # FastAPI server
│ ├── main.py # Main server file
│ ├── services/ # Business logic
│ └── config.py # Configuration
└── client/ # React TypeScript frontend
├── src/ # Source code
└── public/ # Static files
- Python 3.11+
- Node.js 18+
- npm or yarn
- OpenAI API key
-
Navigate to the backend directory:
cd backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the backend directory with your OpenAI API key:OPENAI_API_KEY=your_api_key_here
-
Navigate to the client directory:
cd client
-
Install dependencies:
npm install
-
Initialize the vector store (from the backend directory):
python startup.py
-
Start the backend server (from the backend directory):
uvicorn main:app --reload
The server will run on
http://localhost:8000
-
Start the frontend development server (from the client directory):
npm run dev
The frontend will be available at
http://localhost:5173
- Backend API documentation is available at
http://localhost:8000/docs
- The frontend is built with React 18, TypeScript, and Tailwind CSS
- The backend uses FastAPI with Python 3.8+
MIT