Context-Aware AI Chat System with Long-Term Memory
BrainStack-AI is a full-stack AI chat application that remembers conversations using vector memory and generates context-aware responses. It simulates a persistent intelligent assistant similar to modern AI platforms.
This project is actively under development.
Completed:
- Authentication system
- Real-time chat
- Vector memory integration
- Context-aware AI responses
- React frontend with theme toggle
In progress:
- UI polish
- Deployment
- Advanced features
- AI-powered chat assistant
- Long-term memory using vector embeddings
- Context-aware responses
- Real-time messaging with Socket.io
- Secure JWT authentication
- React-based modern UI
- Dark/Light theme toggle
- Scalable backend architecture
- React
- Vite
- Axios
- Socket.io Client
- Custom CSS
- Node.js
- Express.js
- MongoDB
- JWT Authentication
- Socket.io
- Gemini embeddings
- Pinecone vector database
- Context retrieval system
User
↓
React Frontend
↓
Socket.io / REST API
↓
Node.js + Express Backend
↓
Message Processing
↓
Gemini Embeddings
↓
Pinecone Vector Storage
↓
Context Retrieval
↓
AI Response
↓
User
BrainStack-AI/
│
├── backend/
│ ├── src/
│ │ ├── controllers/
│ │ ├── db/
│ │ ├── middlewares/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── services/
│ │ ├── sockets/
│ │ └── app.js
│ │
│ ├── server.js
│ └── package.json
│
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ │ └── chat/
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ ├── pages/
│ │ │
│ │ │
│ │ │
│ │ │
│ │ ├── styles/
│ │ ├── App.jsx
│ │ ├── AppRoutes.jsx
│ │ └── main.jsx
│ │
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
│
├── .postman/
├── README.md
└── .gitignore
git clone https://github.com/thakare18/BrainStack-AI.git
cd BrainStack-AIcd backend
npm installCreate .env file inside backend:
PORT=5000
MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret
GEMINI_API_KEY=your_api_key
PINECONE_API_KEY=your_api_key
Start backend:
npm startcd frontend
npm install
npm run devFrontend runs on:
http://localhost:5173
- User sends a message.
- Message stored in MongoDB.
- Converted into vector embeddings.
- Stored in Pinecone.
- Relevant memories retrieved on new queries.
- AI generates context-aware response.
Postman collection available in:
.postman/
Endpoints include:
- Register
- Login
- Create Chat
- Send Message
- Get Messages
Prathamesh Vinayak Thakare