A local AI-powered chatbot built with NestJS for backend and React + Vite for frontend, using the Llama3 model via Ollama. This project enables you to chat with an LLM without using any paid API services like OpenAI.
- Chat with a local LLM (Llama3) using Ollama
- Simple prompt/response interface
- Built fully with TypeScript
- No need for API keys or OpenAI account
- Fullstack app with React frontend and NestJS backend
| Layer | Stack |
|---|---|
| Frontend | React + Vite + Tailwind CSS |
| Backend | NestJS + Axios |
| Model | Ollama + Llama3 |
| Language | TypeScript |
# Run this ONCE to pull and launch the model:
ollama run llama3This will start the LLM API server at http://localhost:11434.
Leave it running while using the app.
cd backend
npm install
npm run startThis launches the API server at http://localhost:3000, which connects to Ollama and exposes a /chat endpoint.
test your end point
curl -X POST http://localhost:3000/chat -H "Content-Type: application/json" -d '{"prompt": "can you draw an apple image for me?"}In a new terminal tab:
cd frontend
npm install
npm run devThe frontend runs at: http://localhost:5173
Open your browser → go to http://localhost:5173 → enter a prompt → get an AI-generated reply powered by Llama3 (via Ollama).
Request Body:
{
"prompt": "What is JavaScript?"
}Response:
{
"reply": "JavaScript is a versatile programming language..."
}dev-helper-ai/
├── backend/ # NestJS backend
│ └── src/chat/ # Chat module
├── frontend/ # React + Vite frontend
│ └── src/components/ # Chat UI component
- No API keys or subscriptions
- Run everything locally, ideal for learning & privacy
- Works offline after downloading model
This project is open source and available under the MIT License.
