โ† All tutorials
๐Ÿค–

GitHub Copilot ยท TypeScript + Express

Build Auth with GitHub Copilot

Prerequisites

  • โœ“ VS Code with GitHub Copilot Chat extension
  • โœ“ Node.js + TypeScript installed
  • โœ“ Git installed
  • โœ“ Qmmit installed
  • โœ“ A Qmmit account with CLI token
1

Create the project

Set up a TypeScript Express project.

mkdir auth-system
cd auth-system
npm init -y
npm install express jsonwebtoken bcryptjs
npm install -D typescript @types/express @types/jsonwebtoken @types/bcryptjs ts-node
npx tsc --init
git init && echo "node_modules/\ndist/" > .gitignore
git add . && git commit -m "initial: typescript express"
2

Set up Qmmit

Initialize tracking.

qmmit init
โšก

What Qmmit does here

Detects GitHub Copilot via VS Code workspaceStorage. Installs hooks.

3

Open in VS Code and use Copilot Chat

Open the project in VS Code. Press Ctrl+Shift+I to open Copilot Chat.

# Open VS Code:
code .

# In Copilot Chat (Ctrl+Shift+I), ask:
# "Create a User model with id, email, password (hashed), and createdAt.
#  Use an in-memory store. Include functions to create user and find by email."
๐Ÿ’ก

Copilot Chat saves sessions as JSONL files in workspaceStorage/chatSessions/. Qmmit reads these automatically.

4

Ask Copilot to build registration

Ask Copilot to create the registration endpoint.

# In Copilot Chat:
# "Create a POST /register endpoint that:
#  1. Validates email and password
#  2. Hashes the password with bcrypt
#  3. Creates the user
#  4. Returns a JWT token"
5

Ask Copilot to build login

Now the login endpoint.

# In Copilot Chat:
# "Create a POST /login endpoint that:
#  1. Finds user by email
#  2. Compares password with bcrypt
#  3. Returns JWT token on success
#  4. Returns 401 on failure"
6

Ask Copilot for auth middleware

Add JWT verification middleware.

# In Copilot Chat:
# "Create an auth middleware that:
#  1. Reads Bearer token from Authorization header
#  2. Verifies JWT
#  3. Attaches user to req
#  4. Returns 401 if invalid"
7

Ask Copilot for a protected route

Add a protected endpoint.

# In Copilot Chat:
# "Create a GET /me endpoint that uses the auth middleware
#  and returns the current user profile"
8

Commit

Commit everything. Qmmit captures all 5 Copilot prompts.

git add .
git commit -m "feat: JWT auth system"

# Expected:
# [qmmit] 5 prompt(s) tracked (copilot) โ†’ ghi9012
โšก

What Qmmit does here

Reads chatSessions/*.jsonl from VS Code workspaceStorage, extracts kind=2 entries with your prompts.

9

Push and verify

Push and check your dashboard.

git push -u origin main
# Check: qmmit.dev/yourusername
# Should show: auth-system project, 5 prompts, github-copilot model
Qmmit โ€” Verified AI Developer Portfolio