You will build a working AI chatbot from scratch over 5 days. Day 1 covers the project structure, Node.js setup, and getting your first response from the Claude API.
By the end of this course you will have a full-stack AI chatbot: a Node.js backend that calls the Claude API, a clean chat UI in the browser, RAG (retrieval-augmented generation) to answer questions from your own documents, and a deployed URL you can share. Every day produces working code.
node --versionmkdir my-chatbot && cd my-chatbot
npm init -y
npm install express @anthropic-ai/sdk dotenv cors
touch .env server.js index.htmlANTHROPIC_API_KEY=your_api_key_hereconst express = require('express');
const Anthropic = require('@anthropic-ai/sdk');
const cors = require('cors');
require('dotenv').config();
const app = express();
const client = new Anthropic();
app.use(express.json());
app.use(cors());
app.use(express.static('.'));
app.post('/chat', async (req, res) => {
const { message } = req.body;
const response = await client.messages.create({
model: 'claude-opus-4-5',
max_tokens: 1024,
messages: [{ role: 'user', content: message }]
});
res.json({ reply: response.content[0].text });
});
app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});node server.js
# In another terminal:
curl -X POST http://localhost:3000/chat -H "Content-Type: application/json" -d '{"message": "Hello! What can you help me with?"}'.env file has the correct API key and that it does not have extra spaces. The key starts with sk-ant-.