Cortex AI is a clean full-stack AI chatbot built with React + Express and powered by the Google Gemini API.
It focuses on a developer-friendly chat experience, supporting formatted responses, code blocks, and contextual follow-up questions.
- 🤖 AI responses powered by Google Gemini
- 🧠 Smart follow-up based on selected text
- 🧾 Markdown rendering for readable responses
- 💻 Code block support with proper formatting
- 📋 Copy response button for quick reuse
- ⚡ Smooth chat UI built with React + Tailwind
- 🔁 Auto-scroll chat conversation
- ⌨️ Send messages using Enter key
Frontend
- React
- Tailwind CSS
- React Markdown
Backend
- Node.js
- Express.js
- Gemini API
Cortex-AI
│
├── client
│ ├── src
│ │ ├── components
│ │ │ ├── ChatBox.jsx
│ │ │ ├── ChatInput.jsx
│ │ │ └── MessageBubble.jsx
│ │ └── App.jsx
│
├── server
│ ├── server.js
│ └── .env
│
└── README.md
git clone https://github.com/Far-200/cortex-ai-assistant.git
cd Cortex-AI
Frontend
cd client
npm install
Backend
cd ../server
npm install
Create a .env file inside server
GEMINI_API_KEY=your_api_key_here
cd server
npm run dev
Server runs on
http://localhost:5000
cd client
npm run dev
Open:
http://localhost:5173
Ask Cortex:
Write a Python function for factorial
Cortex will respond with:
- formatted explanation
- syntax highlighted code
- copyable response
You can select any part of the response and click Follow up to ask a contextual question.
- Conversation memory
- Syntax highlighting
- Chat history persistence
- Streaming responses
- Deploy to Vercel + Render
This project is licensed under the MIT License.
Farhaan Khan
CSE Student • Full-stack Builder • AI Explorer