Skip to content

Get started

Run it locally

3 min readUpdated

Page actions

ChatGPT and Claude are third-party services. The link gives them this page's public address and a short instruction. This site records nothing.

From a fresh clone to the API, the website and this wiki running on your machine, with the gates CI runs — and what to do when a step fails.

Everything here runs on a laptop with no accounts and no network after the first download. The server is Python standard library only; the website and the wiki need Node.

1. Toolchain

ToolVersionWhy
Python3.12 (.python-version)the API, the tools, the gates. On macOS, Homebrew’s python3 is fine; avoid the system /usr/bin/python3
Node22 (.nvmrc)the website (frontend/) and the wiki (docs-site/)
gitany recentthe repository (no Git LFS is needed here — the database is installed by pin)
makeanythe entry points below
Terminal window
git clone https://github.com/Algorythmos-AI/sggs-platform.git
cd sggs-platform
make doctor # checks python, node and whether the database is installed

2. The database (pinned, verified)

The scripture database is not in this repository. dataset.lock.json names the sggs-data commit and the sha256 of the exact object to serve; make dataset downloads it (~104 MiB), verifies the checksum and size, and installs it atomically as db/sggs.sqlite (git-ignored).

Terminal window
make dataset # install db/sggs.sqlite from the pin
make dataset-check # prove sggs-data publishes that object at the pinned commit

3. The API and the site

Terminal window
cd webapp && python3 serve.py
# → http://localhost:7777 (override with SGGS_PORT)

Open http://localhost:7777 for the prebuilt website served from webapp/static/, and check the API is whole:

Terminal window
curl -s http://localhost:7777/api/health | python3 -m json.tool

Every value under checks must be true: 60,658 lines, 1,430 Angs, FTS5 working, the Mool Mantar verbatim, at least 560 ੴ, the verifier alive. Then try a search and a page:

Terminal window
curl -s 'http://localhost:7777/api/search?q=sat%20nam&limit=3' | python3 -m json.tool
curl -s 'http://localhost:7777/api/ang/1' | python3 -m json.tool | head -40

Every line comes back verbatim with its Ang. That is the only way scripture ever reaches a screen.

4. The website source (optional)

Terminal window
cd frontend && npm ci && npm run dev # http://localhost:4321, calls the API on :7777
npm run build:deploy # builds and syncs dist/ into webapp/static/

5. This wiki

Terminal window
make docs-dev # http://localhost:4322 — live reload; /api proxied to serve.py on :7777
make docs-check # the docs gates: frontmatter, links, widgets, palette, the scripture rule
make docs # full build with every Mermaid fence rendered and every link validated

6. The gates CI runs

Terminal window
make ci # versions unified · dataset pin · platform tests · contract drift · docs gates

make ci is the no-PDF subset of what a pull request runs; the scripture gates themselves run in sggs-data. The full list, with what each check proves, is in CI gates.

When something fails

SymptomCauseFix
db/sggs.sqlite missing — run: make datasetfresh clonemake dataset
/api/health has a false checka partial or wrong databasemake dataset-check, then make dataset again
serve.py says a table is missing at startupSGGS_MODULES set to a subset without its sliceunset it, or point SGGS_DB at a slice from make slices
python3 is 3.9 or the system interpretermacOS default on PATHuse Homebrew’s 3.12; make doctor tells you which one it found
npm ci fails on a platform binarynode_modules copied from another machinedelete node_modules and run npm ci again
the wiki build says a Mermaid diagram faileda syntax error in a fencethe message names the file and diagram; GitHub’s preview of the same fence helps
the wiki build cannot find ChromiumPlaywright browsers not installedcd docs-site && npx playwright install chromium

More detail on the layout of the repository and the API is in Local setup, repository map & API.