A full-stack AI assistant application with an Express.js backend and React frontend.
- AI-powered chat assistant using OpenAI GPT-4o-mini
- CBT/Motivational Interviewing techniques
- Express.js backend server
- React frontend client
- CORS enabled for cross-origin requests
- Node.js (v14 or higher)
- npm or yarn
- OpenAI API key
git clone https://github.com/Embotic-Wayne/AIgf.git
cd AIgfnpm installcd client
npm install
cd ..Create a .env file in the root directory:
OPENAI_API_KEY=your_openai_api_key_herenpm startThe backend server will run on http://localhost:3080
In a new terminal:
cd client
npm startThe React app will run on http://localhost:3000
POST /- Send a message to the AI assistant- Body:
{ "message": "your message here" } - Response:
{ "reply": "AI response" }
- Body:
AIgf/
├── index.js # Express server
├── package.json # Backend dependencies
├── package-lock.json # Backend dependency lock
├── .env # Environment variables (create this)
├── .gitignore # Git ignore rules
├── README.md # This file
└── client/ # React frontend
├── src/
│ ├── App.js # Main React component
│ ├── index.js # React entry point
│ └── ...
├── package.json # Frontend dependencies
└── package-lock.json # Frontend dependency lock
- Start both the backend and frontend servers
- Open your browser to
http://localhost:3000 - Interact with the AI assistant through the React interface
- The AI assistant is designed for supportive, non-judgmental conversations
- It uses CBT/Motivational Interviewing techniques
- For production use, ensure proper security measures and environment variable management