Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions demos/typescript/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Anthropic API key
ANTHROPIC_API_KEY=sk-ant-...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should have quotes


# Learning Commons platform key
PLATFORM_API_KEY=...
3 changes: 3 additions & 0 deletions demos/typescript/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.env
32 changes: 32 additions & 0 deletions demos/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# TypeScript SDK Demo

Minimal web app demonstrating the published
[`@learning-commons/evaluators`](https://www.npmjs.com/package/@learning-commons/evaluators)
SDK. The home page lists the available evaluator demos; each is its own page. React (Vite)
frontend + a small Express backend that runs the Node-only SDK.

Evaluators:

- **Math Standards Alignment** (`/math-standards-alignment`) — pick a grade, jurisdiction, and
standards, enter a math word problem, and view the evaluator's alignment result.

## Setup

```bash
npm install
cp .env.example .env # then fill in both keys
```

| Key | Purpose |
|---|---|
| `ANTHROPIC_API_KEY` | LLM calls (the evaluator's default model is Claude) |
| `PLATFORM_API_KEY` | Learning Commons Knowledge Graph (standards lookup) |

## Run

```bash
npm run dev
```

Open http://localhost:5173 to reach the home page (the Vite dev server proxies `/api` to the
backend on `:3001`), then pick an evaluator.
12 changes: 12 additions & 0 deletions demos/typescript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Learning Commons Evaluators — SDK Demo</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading