This project is a guided demonstration of using GitHub Copilot and prompt-driven workflows to build a working chat bot application from an existing chat UI reference image (chat.png). The goal is to show how a sequence of prompts can generate and evolve a full-stack chat app from scaffold to frontend and backend behavior.
Before starting, make sure the requirements below are installed and configured.
- Git (for cloning the repository and committing changes)
- VS Code (with GitHub Copilot extensions)
- Node.js LTS (for React/Vite)
- Python 3.10+ (if using a Python backend) or a Node.js backend runtime
- Ollama (for running a local LLM), supported on macOS, Windows, and Linux
- GitHub Copilot access (organization license or GitHub Education)
Run the following commands in PowerShell or Command Prompt:
# 1) Git
winget install Git.Git
# 2) VS Code
winget install Microsoft.VisualStudioCode
# 3) Node.js (LTS)
winget install OpenJS.NodeJS.LTS
# 4) Python 3.10+
winget install Python.Python.3.11
# 5) Ollama
winget install Ollama.OllamaAfter VS Code is installed, add GitHub Copilot:
- Open VS Code.
- Press
Ctrl+Shift+X. - Search for
GitHub Copilot. - Install the extension published by GitHub.
- Sign in with your GitHub account.
Install Chocolatey first (run as Administrator):
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))Then install required tools:
choco install git -y
choco install vscode -y
choco install nodejs-lts -y
choco install python311 -y
choco install ollama -ywinget install Git.Git; winget install Microsoft.VisualStudioCode; winget install OpenJS.NodeJS.LTS; winget install Python.Python.3.11; winget install Ollama.Ollamagit --version
node --version
npm --version
python --version
ollama --version
code --version- You need a GitHub account and active GitHub Copilot access (organization license or GitHub Education).
- GitHub Education provides student and teacher programs.
- Introductory video reference:
https://www.youtube.com/watch?v=taIzqrUTiJk
- Install Ollama.
- Use the official quickstart for macOS/Windows/Linux and follow the Download Ollama steps.
- Verify installation:
- Run
ollama --versionand confirm a version is returned.
- Run
- Pull a small model (suitable for 8 GB RAM):
- Recommended:
ollama pull gemma2:2b(about 1.6 GB) - Alternative:
ollama pull phi3(about 2.2 GB)
- Recommended:
- Run a quick model test:
- Execute
ollama run gemma2:2b, typeHello, and confirm you get a response.
- Execute
This repository contains a minimal monorepo setup with:
frontend: React + Vite (port5173)backend: Node.js + Express (port3001)
Scope:
- No database
- No authentication
- Simple chat demo only
.
├─ backend/
│ ├─ src/
│ │ └─ index.js
│ └─ package.json
├─ frontend/
│ ├─ src/
│ │ ├─ App.css
│ │ ├─ App.jsx
│ │ └─ main.jsx
│ ├─ index.html
│ ├─ package.json
│ └─ vite.config.js
├─ package.json
└─ README.md
Root (package.json):
npm run dev: Run backend and frontend together.npm run dev:backend: Run only backend.npm run dev:frontend: Run only frontend.npm run build: Build frontend.npm run start: Start backend in non-watch mode.
Backend (backend/package.json):
npm run dev --workspace backend: Start backend with watch mode.npm run start --workspace backend: Start backend once.
Frontend (frontend/package.json):
npm run dev --workspace frontend: Start Vite dev server on5173.npm run build --workspace frontend: Build frontend.npm run preview --workspace frontend: Preview built frontend.
- Install dependencies from the repo root:
npm install- Start both apps:
npm run dev- Open the frontend:
- Backend health endpoint:
Chat flow:
- Frontend sends
POST /api/chatto backend. - Backend returns a simple echo response.
Run the following prompts in order. Each prompt builds on the output of the previous one.
Creates the monorepo skeleton and base configuration.
Expected Output:
frontend/andbackend/directories are created.backend/src/index.jsis set up with an Express server (port 3001).frontend/src/App.jsx,main.jsx, andApp.cssare set up as a base React app.- Root
package.jsondefinesnpm run dev,npm run build, andnpm run startscripts. README.mdis updated with folder structure and run instructions.
Adds React chat UI components and styling.
Expected Output:
ChatPage,MessageList,MessageBubble, andMessageInputcomponents are created.- Messages are stored in component state, and
POST http://localhost:3001/chatis called when sending. - CSS styling approximates the layout shown in
chat.png(bubbles, colors, spacing). - No UI library is used, and the layout remains responsive.
Adds Ollama integration to the backend.
Expected Output:
backend/src/index.jsis updated so thePOST /chatendpoint forwards requests to Ollama athttp://localhost:11434/api/chat(model:gemma2:2b).- The message
"merhaba"always returns the fixed response:"merhaba nasılsınız?". - If Ollama is unavailable, the same fixed response is used as fallback and the app does not crash.
