Skip to content

vivsamcom/ai-coding-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

AI Coding Assistant

An AI-powered coding assistant built using React, Node.js, Express, and Groq LLM APIs.

This project allows users to chat with an AI assistant for:

  • JavaScript help
  • Node.js debugging
  • React guidance
  • Code generation
  • Error explanations
  • Programming questions

The frontend is built with React + Vite and the backend uses Node.js + Express to connect with Groq AI models.


Features

  • AI chatbot interface
  • React frontend
  • Node.js Express backend
  • Groq LLM integration
  • Fast AI responses
  • Simple and beginner-friendly project structure

Tech Stack

Frontend

  • React
  • Vite
  • Axios

Backend

  • Node.js
  • Express
  • Groq API
  • OpenAI SDK

Project Structure

ai-coding-assistant/
│
├── client/
│   ├── src/
│   ├── package.json
│
├── server/
│   ├── server.js
│   ├── .env
│   ├── package.json

Setup Instructions

1. Clone Repository

git clone https://github.com/vivsamcom/ai-coding-assistant.git
cd ai-coding-assistant

Backend Setup

2. Go to Server Folder

cd server

3. Install Dependencies

npm install

4. Create .env File

Create a .env file inside the server folder.

Example:

GROQ_API_KEY=your_groq_api_key_here
PORT=5000

Get Groq API Key

  1. Open: https://console.groq.com

  2. Sign in

  3. Go to API Keys

  4. Create a new API key

  5. Copy and paste it into .env


5. Start Backend Server

npm start

You should see:

Server running on port 5000

Backend URL:

http://localhost:5000

Frontend Setup

6. Open New Terminal

Go to project root:

cd ai-coding-assistant

7. Go to Client Folder

cd client

8. Install Dependencies

npm install

9. Start React App

npm run dev

You should see:

http://localhost:5173

Open this URL in browser.


Using the AI Chatbot

Type coding questions in the chat input and click Send.


Sample Questions

JavaScript

Explain JavaScript promises with examples
What is async await in Node.js?

React

Create a React login form
Explain React useEffect hook

Node.js

How to create REST API using Express?
Fix this Node.js error

Debugging

Why am I getting CORS error?
How to fix undefined is not a function?

Current AI Model

This project currently uses:

llama-3.3-70b-versatile

via Groq API.


Important Notes

Zscaler / SSL Issues

If you are behind corporate VPN or Zscaler and get SSL certificate errors:

unable to get local issuer certificate

Add this line at the top of server.js:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

This is recommended only for local development.


Future Improvements

Planned features:

  • Chat history
  • Markdown rendering
  • Syntax highlighting
  • Streaming AI responses
  • Multiple AI models
  • Conversation memory
  • File upload support
  • PDF chat support

License

MIT License

About

ai coding assistant chatbot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors