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
3 changes: 3 additions & 0 deletions content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ description: A spreadsheet formula engine with Google Sheets conformance, for Ru
TrueCalc is a spreadsheet formula engine with Google Sheets conformance, for
Rust, JavaScript/WASM, MCP, and (soon) a hosted API.

New here? **[Getting started](./tutorials/getting-started.mdx)** installs the
npm package and runs a formula in under a minute.

- **[Tutorials](./tutorials/index.mdx)** — hands-on, build-it-yourself
walkthroughs. Every step runs in your browser. Start here if you're new.
- **[Learn](./learn/index.mdx)** — a beginner→advanced guide to spreadsheet
Expand Down
17 changes: 9 additions & 8 deletions content/docs/paths/beginner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ title: Beginner path
description: "From your first formula to a working loan calculator, in order."
---

1. [Your first formula](/tutorials/your-first-formula)
2. [Split a bill with tip](/tutorials/split-a-bill)
3. [Average a set of grades](/tutorials/grade-average)
4. [Calculate a percentage change](/tutorials/percentage-change)
5. [Build a simple invoice line](/tutorials/simple-invoice)
6. [Work out a monthly loan payment](/tutorials/monthly-loan-payment)
7. Concept: [Values and types](/learn/values-and-types)
8. Concept: [Functions](/learn/functions)
1. [Getting started](/tutorials/getting-started) — install and run a formula
2. [Your first formula](/tutorials/your-first-formula)
3. [Split a bill with tip](/tutorials/split-a-bill)
4. [Average a set of grades](/tutorials/grade-average)
5. [Calculate a percentage change](/tutorials/percentage-change)
6. [Build a simple invoice line](/tutorials/simple-invoice)
7. [Work out a monthly loan payment](/tutorials/monthly-loan-payment)
8. Concept: [Values and types](/learn/values-and-types)
9. Concept: [Functions](/learn/functions)
39 changes: 39 additions & 0 deletions content/docs/tutorials/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Getting started
description: "Install TrueCalc and run your first formula in under a minute."
---

TrueCalc is a spreadsheet formula engine with Google Sheets conformance —
install it, and you can evaluate spreadsheet formulas from JavaScript or
TypeScript.

## Install

```sh
npm install @truecalc/core
```

## Run a formula

```ts test
import { createEngine } from '@truecalc/core';
import assert from 'node:assert/strict';

const engine = createEngine('google-sheets');

// SUM behavior — fixture: google_sheets/math.tsv — "sum of individual arguments"
const result = engine.evaluate('=SUM(A1, B1)', { A1: 100, B1: 200 });
assert.deepEqual(result, { type: 'number', value: 300 });
```

`A1` and `B1` are the cell values you're supplying — TrueCalc's evaluator is
stateless, so you pass in whatever a formula's references need.

## Where next

- **[Tutorials](/tutorials)** — build a real calculation step by step,
starting with [your first formula](/tutorials/your-first-formula).
- **[Learn](/learn)** — a beginner-to-advanced guide to spreadsheet formulas
and workbooks with TrueCalc.
- **[Reference](/reference)** — a page for every function, with a runnable
widget.
2 changes: 1 addition & 1 deletion content/docs/tutorials/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": true,
"title": "Tutorials",
"pages": ["index", "(beginner)", "(advanced)"]
"pages": ["index", "getting-started", "(beginner)", "(advanced)"]
}
Loading